/* Madu V7.95 — interface do computador reformulada, cartões compactos no celular e regra
   única de texto: nenhuma palavra é partida ao meio (V7.96: botões podem ter duas linhas).
   Carrega por último. Só aparência: não muda dados, regras de estoque, financeiro ou permissões. */

:root{--m5-green:#2f6044;--m5-green-d:#1f4230;--m5-ink:#1b2b21;--m5-muted:#66776c;--m5-line:#e2e8e2;--m5-soft:#f2f6f2;--m5-bg:#f5f7f4;--m5-card:#fff;--m5-r:16px;--m5-shadow:0 1px 2px #1b2b210a,0 4px 14px #1b2b210b;--m5-ease:cubic-bezier(.2,.8,.2,1)}

/* ═══ Regra de texto: palavras inteiras ═════════════════════════════════════════════
   Camadas antigas usavam "overflow-wrap:anywhere", que partia palavras (ex.: "Adicio-nar").
   Agora a linha só quebra entre palavras; códigos longos continuam podendo quebrar. */
html:root body,html:root body *{overflow-wrap:normal!important;word-break:normal!important;hyphens:manual!important}
html:root body :is(code,pre,kbd,.font-mono,input,textarea,[class*="code"]:not(button),.madu-v752-code-last){overflow-wrap:anywhere!important}
html:root body main{overflow-x:hidden}

/* V7.96: botões, abas e menus podem usar duas linhas, mas a quebra acontece só entre palavras
   (nunca no meio de uma palavra). Etiquetas de status curtas continuam em uma linha. */
html:root body :is(.madu-order-tag,.madu-v752-payable-status){white-space:nowrap!important}
/* Um botão nunca fica mais estreito que a sua palavra mais longa. */
html:root body :is(.flex,[class*="actions"],[class*="toolbar"]) > :is(button,.nf-btn):not(:has(small,p,h3,h4,.madu-kitchen-symbol)){min-width:min-content}

/* ═══ Resposta ao toque ═════════════════════════════════════════════════════════════ */
html{-webkit-tap-highlight-color:transparent}
html:root body :is(button,a,[role="button"],[role="tab"],summary,label,select,input[type="checkbox"],input[type="radio"]){touch-action:manipulation}
@media (pointer:coarse){
 /* "scale" soma com qualquer "transform" já usado pelo botão, sem deslocá-lo. */
 html:root body :is(button,.nf-btn,[role="button"],[role="tab"],summary){transition:scale .14s var(--m5-ease),background-color .14s,box-shadow .14s}
 html:root body :is(button,.nf-btn,[role="button"],[role="tab"],summary):active:not(:disabled){scale:.965;transition-duration:0s}
 html:root body :is(.madu-kitchen-action,.madu-pay-card,.madu-order-card button,.madu-inbox-row):active{scale:.985}
 html:root body .madu-v795-pressed{filter:brightness(.96)}
}
@media (prefers-reduced-motion:reduce){html:root body :is(button,.nf-btn,[role="button"],[role="tab"],summary):active{scale:none}}

/* ═══ Desempenho: listas longas só desenham o que está na tela ══════════════════════ */
html:root body :is(.madu-order-card,.madu-pay-card,.madu-inbox-row,.madu-series-item){contain:layout paint style}
html:root body #maduRefinedDesktopBar{backdrop-filter:none!important;-webkit-backdrop-filter:none!important}

/* ═══════════════════════════════ CELULAR ═══════════════════════════════════════════ */
@media (max-width:767px), screen and (orientation:landscape) and (pointer:coarse) and (max-height:600px){

 /* ── Início: atalhos em lista (V7.96: o usuário escolhe lista ou cards; ver madu-v796) ─
    Uma linha por atalho: ícone, nome e descrição. Textos longos usam duas linhas, sem cortar palavras. */
 html:root body:not(.madu-home-cards) #tab-dashboard #maduMobileHome .madu-kitchen-actions.madu-kitchen-actions{display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-auto-rows:auto!important;align-items:stretch!important;gap:8px!important}
 html:root body:not(.madu-home-cards) #tab-dashboard #maduMobileHome .madu-kitchen-actions .madu-kitchen-action.madu-kitchen-action{flex-direction:row!important;flex-wrap:nowrap!important;align-items:center!important;justify-content:flex-start!important;text-align:left!important;min-height:78px!important;height:auto!important;max-height:none!important;aspect-ratio:auto!important;padding:14px 16px 14px 12px!important;border-radius:18px!important;gap:14px!important;position:relative}
 html:root body:not(.madu-home-cards) #tab-dashboard #maduMobileHome .madu-kitchen-actions .madu-kitchen-action.madu-kitchen-action .madu-kitchen-symbol{width:48px!important;height:48px!important;flex:0 0 48px!important;font-size:20px!important;border-radius:14px!important;margin:0!important;display:grid!important;place-items:center}
 html:root body:not(.madu-home-cards) #tab-dashboard #maduMobileHome .madu-kitchen-actions .madu-kitchen-action.madu-kitchen-action > span:not(.madu-kitchen-symbol):not([class*="badge"]):not([class*="counts"]){display:flex!important;flex-direction:column!important;gap:2px!important;flex:1 1 0!important;width:auto!important;min-width:0!important;max-width:100%!important;align-items:flex-start!important;margin:0!important}
 html:root body:not(.madu-home-cards) #tab-dashboard #maduMobileHome .madu-kitchen-actions .madu-kitchen-action.madu-kitchen-action strong{font-size:15.5px!important;line-height:1.25!important;white-space:normal!important;text-wrap:balance;max-width:100%;display:block!important}
 html:root body:not(.madu-home-cards) #tab-dashboard #maduMobileHome .madu-kitchen-actions .madu-kitchen-action.madu-kitchen-action small{font-size:12.5px!important;line-height:1.3!important;margin:0!important;white-space:normal!important;max-width:100%;display:block!important;opacity:.8}
 html:root body:not(.madu-home-cards) #tab-dashboard #maduMobileHome .madu-kitchen-actions .madu-kitchen-action.madu-kitchen-action .madu-kitchen-arrow{position:static!important;display:block!important;flex:0 0 auto;margin:0!important;font-size:12px!important;opacity:.45}
 html:root body:not(.madu-home-cards) #tab-dashboard #maduMobileHome .madu-kitchen-actions .madu-kitchen-action.madu-kitchen-action :is(.madu-v742-mini-badge,[class*="badge"]):not(.madu-kitchen-symbol){position:static!important;flex:0 0 auto;margin:0!important;display:inline-flex;gap:4px;order:5}
 html:root body:not(.madu-home-cards) #tab-dashboard #maduMobileHome .madu-kitchen-actions .madu-kitchen-action.madu-kitchen-action .madu-kitchen-arrow{order:6}
 html:root body:not(.madu-home-cards) #tab-dashboard #maduMobileHome .madu-kitchen-actions .madu-kitchen-action.madu-kitchen-action [hidden]{display:none!important}
 html:root body:not(.madu-home-cards) #tab-dashboard #maduMobileHome .madu-gestor-actions .madu-kitchen-action.madu-kitchen-action .madu-expiry-card-counts{position:static!important;flex:0 0 auto;display:flex!important;gap:6px;margin:0!important;order:5}
 html:root body:not(.madu-home-cards) #tab-dashboard #maduMobileHome .madu-gestor-actions .madu-kitchen-action.madu-kitchen-action .madu-expiry-count-caption{display:none!important}
 html:root body:not(.madu-home-cards) #tab-dashboard #maduMobileHome .madu-kitchen-actions .madu-kitchen-action.madu-kitchen-action::after{content:none!important;display:none!important}
 html:root body:not(.madu-home-cards) #tab-dashboard #maduMobileHome .madu-kitchen-actions .madu-kitchen-action.madu-kitchen-action .madu-kitchen-arrow ~ .madu-kitchen-arrow{display:none!important}
 /* Avisos do início em uma linha */
 html:root body #maduOrdersHomeAlert{white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;display:block}
 html:root body #maduOrdersHomeAlert:not(.hidden){display:block!important}
 html:root body #maduExpiryHomeAlert small,html:root body #maduExpiryHomeAlert p{white-space:nowrap!important;overflow:hidden;text-overflow:ellipsis}

 /* ── Encomendas: cartão enxuto (cabe mais de um pedido por tela) ──────────────────── */
 html:root body #tab-orders .madu-v759-customer-group{padding:8px!important;border-radius:18px!important}
 html:root body #tab-orders .madu-v759-group-head{display:flex!important;align-items:center;gap:10px;padding:2px 4px 8px!important;margin:0!important;min-width:0}
 html:root body #tab-orders .madu-v759-group-head > i{flex:0 0 32px;width:32px!important;height:32px!important;display:grid!important;place-items:center;border-radius:10px;font-size:13px!important}
 html:root body #tab-orders .madu-v759-group-head > div{min-width:0;flex:1}
 html:root body #tab-orders .madu-v759-group-head :is(strong,small){display:block;white-space:nowrap!important;overflow:hidden;text-overflow:ellipsis}
 html:root body #tab-orders .madu-v759-group-head strong{font-size:15px!important}
 html:root body #tab-orders .madu-v759-group-head small{font-size:12px!important}
 html:root body #tab-orders .madu-v759-group-orders{gap:8px!important}
 html:root body #tab-orders .madu-orders-grid{gap:10px!important}

 html:root body #tab-orders .madu-order-card{border-radius:16px!important}
 /* Cabeçalho: horário à esquerda, nome e situação empilhados ao lado */
 html:root body #tab-orders .madu-order-card .madu-order-head{display:grid!important;grid-template-columns:auto minmax(0,1fr);column-gap:10px;row-gap:4px;align-items:center;padding:12px 12px 8px 16px!important}
 html:root body #tab-orders .madu-order-card .madu-order-head-title{display:contents!important}
 html:root body #tab-orders .madu-order-card .madu-order-time{grid-row:1/3;grid-column:1;min-width:52px!important;height:44px!important;font-size:15px!important;border-radius:12px!important;padding:0 6px!important}
 html:root body #tab-orders .madu-order-card .madu-order-head-title > div{grid-column:2;grid-row:1;min-width:0}
 html:root body #tab-orders .madu-order-card .madu-order-head h3{font-size:15px!important;line-height:1.2!important}
 html:root body #tab-orders .madu-order-card .madu-order-head small{font-size:11.5px!important;margin-top:1px!important;white-space:nowrap!important;overflow:hidden;text-overflow:ellipsis}
 html:root body #tab-orders .madu-order-card .madu-order-head > .madu-order-tag{grid-column:2;grid-row:2;justify-self:start;height:20px!important;padding:0 8px!important;font-size:11px!important;max-width:100%;overflow:hidden;text-overflow:ellipsis}
 /* Itens: uma linha para o produto, outra para praça e situação */
 html:root body #tab-orders .madu-order-card .madu-order-items{gap:6px!important;padding:0 12px 8px 16px!important}
 html:root body #tab-orders .madu-order-card .madu-order-item{gap:10px!important;padding:8px 8px 8px 10px!important;border-radius:12px!important}
 html:root body #tab-orders .madu-order-card div.madu-order-photo{display:none!important}
 html:root body #tab-orders .madu-order-card button.madu-order-photo{flex:0 0 38px!important;width:38px!important;height:38px!important;border-radius:10px!important}
 html:root body #tab-orders .madu-order-card .madu-order-item-body{display:flex!important;flex-wrap:wrap;align-items:center;column-gap:6px;row-gap:3px;min-width:0}
 html:root body #tab-orders .madu-order-card .madu-order-item-body strong{flex:1 0 100%;min-width:0;max-width:100%;font-size:13.5px!important;line-height:1.25;white-space:nowrap!important;overflow:hidden;text-overflow:ellipsis}
 html:root body #tab-orders .madu-order-card .madu-order-item-body .madu-order-tag{order:1;height:18px!important;padding:0 7px!important;font-size:10.5px!important}
 html:root body #tab-orders .madu-order-card .madu-order-item-body small{order:2;flex:1 1 0;min-width:0;margin:0!important;font-size:11.5px!important;white-space:nowrap!important;overflow:hidden;text-overflow:ellipsis}
 html:root body #tab-orders .madu-order-card .madu-order-item-actions{flex:0 0 auto;margin:0!important}
 html:root body #tab-orders .madu-order-card .madu-order-item-actions button{min-height:34px!important;height:34px;padding:0 12px!important;font-size:12.5px!important;border-radius:10px!important}
 /* Rodapé: resumo financeiro em duas linhas curtas e ações em uma faixa só */
 html:root body #tab-orders .madu-order-card .madu-order-foot{gap:8px!important;padding:8px 12px 12px 16px!important}
 html:root body #tab-orders .madu-order-card .madu-order-foot > span:first-child{font-size:11.5px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 html:root body #tab-orders .madu-v750-financial{gap:2px!important;padding:0!important;border:0!important;background:none!important;border-radius:0!important}
 /* Dentro do grupo do cliente o nome já aparece no topo: o cartão mostra só pedido e situação. */
 html:root body #tab-orders .madu-v759-customer-group .madu-order-card .madu-order-head h3{display:none!important}
 html:root body #tab-orders .madu-v759-customer-group .madu-order-card .madu-order-head small{font-size:12.5px!important;font-weight:700;color:var(--m5-ink)!important}
 html:root body #tab-orders .madu-v750-finance-method{font-size:11.5px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 html:root body #tab-orders .madu-v750-finance-values{flex-wrap:nowrap!important;gap:10px!important;overflow:hidden;min-width:0}
 html:root body #tab-orders .madu-v750-finance-values strong{font-size:13.5px!important}
 html:root body #tab-orders .madu-v750-finance-values > span{font-size:12px!important;min-width:0;overflow:hidden;text-overflow:ellipsis}
 html:root body #tab-orders .madu-v750-finance-values b{font-size:11.5px!important;margin-left:auto;flex:0 0 auto}
 /* Com "Falta" visível, o recebido é dedutível: a linha fica com Total e Falta, sem cortes. */
 html:root body #tab-orders .madu-v750-finance-values:has(.madu-v750-finance-due) > span{display:none!important}
 html:root body #tab-orders .madu-order-card .madu-order-item{min-width:0;max-width:100%;overflow:hidden}
 html:root body #tab-orders .madu-v750-finance-caution{font-size:11px!important;line-height:1.3}
 html:root body #tab-orders .madu-order-close{flex-wrap:nowrap!important;justify-content:stretch!important;gap:6px!important;overflow-x:auto;scrollbar-width:none;margin:0 -2px;padding:0 2px}
 html:root body #tab-orders .madu-order-close::-webkit-scrollbar{display:none}
 html:root body #tab-orders .madu-order-close button{flex:1 0 auto!important;min-height:36px!important;height:36px;padding:0 12px!important;font-size:12.5px!important;border-radius:10px!important}
 html:root body #tab-orders .madu-order-close button i{margin-right:4px}
 html:root body #tab-orders .madu-order-conservation-pills{display:flex!important;flex-wrap:nowrap!important;gap:6px;overflow-x:auto;scrollbar-width:none;padding:0 12px 10px 16px!important;margin:0!important;white-space:nowrap}
 html:root body #tab-orders .madu-order-conservation-pills::-webkit-scrollbar{display:none}
 html:root body #tab-orders .madu-order-conservation-pills > *{flex:0 0 auto;font-size:11.5px!important}
 html:root body #tab-orders .madu-order-note{margin:0!important;padding:0 12px 10px 16px!important;font-size:12px!important;line-height:1.35;white-space:nowrap!important;overflow:hidden;text-overflow:ellipsis;border:0!important}
 html:root body #tab-orders .madu-orders-alert,html:root body #tab-orders [id*="OrdersAlert"]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 html:root body #tab-orders #maduV759OrdersNav button{font-size:13.5px!important;padding:0 6px!important}

 /* ── Contas a pagar: "Marcar pago" sempre inteiro ─────────────────────────────────── */
 html:root body #tab-payables .madu-pay-card .madu-v752-payable-actions button{flex:0 0 auto!important;overflow:visible!important;text-overflow:clip!important;padding:0 12px!important}
 html:root body #tab-payables .madu-pay-card .madu-v752-payable-actions button.is-pay,
 html:root body #tab-payables .madu-pay-card .madu-v752-payable-actions button:not(.icon):not(.primary){flex:1 0 auto!important}
 html:root body #tab-payables .madu-pay-card .madu-v752-payable-actions button.icon{flex:0 0 42px!important;width:42px;padding:0!important}
 html:root body #tab-payables .madu-pay-card .madu-v752-payable-actions button i{display:inline-block!important}
 @media (max-width:420px){
  /* Em telas estreitas, "Copiar" vira ícone (com nome acessível) e "Marcar pago" ganha o espaço. */
  html:root body #tab-payables .madu-pay-card .madu-v752-payable-actions button.primary{flex:0 0 42px!important;width:42px;padding:0!important;font-size:0!important;gap:0!important}
  html:root body #tab-payables .madu-pay-card .madu-v752-payable-actions button.primary i{font-size:15px!important}
 }
 html:root body #tab-payables .madu-pay-stat > span{font-size:11.5px!important}

 /* ── Escanear: campo e "Adicionar" lado a lado sem cortar ─────────────────────────── */
 html:root body #tab-scanner #scanCodeInput{min-width:0;flex:1 1 auto}
 html:root body #tab-scanner #scanCodeInput + button,html:root body #tab-scanner #scanCodeInput ~ button{flex:0 0 auto!important;white-space:nowrap!important;padding-inline:16px!important}

 /* ── Indicadores e rótulos curtos em uma linha ────────────────────────────────────── */
 html:root body :is(#tab-stages,#tab-needs,#tab-counting,#tab-productivity,#tab-finished) :is(article,button,.nf-panel,[class*="stat"],[class*="kpi"],[class*="metric"]) > small:first-child,
 html:root body :is(#tab-stages,#tab-needs,#tab-productivity) [class*="stat"] :is(small,span):not(:has(*)){white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
 html:root body #tab-needs [role="tablist"] button,html:root body #tab-needs .madu-v742-tabs button{font-size:13px!important;padding-inline:10px!important}
 html:root body .madu-mobile-metrics button > :is(span,small){white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}

 /* Notificações: duas linhas no máximo por aviso */
 html:root body .madu-inbox-text{display:-webkit-box!important;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
}

/* ═══════════════════════════ COMPUTADOR (≥ 768 px) ════════════════════════════════
   Barra lateral escura e fina, itens em uma linha, conteúdo em cartões claros. */
@media (min-width:768px) and (min-height:601px), (min-width:768px) and (pointer:fine){
 html:root body:not(.auth-locked){background:var(--m5-bg)!important}

 /* ── Barra lateral ───────────────────────────────────────────────────────────────── */
 html:root body #appSidebar#appSidebar{width:248px!important;flex:0 0 248px!important;height:100vh;position:sticky;top:0;overflow:hidden;display:flex!important;flex-direction:column!important;background:linear-gradient(180deg,#1d3f2d 0%,#17331f 100%)!important;color:#e8f1ea!important;box-shadow:none!important;border-right:1px solid #0f241720}
 html:root body #appSidebar#appSidebar > div:first-child{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;overflow:hidden}
 html:root body #appSidebar#appSidebar #appBrandHeader{display:flex!important;align-items:center;gap:10px;padding:16px 16px 12px!important;border:0!important;background:none!important}
 html:root body #appSidebar#appSidebar .sidebar-brand-frame{width:44px!important;max-width:44px!important;height:44px;flex:0 0 44px;padding:4px!important;border-radius:12px!important;background:#fff!important;border:0!important;box-shadow:0 2px 8px #0003!important;display:grid;place-items:center}
 html:root body #appSidebar#appSidebar .sidebar-brand-frame img{max-height:36px!important;width:100%!important;height:36px!important;object-fit:contain;border-radius:8px!important}
 html:root body #appSidebar#appSidebar #appBrandHeader::after{content:"Madu Gestão";font-weight:800;font-size:15.5px;letter-spacing:-.01em;color:#fff;white-space:nowrap}
 html:root body #appSidebar#appSidebar #mobileUserInfo{margin:0 12px 6px!important;padding:8px 8px 8px 10px!important;border-radius:14px!important;background:#ffffff0f!important;border:1px solid #ffffff14!important}
 html:root body #appSidebar#appSidebar #mobileUserInfo > div{flex-wrap:nowrap!important;gap:8px}
 html:root body #appSidebar#appSidebar #mobileUserInfo > div > div:first-child{min-width:0;flex:1}
 html:root body #appSidebar#appSidebar #mobileUserInfo > div > div:first-child > div:last-child{min-width:0}
 html:root body #appSidebar#appSidebar #userAvatar{width:32px!important;height:32px!important;flex:0 0 32px;background:#cfe5d6!important;color:#1d3f2d!important}
 html:root body #appSidebar#appSidebar #userNameDisplay{font-size:13px!important;color:#fff!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 html:root body #appSidebar#appSidebar #userRoleBadge{background:#ffffff1f!important;color:#cfe5d6!important;font-size:9.5px!important;letter-spacing:.06em}
 html:root body #appSidebar#appSidebar #mobileUserInfo button{width:32px;height:32px;padding:0!important;display:grid;place-items:center;border-radius:9px!important;color:#cfe5d6!important}
 html:root body #appSidebar#appSidebar #mobileUserInfo button:hover{background:#ffffff1a!important;color:#fff!important}

 html:root body #appSidebar#appSidebar #appNav#appNav{background:transparent!important;color:inherit!important;flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;padding:6px 10px 12px!important;display:flex;flex-direction:column;gap:2px;scrollbar-width:thin;scrollbar-color:#ffffff26 transparent}
 html:root body #appSidebar#appSidebar #appNav#appNav > *{margin-top:0;margin-bottom:0}
 html:root body #appSidebar#appSidebar #appNav#appNav :is(p.uppercase,.v737-nav-group){margin:14px 10px 6px!important;padding:0!important;font-size:10.5px!important;font-weight:800!important;letter-spacing:.09em!important;text-transform:uppercase;color:#9fc1aa!important;opacity:1!important}
 html:root body #appSidebar#appSidebar #appNav#appNav button[id^="nav-"],html:root body #appSidebar#appSidebar #appNav#appNav button[data-madu-install],html:root body #appSidebar#appSidebar #appNav#appNav > .admin-only > button{
 align-items:center!important;gap:11px!important;width:100%!important;min-height:38px!important;height:auto;padding:0 10px!important;margin:0!important;border-radius:10px!important;
  background:transparent!important;border:0!important;box-shadow:none!important;color:#d5e5da!important;font-size:13.5px!important;font-weight:600!important;line-height:1.2!important;text-align:left;white-space:nowrap!important;transform:none!important;
  transition:background .15s,color .15s!important;position:relative}
 html:root body #appSidebar#appSidebar #appNav#appNav button[id^="nav-"] > span,html:root body #appSidebar#appSidebar #appNav#appNav button[data-madu-install] > span{flex:1 1 auto;min-width:0;white-space:normal!important;line-height:1.2;padding:6px 0;display:block}
 html:root body #appSidebar#appSidebar #appNav#appNav button[id^="nav-"] > span small{display:none!important}
 html:root body #appSidebar#appSidebar #appNav#appNav button[id^="nav-"] > span strong{font-weight:inherit!important}
 html:root body #appSidebar#appSidebar #appNav#appNav button[id^="nav-"] > i:first-child,html:root body #appSidebar#appSidebar #appNav#appNav button[data-madu-install] > i:first-child{flex:0 0 18px;width:18px!important;font-size:14px!important;color:#9fc1aa!important;text-align:center}
 html:root body #appSidebar#appSidebar #appNav#appNav button[id^="nav-"]:hover,html:root body #appSidebar#appSidebar #appNav#appNav button[data-madu-install]:hover{background:#ffffff12!important;color:#fff!important}
 html:root body #appSidebar#appSidebar #appNav#appNav button[id^="nav-"][aria-current="page"]{background:#ffffff1f!important;color:#fff!important}
 html:root body #appSidebar#appSidebar #appNav#appNav button[id^="nav-"][aria-current="page"] > i:first-child{color:#bfe3c9!important}
 html:root body #appSidebar#appSidebar #appNav#appNav button[id^="nav-"][aria-current="page"]::before{content:"";position:absolute;left:-10px;top:9px;bottom:9px;width:3px;border-radius:0 3px 3px 0;background:#8fd1a5}
 /* Contadores do item (ex.: encomendas atrasadas) ficam à direita, na mesma linha */
 html:root body #appSidebar#appSidebar #appNav#appNav button[id^="nav-"] :is([class*="badge"],[class*="count"],#payableNavCount){position:static!important;margin:0 0 0 auto!important;flex:0 0 auto}
 html:root body #appSidebar#appSidebar #appNav#appNav button[id^="nav-"] > :is([class*="badge"],[class*="count"],div,span:not(:first-of-type)){display:inline-flex;flex:0 0 auto;margin:0!important;gap:3px}
 html:root body #appSidebar#appSidebar #appNav#appNav button[id^="nav-"] :is([class*="badge"],[class*="count"]) > *{min-width:18px;height:18px;font-size:10.5px!important;padding:0 5px;border-radius:9px;display:inline-grid;place-items:center}
 html:root body #appSidebar#appSidebar #appNav#appNav .chevron,html:root body #appSidebar#appSidebar #appNav#appNav button > .fa-chevron-right{display:none!important}
 html:root body #appSidebar#appSidebar #appNav#appNav > div{border-color:#ffffff14!important;padding-top:6px!important;margin-top:6px!important}
 html:root body #appSidebar#appSidebar #appNav#appNav details > summary{list-style:none;display:flex;align-items:center;gap:11px;min-height:36px;padding:0 10px!important;margin:2px 0!important;border-radius:10px;color:#9fc1aa!important;font-size:12.5px!important;font-weight:700;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background:none!important;border:0!important}
 html:root body #appSidebar#appSidebar #appNav#appNav details > summary::-webkit-details-marker{display:none}
 html:root body #appSidebar#appSidebar #appNav#appNav details > summary:hover{background:#ffffff0d!important;color:#fff!important}
 html:root body #appSidebar#appSidebar #appNav#appNav details > summary i{width:18px;text-align:center;margin:0!important}
 html:root body #appSidebar#appSidebar #appNav#appNav details{margin:0!important}
 html:root body #appSidebar#appSidebar #appNav#appNav details[open] > summary{color:#fff!important}
 html:root body #appSidebar#appSidebar #maduPrinterInlinePanel{margin:4px 0!important;background:#0000001f!important;border-color:#ffffff1a!important}
 html:root body #appSidebar#appSidebar .sidebar-printer-footer{flex:0 0 auto;padding:10px 16px!important;border-top:1px solid #ffffff14!important;background:#00000024!important;color:#b7cfbf!important;font-size:11.5px!important}
 html:root body #appSidebar#appSidebar .sidebar-printer-footer > div{flex-wrap:nowrap!important;gap:8px}
 html:root body #appSidebar#appSidebar .sidebar-printer-footer button{color:#cfe5d6!important;flex:0 0 auto;white-space:nowrap}
 html:root body #appSidebar#appSidebar #appNav#appNav::-webkit-scrollbar{width:6px}
 html:root body #appSidebar#appSidebar #appNav#appNav::-webkit-scrollbar-thumb{background:#ffffff26;border-radius:6px}

 /* ── Área de trabalho ────────────────────────────────────────────────────────────── */
 html:root body main{padding:0 32px 40px!important;background:var(--m5-bg)}
 html:root body main > section[id^="tab-"]{max-width:1320px!important;margin-left:auto!important;margin-right:auto!important}
 html:root body #maduRefinedDesktopBar{max-width:none;margin:0 -32px 24px!important;padding:10px 32px!important;min-height:60px;background:#fffffff2!important;border-bottom:1px solid var(--m5-line)!important;box-shadow:0 1px 0 #1b2b2105}
 html:root body #maduRefinedDesktopBar > strong{font-size:18px!important;font-weight:800!important;color:var(--m5-ink)!important;letter-spacing:-.01em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
 html:root body #maduRefinedDesktopBar #maduRefinedBack{width:36px;height:36px;border-radius:10px!important;display:grid;place-items:center;border:1px solid var(--m5-line)!important;background:#fff!important;transition:background .15s}
 html:root body #maduRefinedDesktopBar #maduRefinedBack:hover{background:var(--m5-soft)!important}

 /* Cartões, painéis e tabelas com o mesmo acabamento */
 html:root body main :is(.nf-panel,.glass-card){border-radius:var(--m5-r)!important;border:1px solid var(--m5-line)!important;background:var(--m5-card)!important;box-shadow:var(--m5-shadow)!important}
 html:root body main :is(.nf-btn,button.nf-btn){border-radius:10px!important;transition:background .15s,box-shadow .15s,transform .15s}
 html:root body main .nf-btn:hover{box-shadow:0 2px 8px #1b2b2114}
 html:root body main .nf-btn:active{transform:translateY(1px)}
 html:root body main table th{font-size:11px!important;letter-spacing:.06em;text-transform:uppercase;color:var(--m5-muted)!important;background:#f7f9f7!important}
 html:root body main table td{vertical-align:middle}
 html:root body main table td .flex-wrap{flex-wrap:nowrap!important}

 /* ── Início: atalhos em blocos horizontais de altura fixa ────────────────────────── */
 html:root body #tab-dashboard #maduMobileHome .madu-kitchen-actions.madu-kitchen-actions{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(250px,1fr))!important;grid-auto-rows:auto!important;align-items:stretch!important;gap:12px!important}
 html:root body #tab-dashboard #maduMobileHome .madu-kitchen-actions .madu-kitchen-action.madu-kitchen-action{flex-direction:row!important;flex-wrap:nowrap!important;align-items:center!important;justify-content:flex-start!important;text-align:left!important;gap:14px!important;min-height:84px!important;height:auto!important;max-height:none!important;aspect-ratio:auto!important;padding:14px 16px!important;border-radius:16px!important;position:relative;transition:transform .18s var(--m5-ease),box-shadow .18s var(--m5-ease),border-color .18s!important}
 html:root body #tab-dashboard #maduMobileHome .madu-kitchen-actions .madu-kitchen-action.madu-kitchen-action:hover{transform:translateY(-2px);box-shadow:0 10px 26px #1b2b211a!important}
 html:root body #tab-dashboard #maduMobileHome .madu-kitchen-actions .madu-kitchen-action.madu-kitchen-action .madu-kitchen-symbol{flex:0 0 44px!important;width:44px!important;height:44px!important;margin:0!important;font-size:19px!important;border-radius:12px!important;display:grid!important;place-items:center}
 html:root body #tab-dashboard #maduMobileHome .madu-kitchen-actions .madu-kitchen-action.madu-kitchen-action > span:not(.madu-kitchen-symbol):not([class*="badge"]):not([class*="counts"]){display:flex!important;flex-direction:column!important;gap:3px!important;flex:1 1 0!important;width:auto!important;min-width:0!important;max-width:100%!important;align-items:flex-start!important}
 html:root body #tab-dashboard #maduMobileHome .madu-kitchen-actions .madu-kitchen-action.madu-kitchen-action strong{font-size:14.5px!important;line-height:1.25!important;white-space:normal!important;text-wrap:balance;max-width:100%}
 html:root body #tab-dashboard #maduMobileHome .madu-kitchen-actions .madu-kitchen-action.madu-kitchen-action small{font-size:12.5px!important;line-height:1.3!important;margin:0!important;white-space:normal!important;max-width:100%;display:block!important;opacity:.85}
 html:root body #tab-dashboard #maduMobileHome .madu-kitchen-actions .madu-kitchen-action.madu-kitchen-action .madu-kitchen-arrow{display:none!important}
 html:root body #tab-dashboard #maduMobileHome .madu-kitchen-actions .madu-kitchen-action.madu-kitchen-action :is(.madu-v742-mini-badge,[class*="badge"]):not(.madu-kitchen-symbol){position:static!important;flex:0 0 auto;margin:0 0 0 auto!important;display:inline-flex;gap:4px}
 html:root body #tab-dashboard #maduMobileHome .madu-kitchen-actions .madu-kitchen-action.madu-kitchen-action [hidden]{display:none!important}
 html:root body #tab-dashboard #maduMobileHome .madu-gestor-actions .madu-kitchen-action.madu-kitchen-action .madu-expiry-card-counts{flex:0 0 auto;display:flex!important;gap:6px;margin-left:auto}
 html:root body #maduOrdersHomeAlert{white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}

 /* Indicadores do painel: número forte, rótulo de uma linha */
 html:root body .madu-insights-kpis{grid-template-columns:repeat(auto-fit,minmax(210px,1fr))!important;gap:12px!important}
 html:root body .madu-insights-kpis .madu-insight-card{border-radius:16px!important}
 html:root body .madu-insights-kpis .madu-insight-card > span:not(.madu-insight-icon),html:root body .madu-insights-kpis .madu-insight-card small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}

 /* ── Contas a pagar: uma só lista (os cartões), em duas colunas ──────────────────── */
 html:root body #tab-payables .madu-v752-payables-desktop{display:none!important}
 html:root body #tab-payables #maduV752PayablesMobile{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(380px,1fr));gap:12px!important}
 html:root body #tab-payables .madu-pay-card{transition:box-shadow .18s,border-color .18s}
 html:root body #tab-payables .madu-pay-card:hover{border-color:#cbd9ce!important;box-shadow:0 8px 22px #1b2b2112!important}
 html:root body #tab-payables .madu-pay-card .madu-v752-payable-actions{justify-content:flex-end}
 html:root body #tab-payables .madu-pay-card .madu-v752-payable-actions button{flex:0 0 auto!important;overflow:visible!important;min-height:38px!important;padding:0 14px!important}
 html:root body #tab-payables .madu-pay-card .madu-v752-payable-actions button.is-pay{flex:1 0 auto!important;background:#2f6044!important;color:#fff!important;border-color:#2f6044!important}
 html:root body #tab-payables .madu-pay-card .madu-v752-payable-actions button.is-pay:hover{background:#244c35!important}
 html:root body #tab-payables .madu-pay-card .madu-v752-payable-actions button.primary{background:#fff!important;color:var(--m5-ink)!important;border:1px solid var(--m5-line)!important}
 html:root body #tab-payables .madu-pay-card .madu-v752-payable-actions button.icon{flex:0 0 38px!important;width:38px;border:1px solid var(--m5-line)!important;background:#fff!important}
 html:root body #tab-payables .madu-pay-stat{transition:transform .15s,box-shadow .15s}
 html:root body #tab-payables .madu-pay-stat:hover{transform:translateY(-2px);box-shadow:0 8px 20px #1b2b2114}
 html:root body #tab-payables .madu-pay-stat{align-content:center!important}

 /* ── Encomendas: grade que se adapta à largura ───────────────────────────────────── */
 html:root body #tab-orders .madu-orders-grid,html:root body #tab-orders .madu-v759-group-orders{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(400px,1fr))!important;align-items:start;gap:14px!important}
 html:root body #tab-orders .madu-order-card .madu-order-head h3{white-space:nowrap!important;overflow:hidden;text-overflow:ellipsis}
 html:root body #tab-orders .madu-order-card .madu-order-head-title{min-width:0;flex:1}
 html:root body #tab-orders .madu-order-card .madu-order-head-title > div{min-width:0}
 html:root body #tab-orders .madu-order-card .madu-order-head small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 html:root body #tab-orders .madu-order-card div.madu-order-photo{display:none!important}
 html:root body #tab-orders .madu-order-card .madu-order-item{padding:8px 10px!important}
 html:root body #tab-orders .madu-order-card .madu-order-item-body strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 html:root body #tab-orders .madu-order-card .madu-order-item-body{display:flex!important;flex-wrap:wrap;align-items:center;column-gap:8px;row-gap:3px}
 html:root body #tab-orders .madu-order-card .madu-order-item-body strong{flex:1 0 100%}
 html:root body #tab-orders .madu-order-card .madu-order-item-body .madu-order-tag{order:1;height:20px;font-size:11px}
 html:root body #tab-orders .madu-order-card .madu-order-item-body small{order:2;flex:1 1 0;min-width:0;margin:0!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 html:root body #tab-orders .madu-order-close{flex-wrap:nowrap!important}
 html:root body #tab-orders .madu-v750-finance-values{flex-wrap:nowrap!important;overflow:hidden}
 html:root body #tab-orders .madu-order-card:hover{box-shadow:0 10px 26px #1b2b2114!important}
 html:root body #tab-orders .madu-order-note{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:0 16px 12px 20px!important;margin:0!important;font-size:12.5px}
}

/* Computador estreito (768–1099 px): barra lateral recolhida para ícones */
@media (min-width:768px) and (max-width:1099px) and (min-height:601px), (min-width:768px) and (max-width:1099px) and (pointer:fine){
 html:root body #appSidebar#appSidebar{width:72px!important;flex-basis:72px!important}
 html:root body #appSidebar#appSidebar #appBrandHeader{justify-content:center;padding:14px 0 10px!important}
 html:root body #appSidebar#appSidebar #appBrandHeader::after,html:root body #appSidebar#appSidebar #mobileUserInfo,html:root body #appSidebar#appSidebar #appNav#appNav :is(p.uppercase,.v737-nav-group),html:root body #appSidebar#appSidebar #maduPrinterSettingsDisclosure,html:root body #appSidebar#appSidebar .sidebar-printer-footer{display:none!important}
 html:root body #appSidebar#appSidebar #appNav#appNav{padding:6px 10px!important}
 html:root body #appSidebar#appSidebar #appNav#appNav button[id^="nav-"],html:root body #appSidebar#appSidebar #appNav#appNav button[data-madu-install]{justify-content:center!important;padding:0!important;min-height:44px!important}
 html:root body #appSidebar#appSidebar #appNav#appNav button[id^="nav-"] > span,html:root body #appSidebar#appSidebar #appNav#appNav button[data-madu-install] > span{display:none!important}
 html:root body #appSidebar#appSidebar #appNav#appNav button[id^="nav-"] > i:first-child{font-size:16px!important}
 html:root body #appSidebar#appSidebar #appNav#appNav details > summary{justify-content:center;font-size:0!important}
 html:root body #appSidebar#appSidebar #appNav#appNav details > summary i{font-size:14px}
 html:root body main{padding:0 20px 32px!important}
 html:root body #maduRefinedDesktopBar{margin:0 -20px 20px!important;padding:10px 20px!important}
 html:root body #tab-payables #maduV752PayablesMobile{grid-template-columns:minmax(0,1fr)}
 html:root body #tab-orders .madu-orders-grid,html:root body #tab-orders .madu-v759-group-orders{grid-template-columns:minmax(0,1fr)!important}
}


/* Aviso de encomendas urgentes: uma linha; a lista completa está nos cartões logo abaixo. */
html:root body #maduOrderUrgentNotice{white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}

/* Contadores dos atalhos do início: tamanho do conteúdo, sem roubar o espaço do nome. */
html:root body #tab-dashboard #maduMobileHome .madu-kitchen-action.madu-kitchen-action :is(.madu-order-badges,.madu-expiry-card-counts){flex:0 0 auto!important;width:auto!important;min-width:0!important;max-width:45%;padding:0!important}
html:root body #tab-dashboard #maduMobileHome .madu-kitchen-action.madu-kitchen-action .madu-expiry-count-caption{display:none!important}
@media (min-width:768px) and (min-height:601px), (min-width:768px) and (pointer:fine){
 html:root body #appSidebar#appSidebar #appNav#appNav button[id^="nav-"]{flex-wrap:nowrap!important}
 html:root body #appSidebar#appSidebar #appNav#appNav button[id^="nav-"] > .madu-order-badges{position:static!important;display:inline-flex!important;flex:0 0 auto!important;gap:3px!important;margin:0 0 0 auto!important;width:auto!important;transform:none!important}
 html:root body #appSidebar#appSidebar #appNav#appNav button[id^="nav-"] > .madu-order-badges > *{position:static!important;min-width:18px;height:18px;padding:0 5px;border-radius:9px;font-size:10.5px!important;line-height:18px;display:inline-grid;place-items:center;transform:none!important}
 html:root body #appSidebar#appSidebar #appNav#appNav #maduPrinterSettingsDisclosure > summary{display:block!important;overflow:hidden;text-overflow:ellipsis;line-height:36px}
 html:root body #appSidebar#appSidebar #appNav#appNav #maduPrinterSettingsDisclosure > summary i{margin-right:8px!important}
}
@media (min-width:768px) and (min-height:601px), (min-width:768px) and (pointer:fine){
 html:root body #tab-payables #maduV752PayablesMobile{align-items:start!important}
 html:root body #tab-payables .madu-pay-card .madu-v752-payable-actions button{height:38px!important;min-height:38px!important;max-height:38px}
 html:root body #tab-payables .madu-pay-card .madu-v752-payable-status{background:#eef3ef;color:#3c5a47}
 html:root body #tab-payables .madu-pay-card.late .madu-v752-payable-status{background:#fdeaea!important;color:#a33b3b!important}
 html:root body #tab-payables .madu-pay-card.soon .madu-v752-payable-status{background:#fff1dc!important;color:#9a5c0d!important}
 html:root body #tab-payables .madu-pay-card.paid .madu-v752-payable-status{background:#e7f3ea!important;color:#2c6b45!important}
 html:root body #appSidebar#appSidebar #appNav#appNav #payableNavCount:not(.hidden){display:inline-grid!important;place-items:center;min-width:18px;height:18px;margin-left:6px!important;padding:0 5px!important;border-radius:9px!important;background:#f3c969!important;color:#3a2a05!important;font-size:10.5px!important;font-weight:800}
}
@media (min-width:768px) and (max-width:1099px) and (min-height:601px), (min-width:768px) and (max-width:1099px) and (pointer:fine){
 html:root body #appSidebar#appSidebar .madu-device-feedback{display:none!important}
}
@media (min-width:768px) and (min-height:601px), (min-width:768px) and (pointer:fine){
 html:root body #appSidebar#appSidebar .madu-device-feedback{margin:6px 0 0!important;color:#cfe5d6}
 html:root body #appSidebar#appSidebar .madu-device-feedback > summary{list-style:none;min-height:36px;line-height:36px;padding:0 10px;border-radius:10px;font-size:12.5px;font-weight:700;color:#9fc1aa;cursor:pointer;white-space:nowrap}
 html:root body #appSidebar#appSidebar .madu-device-feedback label{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:6px 10px;font-size:12.5px}
 html:root body #appSidebar#appSidebar .madu-device-feedback label > span{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 html:root body #appSidebar#appSidebar .madu-device-feedback label small{display:block;font-size:11px;opacity:.7;overflow:hidden;text-overflow:ellipsis}
}

/* Menus sem permissão, ocultos pelo usuário ou fora do perfil continuam fora da tela. */
html:root body #tab-dashboard #maduMobileHome .madu-kitchen-action.madu-kitchen-action:is(.hidden,[hidden],.madu-role-hidden,.madu-v753-user-hidden),
html:root body #appSidebar#appSidebar #appNav#appNav :is(button,div,details).madu-role-hidden,
html:root body #appSidebar#appSidebar #appNav#appNav :is(button,div,details).hidden{display:none!important}
@media (min-width:768px) and (max-width:1099px) and (min-height:601px), (min-width:768px) and (max-width:1099px) and (pointer:fine){
 html:root body #appSidebar#appSidebar #appNav#appNav button[id^="nav-"] > .madu-order-badges{position:absolute!important;top:3px;right:2px;margin:0!important;gap:0!important}
 html:root body #appSidebar#appSidebar #appNav#appNav button[id^="nav-"] > .madu-order-badges > :not(:first-child){display:none!important}
 html:root body #appSidebar#appSidebar #appNav#appNav button[id^="nav-"] > .madu-order-badges > *{min-width:16px;height:16px;line-height:16px;font-size:9.5px!important;padding:0 4px}
}
