/* Elisa PDV mobile application layer. Desktop styles remain unchanged. */
:root{--eb-mobile-header:60px;--eb-mobile-nav:68px;--eb-safe-top:env(safe-area-inset-top,0px);--eb-safe-bottom:env(safe-area-inset-bottom,0px)}
.eb-mobile-header,.eb-mobile-bottom-nav,.eb-mobile-cart-bar,.eb-mobile-cart-backdrop{display:none}
@media(max-width:767px){
html{width:100%;max-width:100%;overflow-x:hidden;-webkit-text-size-adjust:100%}
body{width:100%;max-width:100%;overflow-x:hidden}
body.eb-mobile-shell{padding-bottom:calc(var(--eb-mobile-nav) + var(--eb-safe-bottom))!important}
body.eb-mobile-keyboard{padding-bottom:var(--eb-safe-bottom)!important}
body.eb-mobile-keyboard .eb-mobile-bottom-nav,body.eb-mobile-keyboard .eb-mobile-cart-bar{display:none!important}
img,video,canvas,svg{max-width:100%;height:auto}
button,.btn,a[role=button],input:not([type=checkbox]):not([type=radio]),select,textarea{min-height:44px}
input:not([type=checkbox]):not([type=radio]),select,textarea{width:100%;max-width:100%;font-size:16px!important}
button,.btn{-webkit-tap-highlight-color:transparent;touch-action:manipulation}
.eb-mobile-header{position:sticky;top:0;z-index:1450;display:grid;grid-template-columns:48px minmax(0,1fr) 44px 44px;align-items:center;gap:2px;min-height:calc(var(--eb-mobile-header) + var(--eb-safe-top));padding:var(--eb-safe-top) 8px 0;background:#101010;border-bottom:1px solid #303030;color:#fff;box-shadow:0 5px 18px #0007}
.eb-mobile-header button,.eb-mobile-header a{width:44px;height:44px;min-height:44px;padding:0;display:grid;place-items:center;border:0;border-radius:11px;background:transparent;color:#fff;text-decoration:none;font-size:21px}
.eb-mobile-header button:active,.eb-mobile-header a:active{background:#292929}
.eb-mobile-brand{min-width:0;padding:0 7px}.eb-mobile-brand strong{display:block;color:var(--souto-primary,#0B6BFF)!important;font-size:16px;line-height:1.15;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.eb-mobile-brand small{display:block;margin-top:3px;color:#aaa!important;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.eb-mobile-icon-badge{position:absolute;right:4px;top:4px;min-width:17px;height:17px;padding:0 4px;display:none;place-items:center;border-radius:20px;background:#e52535;color:#fff;font-size:10px;font-weight:900}.eb-mobile-icon-badge.on{display:grid}.eb-mobile-header-action{position:relative}
body.eb-has-sidebar>.topbar,body.eb-has-sidebar>.pos-topbar{display:none!important}body.eb-has-sidebar .eb-menu-toggle{display:none!important}
body.eb-has-sidebar>.container,body.eb-has-sidebar>main{padding-left:12px!important;padding-right:12px!important}
body.eb-has-sidebar .eb-sidebar{top:0;height:100dvh;padding-top:max(8px,var(--eb-safe-top));z-index:1600}body.eb-has-sidebar .eb-sidebar-brand{margin-top:0!important;min-height:62px}body.eb-has-sidebar .eb-sidebar-identity{min-height:64px;margin-bottom:6px}body.eb-sidebar-open .eb-sidebar{transform:translateX(0)}body.eb-sidebar-open .eb-sidebar-overlay{z-index:1599}
.eb-mobile-bottom-nav{position:fixed;left:0;right:0;bottom:0;z-index:1400;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));min-height:calc(var(--eb-mobile-nav) + var(--eb-safe-bottom));padding:5px 5px var(--eb-safe-bottom);background:#111e;border-top:1px solid #383838;backdrop-filter:blur(14px);box-shadow:0 -8px 25px #0008}
.eb-mobile-bottom-nav a,.eb-mobile-bottom-nav button{min-width:0;min-height:56px;padding:5px 2px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;border:0;border-radius:10px;background:transparent;color:#c9c9c9;text-decoration:none;font-size:10px;font-weight:750}.eb-mobile-bottom-nav .eb-nav-icon{font-size:21px;line-height:1}.eb-mobile-bottom-nav :is(a[aria-current=page],button[aria-expanded=true]){background:#2b2611;color:var(--souto-primary,#0B6BFF)}
main{min-width:0}:is(.container,.orders-wrap,.settings-page,.customers-page,.stock-page,.report-wrap,.buy-page,.notices-page){width:100%!important;max-width:100%!important;padding:14px 12px calc(22px + var(--eb-safe-bottom))!important}
:is(.stats,.summary-grid,.dashboard-metrics,.cash-grid,.buy-kpis,.stock-kpis){gap:10px!important}:is(.stats,.summary-grid,.dashboard-metrics,.cash-grid,.buy-kpis,.stock-kpis)>*{min-width:0}:is(.stats,.summary-grid,.dashboard-metrics,.cash-grid,.buy-kpis,.stock-kpis) :is(b,strong,.value){overflow-wrap:anywhere}
:is(.actions,.toolbar,.filters,.report-actions,.settings-actions,.buy-actions){max-width:100%}:is(.actions,.report-actions,.settings-actions,.buy-actions)>.btn{min-height:46px}
.eb-mobile-card-table{display:block!important;width:100%!important;min-width:0!important;border:0!important;background:transparent!important}.eb-mobile-card-table thead{display:none!important}.eb-mobile-card-table tbody{display:grid!important;gap:10px!important;width:100%}.eb-mobile-card-table tr{display:block!important;width:100%;padding:14px!important;border:1px solid var(--elisa-border,#333)!important;border-radius:14px!important;background:var(--elisa-surface,#171717)!important}.eb-mobile-card-table td{display:grid!important;grid-template-columns:minmax(92px,38%) minmax(0,1fr);gap:10px;align-items:start;width:100%!important;min-width:0!important;padding:8px 0!important;border:0!important;white-space:normal!important;overflow-wrap:anywhere;text-align:right!important}.eb-mobile-card-table td+td{border-top:1px solid #ffffff0d!important}.eb-mobile-card-table td:before{content:attr(data-mobile-label);color:var(--elisa-muted,#aaa);font-size:11px;font-weight:800;text-align:left;text-transform:uppercase;letter-spacing:.04em}.eb-mobile-card-table td[colspan]{display:block!important;text-align:center!important}.eb-mobile-card-table td[colspan]:before{display:none}.eb-mobile-card-table td :is(.row-actions,.actions){justify-content:flex-end}
.modal,.overlay,.stock-modal,.buy-modal,.chat-modal,.elisa-urgent-overlay{padding:0!important;align-items:end!important}
:is(.modal-card,.modal .box,.stock-modal-card,.buy-dialog,.chat-dialog,.elisa-urgent-card){width:100%!important;max-width:100%!important;max-height:100dvh!important;margin:0!important;border-radius:18px 18px 0 0!important;padding:20px 16px calc(18px + var(--eb-safe-bottom))!important;overflow-y:auto!important;overscroll-behavior:contain}
.checkout-modal .checkout-panel.modal-card,.checkout-modal .checkout-panel{padding:0!important;overflow:hidden!important;overscroll-behavior:none!important;border-radius:0!important}
:is(.modal-card,.modal .box,.stock-modal-card,.buy-dialog,.chat-dialog,.elisa-urgent-card) :is(.close,.x,.modal-close){position:sticky!important;float:right;top:0;z-index:4;min-width:44px;min-height:44px}
.modal-actions{position:sticky;bottom:calc(-18px - var(--eb-safe-bottom));z-index:3;margin-left:-16px!important;margin-right:-16px!important;padding:12px 16px calc(12px + var(--eb-safe-bottom))!important;background:#171717f2;border-top:1px solid #333;backdrop-filter:blur(10px)}.modal-actions{display:grid!important;grid-template-columns:1fr!important;gap:9px!important}.modal-actions>*{width:100%!important}.customer-form,.pdv-custom-grid,.form-grid,.fields,.finance-form{grid-template-columns:minmax(0,1fr)!important}.customer-form .wide,.wide{grid-column:auto!important}
body.pos-page{padding-bottom:calc(var(--eb-mobile-nav) + 78px + var(--eb-safe-bottom))!important}body.pos-page .pos{display:block!important;padding:10px!important;min-height:0!important}body.pos-page .catalog{width:100%!important;margin:0!important;padding:12px!important}body.pos-page .pos-head{margin-bottom:10px!important}body.pos-page .pos-categories{margin-inline:-2px;padding-bottom:10px;scroll-snap-type:x proximity}body.pos-page .pos-category{scroll-snap-align:start;min-height:44px}body.pos-page .product-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important}body.pos-page .product-card{min-width:0!important;min-height:200px!important;padding:10px!important}body.pos-page .product-card :is(img,>div){object-fit:cover}
body.pos-page .mobile-cart-toggle{display:flex!important;left:10px!important;right:10px!important;bottom:calc(var(--eb-mobile-nav) + 8px + var(--eb-safe-bottom))!important;width:auto!important;justify-content:center!important;border-radius:15px!important;background:var(--souto-primary,#0B6BFF)!important;color:#111!important;z-index:1450!important}
body.pos-page.mobile-cart-open .mobile-cart-toggle{display:none!important}
body.pos-page.mobile-cart-open :is(.chat-global-button,.chat-floating-panel,.elisa-notice-bell),body.pos-page.modal-open :is(.chat-global-button,.chat-floating-panel,.elisa-notice-bell,.eb-mobile-bottom-nav,.mobile-cart-toggle){display:none!important}
html body.pos-page.mobile-cart-open aside.cart{position:fixed!important;top:calc(var(--eb-mobile-header) + var(--eb-safe-top) + 8px)!important;right:8px!important;bottom:calc(var(--eb-mobile-nav) + var(--eb-safe-bottom) + 8px)!important;left:8px!important;inset:calc(var(--eb-mobile-header) + var(--eb-safe-top) + 8px) 8px calc(var(--eb-mobile-nav) + var(--eb-safe-bottom) + 8px)!important;width:auto!important;height:auto!important;max-height:none!important;margin:0!important;padding:14px!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;border-radius:18px!important;transform:none!important;opacity:1!important;visibility:visible!important;pointer-events:auto!important;z-index:1550!important}
html body.pos-page.mobile-cart-open .cart .pdv-cart-scroll{display:flex!important;flex:1 1 auto!important;min-height:0!important;flex-direction:column!important;overflow-y:auto!important;overflow-x:hidden!important;padding-right:3px}
html body.pos-page.mobile-cart-open .cart .cart-items{flex:0 0 auto!important;min-height:70px!important;max-height:none!important;overflow:visible!important}
html body.pos-page.mobile-cart-open .cart :is(.cart-head,.order-type,.totals,.checkout){flex:0 0 auto!important}
html body.pos-page.mobile-cart-open .cart .checkout{position:sticky!important;bottom:0!important;z-index:3!important;min-height:52px!important;margin-top:10px!important}
body.pos-page .payment-card,body.pos-page .checkout-panel{width:100%!important;height:100dvh!important;max-height:100dvh!important;border-radius:0!important;padding-bottom:0!important;display:flex!important;flex-direction:column!important;overflow:hidden!important}
body.pos-page .checkout-panel .checkout-head,body.pos-page .checkout-panel .checkout-footer{flex:0 0 auto!important}
body.pos-page .checkout-panel .checkout-body{flex:1 1 auto!important;min-height:0!important;overflow:auto!important;-webkit-overflow-scrolling:touch}
body.pos-page .checkout-panel .checkout-footer{position:relative!important;bottom:auto!important;margin:0!important;padding:12px 16px calc(12px + var(--eb-safe-bottom))!important;z-index:6!important;background:#0f1216!important;border-top:1px solid #383b42}
body.pos-page .checkout-panel .checkout-footer button{min-height:52px!important;touch-action:manipulation}
body.pos-page .payment-actions,body.pos-page .checkout-methods{grid-template-columns:1fr 1fr!important}body.pos-page .payment-actions .pay,body.pos-page .checkout-method{min-height:72px}body.pos-page .split-grid{grid-template-columns:1fr!important}
body.kds-page{padding-bottom:calc(var(--eb-mobile-nav) + var(--eb-safe-bottom))!important}body.kds-page .kds-topbar{display:none!important}body.kds-page .kds-main{padding:12px!important}body.kds-page .kds-toolbar{align-items:stretch!important}body.kds-page .kds-toolbar-actions{display:grid!important;grid-template-columns:1fr 1fr!important;width:100%}body.kds-page .kds-btn,body.kds-page .kds-action{min-height:48px!important}body.kds-page .kds-summary{grid-template-columns:1fr 1fr!important;gap:8px!important}body.kds-page .kds-grid{grid-template-columns:1fr!important;gap:12px!important}
body:has(.chat-page){padding-bottom:0!important}body:has(.chat-page) .eb-mobile-bottom-nav{display:none}body:has(.chat-page) .eb-mobile-header{position:fixed;left:0;right:0}body:has(.chat-page) .chat-page{height:calc(100dvh - var(--eb-mobile-header) - var(--eb-safe-top))!important;margin-top:calc(var(--eb-mobile-header) + var(--eb-safe-top))}.chat-message-actions{max-height:40px!important;opacity:1!important;margin-top:5px}
.elisa-notice-bell,.chat-global-button{bottom:calc(var(--eb-mobile-nav) + 10px + var(--eb-safe-bottom))!important}.elisa-notice-toast,.chat-global-toast{bottom:calc(var(--eb-mobile-nav) + 76px + var(--eb-safe-bottom))!important}
}
@media(max-width:359px){body.pos-page .product-grid{grid-template-columns:1fr!important}:is(.stats,.summary-grid,.dashboard-metrics,.cash-grid,.buy-kpis,.stock-kpis){grid-template-columns:1fr!important}.eb-mobile-header{grid-template-columns:44px minmax(0,1fr) 40px 40px;padding-inline:4px}}
@media(min-width:768px) and (max-width:1023px){body.eb-has-sidebar{padding-left:0!important}:is(.container,.orders-wrap,.settings-page,.customers-page,.stock-page,.report-wrap,.buy-page){max-width:100%;padding-inline:20px!important}body.pos-page .product-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}body.kds-page .kds-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}:is(.modal-card,.modal .box,.stock-modal-card,.buy-dialog,.chat-dialog){max-height:calc(100dvh - 32px)!important;overflow:auto!important}}
@media(orientation:landscape) and (max-height:560px) and (max-width:1023px){body.pos-page .cart{max-height:96dvh!important;height:96dvh!important}body.kds-page .kds-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(prefers-reduced-motion:reduce){body.pos-page .cart{transition:none!important}}

/* Camada extra: o celular precisa enxergar Caixa, estoque e formulários sem cortar a tela. */
@media(max-width:767px){
html body.pos-page.eb-has-sidebar>.pos-topbar{
  display:flex!important;position:sticky;top:calc(var(--eb-mobile-header) + var(--eb-safe-top));z-index:1440;
  height:auto!important;min-height:56px!important;padding:8px 10px!important;gap:0!important;align-items:center!important;
  background:#111!important;border-bottom:1px solid #303030!important;box-shadow:none!important
}
html body.pos-page.eb-has-sidebar>.pos-topbar>a,
html body.pos-page.eb-has-sidebar>.pos-topbar>strong{display:none!important}
/* Uma linha full-width — anula max-width:72vw e ícones 40px do pdv-ui-v3 */
html body.pos-page .pos-nav-actions,
html body.pos-page .pos-topbar .pos-nav-actions{
  display:grid!important;grid-auto-flow:column!important;grid-auto-columns:minmax(0,1fr)!important;
  grid-template-columns:none!important;flex:1 1 auto!important;
  width:100%!important;max-width:none!important;min-width:0!important;margin:0!important;padding:0!important;
  gap:8px!important;overflow:visible!important;align-items:stretch!important
}
html body.pos-page .pos-nav-actions .pos-nav-icon,
html body.pos-page .pos-nav-actions>a,
html body.pos-page .pos-nav-actions>button,
html body.pos-page .pos-topbar #registerButton,
html body.pos-page .pos-topbar #registerButton.btn{
  width:100%!important;min-width:0!important;max-width:none!important;
  min-height:48px!important;height:48px!important;padding:0!important;margin:0!important;gap:0!important;
  display:grid!important;place-items:center!important;justify-content:center!important;
  text-align:center;font-size:22px!important;line-height:1!important;white-space:nowrap!important;
  border-radius:12px!important;box-sizing:border-box!important;overflow:hidden!important
}
html body.pos-page .pos-nav-actions .pos-nav-icon span,
html body.pos-page .pos-nav-actions>a span,
html body.pos-page .pos-nav-actions>button span{
  display:grid!important;place-items:center!important;font-size:22px!important;line-height:1!important;
  margin:0!important;width:auto!important;height:auto!important
}
html body.pos-page .pos-nav-actions .kds-link span{display:grid!important}
html body.pos-page .product-card{min-height:148px!important}
html body.pos-page .cash-lock{margin:8px 10px!important;font-size:14px}
body.eb-mobile-shell :is(.chat-global-button,.elisa-notice-bell){display:none!important}
body.eb-mobile-shell .elisa-app-card,body.eb-mobile-shell .elisa-app-toast{
  bottom:calc(var(--eb-mobile-nav) + 12px + var(--eb-safe-bottom))!important
}
html body.op-stock.eb-has-sidebar .stock-appbar,
html body.op-stock.eb-has-sidebar .stock-side-menu,
html body.op-stock.eb-has-sidebar .stock-menu-overlay{display:none!important}
html body.op-stock .wrap{padding:12px 12px calc(28px + var(--eb-mobile-nav) + var(--eb-safe-bottom))!important}
html body.op-stock .grid,html body.op-stock .stock-summary,html body.op-stock .map-row{grid-template-columns:1fr!important}
html body.op-stock .map-row .btn,html body.op-stock .btn{width:100%!important}
html body.op-stock .items{grid-template-columns:1fr 1fr!important}
html body.op-stock table.eb-mobile-card-table{min-width:0!important}
html body .stock-page{padding-bottom:calc(28px + var(--eb-mobile-nav) + var(--eb-safe-bottom))!important}
html body .stock-page .stock-head,html body .stock-page .stock-head-actions{flex-direction:column;align-items:stretch}
html body .stock-page .stock-search,html body .stock-page .stock-head-actions a{width:100%}
html body .stock-page .stock-kpis,html body .stock-page .stock-command{grid-template-columns:1fr 1fr!important}
html body .stock-page .stock-tabs{overflow-x:auto;flex-wrap:nowrap;-webkit-overflow-scrolling:touch}
html body .stock-page .stock-tab{flex:0 0 auto}
html body .stock-page .stock-table.eb-mobile-card-table,html body .cash-history table.eb-mobile-card-table{min-width:0!important}
html body .cash-history{overflow:auto!important;-webkit-overflow-scrolling:touch}
html body .cash-header,html body .cash-history-head,html body .history-report-head{flex-direction:column;align-items:stretch}
html body .cash-chips button{min-height:44px;flex:1 1 calc(50% - 8px)}
html body .history-report-back{padding:0!important;align-items:end!important}
html body .history-report{width:100%!important;max-width:100%!important;max-height:92dvh!important;border-radius:18px 18px 0 0!important}
html body .history-report-grid{grid-template-columns:1fr 1fr!important}
html body .history-report-actions{display:grid!important;grid-template-columns:1fr 1fr;width:100%}
html body .dashboard-shortcuts{display:grid!important;grid-template-columns:1fr 1fr}
html body .dashboard-shortcuts a{justify-content:center;text-align:center}
html body .orders-wrap,html body .buy-page,html body .notices-page,html body.tables-page .tables-shell{
  padding-bottom:calc(24px + var(--eb-mobile-nav) + var(--eb-safe-bottom))!important
}
html body .orders-actions,html body .buy-actions{display:grid!important;grid-template-columns:1fr;width:100%}
html body .orders-btn,html body .buy-actions button,html body .buy-actions a{width:100%;justify-content:center}
#registerModal{
  width:100%!important;max-width:100%!important;max-height:92dvh!important;margin:auto 0 0!important;
  border-radius:18px 18px 0 0!important
}
#registerModal .register-actions{display:grid!important;grid-template-columns:1fr!important}
#registerModal .register-actions>*{width:100%!important;min-height:48px}
html body :is(.modal,.overlay,.checkout-modal){align-items:end!important;padding:0!important}
html body .checkout-panel{width:100%!important;max-width:100%!important;border-radius:0!important}
html body.pos-page.modal-open .checkout-modal{z-index:10050!important}
/* Skip link não pode aparecer no fluxo visual do PDV mobile */
html body.pos-page .eb-skip-link{
  position:absolute!important;left:-9999px!important;top:auto!important;width:1px!important;height:1px!important;
  overflow:hidden!important;clip:rect(0,0,0,0)!important
}
html body.pos-page .eb-skip-link:focus{
  left:12px!important;top:calc(var(--eb-mobile-header) + var(--eb-safe-top) + 8px)!important;
  width:auto!important;height:auto!important;clip:auto!important;z-index:20000!important;
  padding:10px 14px!important;background:#fbbf24!important;color:#111!important;border-radius:10px!important
}
}
@media(max-width:560px){
html body.pos-page .pos-nav-actions,
html body.pos-page .pos-topbar .pos-nav-actions{
  display:grid!important;grid-auto-flow:column!important;grid-auto-columns:minmax(0,1fr)!important;
  grid-template-columns:none!important;max-width:none!important;width:100%!important
}
html body.pos-page .pos-nav-actions .pos-nav-icon{width:100%!important;height:48px!important;min-width:0!important}
}
@media(max-width:420px){
html body.op-stock .items,html body .stock-page .stock-kpis,html body .stock-page .stock-command,html body .dashboard-shortcuts{grid-template-columns:1fr!important}
}
