@import url("https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@400;600;700;800;900&display=swap");
/* SGMax Fiscal - Interface Harmony v16.12.0 */
:root{
  --sgmax-primary:#0f9b95;
  --sgmax-primary-dark:#0c7f7a;
  --sgmax-primary-soft:#eaf8f6;
  --sgmax-bg:#f4f6f8;
  --sgmax-surface:#ffffff;
  --sgmax-border:#dfe6ea;
  --sgmax-text:#233243;
  --sgmax-muted:#6b7a8b;
  --sgmax-danger:#ef4444;
  --sgmax-danger-dark:#dc2626;
  --sgmax-warning:#f7c948;
  --sgmax-warning-dark:#f4b400;
  --sgmax-success:#66bb6a;
  --sgmax-success-dark:#43a047;
  --sgmax-info:#22a6f2;
  --sgmax-shadow:0 10px 30px rgba(15, 23, 42, .08);
  --sgmax-shadow-soft:0 6px 18px rgba(15, 23, 42, .05);
  --sgmax-radius:18px;
}
html, body, body.sgmax-interface-real, body.sgmax-interface-real .wrapper, body.sgmax-interface-real .content-wrapper{
  background:var(--sgmax-bg)!important;
  color:var(--sgmax-text)!important;
  font-family:"Nunito Sans", "Segoe UI", Arial, sans-serif !important;
}
body.sgmax-interface-real{font-size:15px!important;}
body.sgmax-interface-real h1,body.sgmax-interface-real h2,body.sgmax-interface-real h3,body.sgmax-interface-real h4,body.sgmax-interface-real h5,body.sgmax-interface-real h6,
body.sgmax-interface-real .info-box-text,body.sgmax-interface-real .card-title,body.sgmax-interface-real label,body.sgmax-interface-real .btn{font-family:"Nunito Sans", "Segoe UI", Arial, sans-serif !important;}
body.sgmax-interface-real a{color:var(--sgmax-primary)}
body.sgmax-interface-real .main-header.navbar{
  background:linear-gradient(90deg,var(--sgmax-primary),#1098ad)!important;
  border-bottom:0!important;
  min-height:64px!important;
  box-shadow:0 8px 18px rgba(15,155,149,.22)!important;
}
body.sgmax-interface-real .main-header .nav-link,
body.sgmax-interface-real .main-header .navbar-nav .nav-item{color:#fff!important;font-weight:800!important;}
body.sgmax-interface-real .main-header .nav-link i{color:#fff!important;}
body.sgmax-interface-real .main-header .nav-link:hover{opacity:.92!important;}
body.sgmax-interface-real .main-sidebar{
  background:#fff!important;
  border-right:1px solid var(--sgmax-border)!important;
  box-shadow:4px 0 22px rgba(15,23,42,.05)!important;
}
body.sgmax-interface-real .main-sidebar .brand-link{
  background:#fff!important;
  border-bottom:1px solid var(--sgmax-border)!important;
  padding:.85rem .5rem!important;
  min-height:72px!important;
}
body.sgmax-interface-real .main-sidebar .brand-link img{width:auto!important;max-height:54px!important;}
body.sgmax-interface-real .sidebar{padding:12px 10px 18px!important;}
body.sgmax-interface-real .nav-sidebar .nav-header{
  color:#8894a3!important; font-size:.78rem!important; font-weight:900!important;
  letter-spacing:.08em!important; text-transform:uppercase!important; padding:16px 14px 8px!important; margin:0!important;
}
body.sgmax-interface-real .nav-sidebar .nav-item>.nav-link{
  border-radius:14px!important; color:#506072!important; margin:4px 2px!important; padding:11px 14px!important;
  font-size:15px!important; font-weight:800!important; transition:all .18s ease!important;
}
body.sgmax-interface-real .nav-sidebar .nav-item>.nav-link .nav-icon{color:#7b8794!important; width:24px!important; text-align:center!important; font-size:1rem!important;}
body.sgmax-interface-real .nav-sidebar .nav-item>.nav-link:hover{background:var(--sgmax-primary-soft)!important; color:var(--sgmax-primary-dark)!important; transform:translateX(2px)!important;}
body.sgmax-interface-real .nav-sidebar .nav-item>.nav-link:hover .nav-icon{color:var(--sgmax-primary)!important;}
body.sgmax-interface-real .nav-sidebar .nav-item>.nav-link.active,
body.sgmax-interface-real .sidebar-light-info .nav-sidebar>.nav-item>.nav-link.active{
  background:linear-gradient(90deg,var(--sgmax-primary),var(--sgmax-primary-dark))!important;
  color:#fff!important; box-shadow:0 10px 22px rgba(15,155,149,.22)!important;
}
body.sgmax-interface-real .nav-sidebar .nav-item>.nav-link.active .nav-icon{color:#fff!important;}
body.sgmax-interface-real .content-wrapper>.content{padding-top:16px!important;}
body.sgmax-interface-real .content-wrapper .container-fluid{padding-left:18px!important;padding-right:18px!important;}
body.sgmax-interface-real .breadcrumb{background:transparent!important;margin-bottom:0!important;}
body.sgmax-interface-real .breadcrumb-item.active{font-weight:800!important;color:#7b8794!important;}
body.sgmax-interface-real .text-muted{color:var(--sgmax-muted)!important;}
body.sgmax-interface-real .card,
body.sgmax-interface-real .info-box,
body.sgmax-interface-real .small-box,
body.sgmax-interface-real .modal-content,
body.sgmax-interface-real .login-box .card{
  border:1px solid var(--sgmax-border)!important;
  border-radius:var(--sgmax-radius)!important;
  box-shadow:var(--sgmax-shadow)!important;
  background:#fff!important;
  overflow:hidden!important;
}
body.sgmax-interface-real .card-header{background:#fff!important;border-bottom:1px solid #ecf1f4!important;padding:1rem 1.2rem!important;}
body.sgmax-interface-real .card-title, body.sgmax-interface-real .card-header h6{font-weight:900!important;color:var(--sgmax-text)!important;}
body.sgmax-interface-real .form-control,
body.sgmax-interface-real .custom-select,
body.sgmax-interface-real .select2-container--bootstrap4 .select2-selection,
body.sgmax-interface-real .select2-container .select2-selection--single{
  border:1px solid #d3dde4!important;
  border-radius:14px!important;
  min-height:46px!important;
  box-shadow:none!important;
  color:var(--sgmax-text)!important;
  background:#fff!important;
}
body.sgmax-interface-real .form-control:focus,
body.sgmax-interface-real .custom-select:focus,
body.sgmax-interface-real .select2-container--focus .select2-selection{
  border-color:var(--sgmax-primary)!important;
  box-shadow:0 0 0 .18rem rgba(15,155,149,.12)!important;
}
body.sgmax-interface-real label{font-weight:900!important;font-size:1rem!important;color:#243344!important;margin-bottom:.45rem!important;}
body.sgmax-interface-real .btn{
  border-radius:14px!important; font-weight:900!important; letter-spacing:.01em!important; padding:.68rem 1rem!important; border-width:1px!important;
}
body.sgmax-interface-real .btn-success,
body.sgmax-interface-real .btn-primary,
body.sgmax-interface-real .btn-info{
  background:linear-gradient(90deg,var(--sgmax-primary),var(--sgmax-primary-dark))!important;
  border-color:transparent!important; color:#fff!important;
}
body.sgmax-interface-real .btn-secondary{background:#7d8790!important;border-color:#7d8790!important;color:#fff!important;}
body.sgmax-interface-real .btn-warning{background:#ffc928!important;border-color:#ffc928!important;color:#334155!important;}
body.sgmax-interface-real .btn-danger{background:linear-gradient(90deg,var(--sgmax-danger),var(--sgmax-danger-dark))!important;border-color:transparent!important;color:#fff!important;}
body.sgmax-interface-real .btn-outline-danger{border-color:#f2b6b6!important;color:var(--sgmax-danger-dark)!important;background:#fff!important;}
body.sgmax-interface-real .btn:hover{filter:brightness(.98)!important;box-shadow:var(--sgmax-shadow-soft)!important;}
body.sgmax-interface-real .main-footer{background:#fff!important;border-top:1px solid var(--sgmax-border)!important;color:#6b7a8b!important;}
body.sgmax-interface-real .table thead th{background:#f0faf8!important;color:#243344!important;border-bottom:1px solid var(--sgmax-border)!important;font-weight:900!important;}
body.sgmax-interface-real .table td,body.sgmax-interface-real .table th{vertical-align:middle!important;border-top:1px solid #edf2f5!important;}
body.sgmax-interface-real .table-striped tbody tr:nth-of-type(odd){background:#fbfdfd!important;}
body.sgmax-interface-real .table-hover tbody tr:hover{background:#f1faf8!important;}

/* Login */
body.sgmax-interface-real.sgmax-login-page{background:linear-gradient(135deg,#eef7f7 0%,#dff3ef 40%,#f4f7f8 100%)!important;}
body.sgmax-interface-real.sgmax-login-page .login-box{width:380px!important;max-width:92vw!important;}
body.sgmax-interface-real.sgmax-login-page .login-card-body{padding:2rem!important;}
body.sgmax-interface-real.sgmax-login-page .login-logo span{font-size:2rem!important;color:var(--sgmax-primary-dark)!important;font-weight:900!important;}
body.sgmax-interface-real.sgmax-login-page .login-box-msg{font-size:1rem!important;color:var(--sgmax-muted)!important;}
body.sgmax-interface-real.sgmax-login-page .input-group-text{border-radius:0 14px 14px 0!important;background:#f5fbfa!important;border:1px solid #d3dde4!important;color:var(--sgmax-primary)!important;}
body.sgmax-interface-real.sgmax-login-page .sgmax-login-btn{height:50px!important;font-size:1rem!important;}

/* Dashboard fiscal home */
body.sgmax-interface-real .sgmax-dashboard-home .row:first-child h6{font-size:2rem!important;font-weight:900!important;color:#243344!important;}
body.sgmax-interface-real .sgmax-dashboard-home .sgmax-filter-card{padding:0!important;}
body.sgmax-interface-real .sgmax-dashboard-home .sgmax-filter-card .card-body{padding:1.25rem!important;}
body.sgmax-interface-real .sgmax-dashboard-home .sgmax-pill-btn{
  border-radius:14px!important; margin:.25rem .3rem .15rem 0!important; min-width:138px!important;
}
body.sgmax-interface-real .sgmax-dashboard-home .sgmax-pill-warning i,
body.sgmax-interface-real .sgmax-dashboard-home .sgmax-pill-warning{color:#334155!important;}
body.sgmax-interface-real .sgmax-dashboard-home .sg-kpi-card{padding:6px!important;min-height:126px!important;}
body.sgmax-interface-real .sgmax-dashboard-home .sg-kpi-card .info-box-icon{
  border-radius:18px!important; width:70px!important; min-width:70px!important; height:70px!important; margin:12px!important; background:#f3f7f9!important;
}
body.sgmax-interface-real .sgmax-dashboard-home .sg-kpi-card .info-box-content{padding:14px 14px 14px 0!important;}
body.sgmax-interface-real .sgmax-dashboard-home .sg-kpi-card .info-box-text{font-size:1.02rem!important;font-weight:900!important;color:#243344!important;white-space:normal!important;}
body.sgmax-interface-real .sgmax-dashboard-home .sg-kpi-card .info-box-number{font-size:1.55rem!important;font-weight:900!important;color:#243344!important;}
body.sgmax-interface-real .sgmax-dashboard-home .sg-kpi-card small{font-weight:800!important;color:#6b7a8b!important;}
body.sgmax-interface-real .sgmax-dashboard-home .sg-kpi-entrada .info-box-icon{background:#ebf9ee!important; box-shadow:inset 0 0 0 1px #d0efda!important;}
body.sgmax-interface-real .sgmax-dashboard-home .sg-kpi-saida .info-box-icon{background:#eef6ff!important; box-shadow:inset 0 0 0 1px #d2e6fd!important;}
body.sgmax-interface-real .sgmax-dashboard-home .sg-kpi-devolucao .info-box-icon{background:#fff7e8!important; box-shadow:inset 0 0 0 1px #f8e2aa!important;}
body.sgmax-interface-real .sgmax-dashboard-home .sg-kpi-nfce .info-box-icon{background:#ebf9fb!important; box-shadow:inset 0 0 0 1px #c5eef1!important;}
body.sgmax-interface-real .sgmax-dashboard-home .sg-result-card{border-radius:20px!important;color:#fff!important;}
body.sgmax-interface-real .sgmax-dashboard-home .sg-result-card .inner h4{font-size:2.1rem!important;font-weight:900!important;}
body.sgmax-interface-real .sgmax-dashboard-home .sg-result-card .inner p{font-size:1rem!important;font-weight:800!important;opacity:.95!important;}
body.sgmax-interface-real .sgmax-dashboard-home .sg-result-card .icon{top:12px!important;font-size:78px!important;opacity:.18!important;right:18px!important;}
body.sgmax-interface-real .sgmax-dashboard-home .sg-result-bruto{background:linear-gradient(90deg,var(--sgmax-primary),#12a8a3)!important;}
body.sgmax-interface-real .sgmax-dashboard-home .sg-result-cancelado{background:linear-gradient(90deg,#f8fafc,#ffffff)!important;color:var(--sgmax-text)!important;}
body.sgmax-interface-real .sgmax-dashboard-home .sg-result-cancelado .icon{color:#cbd5e1!important;opacity:.7!important;}
body.sgmax-interface-real .sgmax-dashboard-home .sg-result-cancelado .inner p,body.sgmax-interface-real .sgmax-dashboard-home .sg-result-cancelado .inner h4{color:var(--sgmax-text)!important;}
body.sgmax-interface-real .sgmax-dashboard-home .sg-result-liquido{background:linear-gradient(90deg,#16a7a0,#0f9b95)!important;}
body.sgmax-interface-real .sgmax-dashboard-home .chartjs{min-height:280px!important;}

/* Badges, alerts and widgets */
body.sgmax-interface-real .badge-info,body.sgmax-interface-real .badge-primary,body.sgmax-interface-real .badge-success,
body.sgmax-interface-real .bg-info,body.sgmax-interface-real .bg-primary,body.sgmax-interface-real .bg-success{background-color:var(--sgmax-primary)!important;color:#fff!important;}
body.sgmax-interface-real .alert-success{background:#e8f8f4!important;border-color:#c8ebdf!important;color:#185a4a!important;border-radius:14px!important;}
body.sgmax-interface-real .alert-warning{background:#fff8df!important;border-color:#f9ecb2!important;color:#7a5d00!important;border-radius:14px!important;}
body.sgmax-interface-real .alert-danger{background:#fff0f0!important;border-color:#f3c1c1!important;color:#972d2d!important;border-radius:14px!important;}

/* PDV Rápido */
body.sgmax-interface-real .pdv-wrapper{background:linear-gradient(135deg,#f4f8fa 0%,#eef6f7 100%)!important;color:var(--sgmax-text)!important;min-height:100vh!important;}
body.sgmax-interface-real .pdv-topbar{background:linear-gradient(90deg,var(--sgmax-primary),#1098ad)!important;color:#fff!important;border-radius:22px!important;padding:16px 20px!important;box-shadow:0 14px 30px rgba(15,155,149,.24)!important;}
body.sgmax-interface-real .pdv-topbar h4, body.sgmax-interface-real .pdv-topbar .printer-label{color:#fff!important;}
body.sgmax-interface-real .pdv-card, body.sgmax-interface-real .shortcut-box, body.sgmax-interface-real .total-box{background:#fff!important;border:1px solid var(--sgmax-border)!important;border-radius:20px!important;box-shadow:var(--sgmax-shadow)!important;}
body.sgmax-interface-real .total-box{border:2px solid rgba(15,155,149,.22)!important;}
body.sgmax-interface-real .total-label{color:#7b8794!important;font-size:1rem!important;font-weight:900!important;}
body.sgmax-interface-real .total-value{font-size:3rem!important;color:var(--sgmax-primary)!important;font-weight:900!important;}
body.sgmax-interface-real .shortcut-main{height:54px!important;font-size:1rem!important;}
body.sgmax-interface-real .atalhos-title{font-weight:900!important;color:#243344!important;}
body.sgmax-interface-real .atalho-line{color:#445160!important;}
body.sgmax-interface-real .atalho-line span{background:var(--sgmax-primary)!important;color:#fff!important;border-radius:999px!important;padding:5px 10px!important;min-width:86px!important;display:inline-block!important;text-align:center!important;}
body.sgmax-interface-real .printer-ok{background:#e9f8ef!important;color:#0e7445!important;}
body.sgmax-interface-real .printer-bad{background:#ffe9e9!important;color:#9d1c1c!important;}
body.sgmax-interface-real .printer-warn{background:#fff5d8!important;color:#8b6500!important;}

/* PDV Mobile */
@media(max-width:768px){
  body.sgmax-interface-real .main-header{display:flex!important;}
  body.sgmax-interface-real .content-wrapper .container-fluid{padding-left:12px!important;padding-right:12px!important;}
  body.sgmax-interface-real .sgmax-dashboard-home .row:first-child h6{font-size:1.45rem!important;}
  body.sgmax-interface-real .sgmax-dashboard-home .sgmax-pill-btn{display:block!important;width:100%!important;min-width:0!important;}
  body.sgmax-interface-real .sgmax-dashboard-home .sg-kpi-card .info-box-content{padding-right:12px!important;}
  body.sgmax-interface-real .sgmax-dashboard-home .sg-result-card .inner h4{font-size:1.75rem!important;}
  body.sgmax-interface-real .pdv-mobile-app .pm-top{background:linear-gradient(90deg,var(--sgmax-primary),#1098ad)!important;color:#fff!important;border-radius:0 0 22px 22px!important;box-shadow:0 12px 28px rgba(15,155,149,.26)!important;}
  body.sgmax-interface-real .pdv-mobile-app .pm-top h1, body.sgmax-interface-real .pdv-mobile-app .pm-total{color:#fff!important;}
  body.sgmax-interface-real .pdv-mobile-app .pm-card, body.sgmax-interface-real .pdv-mobile-app .pm-sheet, body.sgmax-interface-real .pdv-mobile-app .pm-bottom{background:#fff!important;border:1px solid var(--sgmax-border)!important;border-radius:20px!important;box-shadow:var(--sgmax-shadow)!important;}
  body.sgmax-interface-real .pdv-mobile-app .pm-btn, body.sgmax-interface-real .pdv-mobile-app .pm-payment{border-radius:16px!important;font-weight:900!important;}
  body.sgmax-interface-real .pdv-mobile-app .pm-payment.btn-success,
  body.sgmax-interface-real .pdv-mobile-app .pm-payment.btn-info,
  body.sgmax-interface-real .pdv-mobile-app .pm-payment.btn-primary{background:linear-gradient(90deg,var(--sgmax-primary),var(--sgmax-primary-dark))!important;border-color:transparent!important;}
  body.sgmax-interface-real .pdv-mobile-app .pm-payment.btn-warning{background:#ffc928!important;color:#243344!important;border-color:#ffc928!important;}
  body.sgmax-interface-real .pdv-mobile-app .pm-status{background:rgba(255,255,255,.18)!important;border:1px solid rgba(255,255,255,.25)!important;}
  body.sgmax-interface-real .pdv-mobile-app .pm-step{color:#6b7a8b!important;}
  body.sgmax-interface-real .pdv-mobile-app .pm-input, body.sgmax-interface-real .pdv-mobile-app .pm-search{border:1px solid #d3dde4!important;}
  body.sgmax-interface-real .pdv-mobile-app .pm-product{border-radius:16px!important;box-shadow:none!important;}
}


/* =========================================================
   SGMax Fiscal - Login split green v16.12
   ========================================================= */
body.sgmax-interface-real.sgmax-login-split-page{
  min-height:100vh!important;
  margin:0!important;
  padding:0!important;
  overflow-x:hidden!important;
  background:#ffffff!important;
}
body.sgmax-interface-real.sgmax-login-split-page .sgmax-login-layout{
  min-height:100vh!important;
  width:100%!important;
  display:grid!important;
  grid-template-columns: 1.04fr .96fr!important;
  background:#fff!important;
}
body.sgmax-interface-real.sgmax-login-split-page .sgmax-login-left{
  background:
    radial-gradient(circle at 18% 14%, rgba(255,255,255,.12), transparent 28%),
    radial-gradient(circle at 78% 82%, rgba(255,255,255,.10), transparent 32%),
    linear-gradient(135deg,#0f9b95 0%, #0b8f87 48%, #078077 100%)!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:42px 24px!important;
  color:#fff!important;
}
body.sgmax-interface-real.sgmax-login-split-page .sgmax-login-content{
  width:100%!important;
  max-width:440px!important;
}
body.sgmax-interface-real.sgmax-login-split-page .sgmax-login-brand{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:14px!important;
  margin-bottom:28px!important;
  color:#fff!important;
}
body.sgmax-interface-real.sgmax-login-split-page .sgmax-login-brand-mark{
  width:58px!important;
  height:58px!important;
  border-radius:18px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  font-size:44px!important;
  line-height:1!important;
  font-weight:900!important;
  background:rgba(255,255,255,.14)!important;
  border:1px solid rgba(255,255,255,.28)!important;
  box-shadow:0 14px 30px rgba(0,0,0,.12)!important;
}
body.sgmax-interface-real.sgmax-login-split-page .sgmax-login-brand h1{
  color:#fff!important;
  font-size:2.2rem!important;
  line-height:1!important;
  margin:0!important;
  font-weight:900!important;
  letter-spacing:.01em!important;
}
body.sgmax-interface-real.sgmax-login-split-page .sgmax-login-brand p{
  margin:5px 0 0!important;
  color:rgba(255,255,255,.86)!important;
  font-size:.95rem!important;
  font-weight:700!important;
}
body.sgmax-interface-real.sgmax-login-split-page .sgmax-login-card{
  background:#fff!important;
  border-radius:12px!important;
  padding:24px!important;
  box-shadow:0 20px 45px rgba(0,0,0,.18)!important;
  border:1px solid rgba(255,255,255,.22)!important;
}
body.sgmax-interface-real.sgmax-login-split-page .sgmax-login-card-title{
  margin-bottom:18px!important;
}
body.sgmax-interface-real.sgmax-login-split-page .sgmax-login-card-title h2{
  font-size:1.12rem!important;
  margin:0!important;
  color:#132536!important;
  font-weight:900!important;
}
body.sgmax-interface-real.sgmax-login-split-page .sgmax-login-card-title span{
  display:block!important;
  margin-top:4px!important;
  color:#6b7a8b!important;
  font-weight:700!important;
  font-size:.92rem!important;
}
body.sgmax-interface-real.sgmax-login-split-page .sgmax-input-group .form-control{
  height:48px!important;
  border-radius:10px 0 0 10px!important;
  border:1px solid #d7e2e8!important;
  background:#f8fbfc!important;
  color:#1f2d3d!important;
  font-weight:700!important;
  font-size:.98rem!important;
}
body.sgmax-interface-real.sgmax-login-split-page .sgmax-input-group .input-group-text{
  width:48px!important;
  justify-content:center!important;
  border-radius:0 10px 10px 0!important;
  border:1px solid #d7e2e8!important;
  border-left:0!important;
  background:#edf8f6!important;
  color:#0f9b95!important;
}
body.sgmax-interface-real.sgmax-login-split-page .sgmax-input-group .form-control:focus{
  background:#fff!important;
  border-color:#0f9b95!important;
  box-shadow:none!important;
}
body.sgmax-interface-real.sgmax-login-split-page .sgmax-login-btn{
  height:50px!important;
  border-radius:10px!important;
  margin-top:8px!important;
  background:linear-gradient(90deg,#2ed66f,#25c864)!important;
  border:0!important;
  color:#fff!important;
  font-size:1rem!important;
  font-weight:900!important;
  box-shadow:0 12px 24px rgba(37,200,100,.22)!important;
}
body.sgmax-interface-real.sgmax-login-split-page .sgmax-login-links{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  flex-direction:column!important;
  gap:12px!important;
  margin-top:28px!important;
  color:#fff!important;
  font-weight:800!important;
}
body.sgmax-interface-real.sgmax-login-split-page .sgmax-login-links span{
  color:#fff!important;
  text-shadow:0 3px 12px rgba(0,0,0,.12)!important;
}
body.sgmax-interface-real.sgmax-login-split-page .sgmax-login-links i{
  margin-right:8px!important;
  color:#fff!important;
}
body.sgmax-interface-real.sgmax-login-split-page .sgmax-login-right{
  background:#fff!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:42px 24px!important;
}
body.sgmax-interface-real.sgmax-login-split-page .sgmax-login-illustration{
  width:100%!important;
  max-width:560px!important;
  text-align:center!important;
  color:#152536!important;
}
body.sgmax-interface-real.sgmax-login-split-page .sgmax-illustration-badge{
  display:inline-flex!important;
  align-items:center!important;
  gap:10px!important;
  background:#effaf8!important;
  color:#08746f!important;
  border:1px solid #cdeee9!important;
  border-radius:999px!important;
  padding:10px 16px!important;
  font-weight:900!important;
  margin-bottom:16px!important;
}
body.sgmax-interface-real.sgmax-login-split-page .sgmax-key-illustration{
  width:min(560px, 92%)!important;
  height:auto!important;
  display:block!important;
  margin:0 auto!important;
}
body.sgmax-interface-real.sgmax-login-split-page .sgmax-login-illustration h3{
  margin:0!important;
  color:#172b3a!important;
  font-size:1.55rem!important;
  font-weight:900!important;
}
body.sgmax-interface-real.sgmax-login-split-page .sgmax-login-illustration p{
  max-width:430px!important;
  margin:10px auto 0!important;
  color:#6b7a8b!important;
  font-size:1rem!important;
  font-weight:700!important;
}
@media(max-width: 991px){
  body.sgmax-interface-real.sgmax-login-split-page .sgmax-login-layout{
    grid-template-columns:1fr!important;
  }
  body.sgmax-interface-real.sgmax-login-split-page .sgmax-login-right{
    display:none!important;
  }
  body.sgmax-interface-real.sgmax-login-split-page .sgmax-login-left{
    min-height:100vh!important;
    padding:28px 14px!important;
  }
  body.sgmax-interface-real.sgmax-login-split-page .sgmax-login-content{
    max-width:410px!important;
  }
  body.sgmax-interface-real.sgmax-login-split-page .sgmax-login-brand{
    flex-direction:column!important;
    text-align:center!important;
    gap:10px!important;
  }
  body.sgmax-interface-real.sgmax-login-split-page .sgmax-login-brand h1{
    font-size:2rem!important;
  }
}


/* =========================================================
   SGMax Fiscal - Hotfix visual v16.12
   Corrige: logo lateral, menu preenchido, tamanhos, PDV e cabeçalhos.
   ========================================================= */

/* Layout mais compacto */
body.sgmax-interface-real{
  font-size:14px!important;
}
body.sgmax-interface-real .content-wrapper>.content{
  padding-top:14px!important;
}
body.sgmax-interface-real .content-wrapper .container-fluid{
  padding-left:16px!important;
  padding-right:16px!important;
}

/* Menu lateral preenchido no mesmo padrão do topo */
body.sgmax-interface-real .main-sidebar{
  background:linear-gradient(180deg,#0f9b95 0%, #0b8f87 48%, #08766f 100%)!important;
  border-right:0!important;
  box-shadow:6px 0 20px rgba(15,23,42,.08)!important;
  overflow-x:hidden!important;
}
body.sgmax-interface-real .main-sidebar .brand-link{
  background:#ffffff!important;
  border-bottom:1px solid rgba(255,255,255,.22)!important;
  min-height:78px!important;
  height:78px!important;
  padding:10px 8px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  overflow:hidden!important;
}
body.sgmax-interface-real .main-sidebar .brand-link img{
  width:auto!important;
  max-width:210px!important;
  height:auto!important;
  max-height:58px!important;
  object-fit:contain!important;
  display:block!important;
  margin:0 auto!important;
}
body.sgmax-interface-real .sidebar{
  padding:12px 8px 18px!important;
}
body.sgmax-interface-real .nav-sidebar .nav-header{
  color:rgba(255,255,255,.72)!important;
  font-size:.74rem!important;
  font-weight:900!important;
  letter-spacing:.08em!important;
  padding:15px 12px 6px!important;
}
body.sgmax-interface-real .nav-sidebar .nav-item>.nav-link{
  color:#ffffff!important;
  background:transparent!important;
  margin:4px 0!important;
  padding:10px 12px!important;
  border-radius:12px!important;
  font-size:14px!important;
  font-weight:850!important;
}
body.sgmax-interface-real .nav-sidebar .nav-item>.nav-link .nav-icon{
  color:rgba(255,255,255,.88)!important;
}
body.sgmax-interface-real .nav-sidebar .nav-item>.nav-link:hover{
  background:rgba(255,255,255,.15)!important;
  color:#fff!important;
  transform:none!important;
}
body.sgmax-interface-real .nav-sidebar .nav-item>.nav-link:hover .nav-icon{
  color:#fff!important;
}
body.sgmax-interface-real .nav-sidebar .nav-item>.nav-link.active,
body.sgmax-interface-real .sidebar-light-info .nav-sidebar>.nav-item>.nav-link.active{
  background:#ffffff!important;
  color:#0b817a!important;
  box-shadow:0 10px 22px rgba(0,0,0,.14)!important;
}
body.sgmax-interface-real .nav-sidebar .nav-item>.nav-link.active .nav-icon{
  color:#0b817a!important;
}

/* Topo mais compacto e alinhado */
body.sgmax-interface-real .main-header.navbar{
  min-height:56px!important;
  height:56px!important;
}
body.sgmax-interface-real .main-header .navbar-nav .nav-item,
body.sgmax-interface-real .main-header .navbar-nav .nav-link{
  line-height:38px!important;
}

/* Cards e formulários menos grandes */
body.sgmax-interface-real .card,
body.sgmax-interface-real .info-box,
body.sgmax-interface-real .small-box,
body.sgmax-interface-real .modal-content{
  border-radius:15px!important;
}
body.sgmax-interface-real .card-header{
  padding:.75rem 1rem!important;
  overflow:visible!important;
}
body.sgmax-interface-real .card-body{
  padding:1rem!important;
}
body.sgmax-interface-real .form-control,
body.sgmax-interface-real .custom-select,
body.sgmax-interface-real .select2-container--bootstrap4 .select2-selection,
body.sgmax-interface-real .select2-container .select2-selection--single{
  min-height:42px!important;
  height:auto!important;
  border-radius:12px!important;
  font-size:14px!important;
}
body.sgmax-interface-real label{
  font-size:.94rem!important;
}
body.sgmax-interface-real .btn{
  padding:.52rem .86rem!important;
  border-radius:12px!important;
  font-size:14px!important;
  line-height:1.25!important;
}

/* Cabeçalhos com breadcrumb/botão sem esconder o Voltar */
body.sgmax-interface-real .card-header .row{
  align-items:center!important;
}
body.sgmax-interface-real .card-header .breadcrumb{
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:6px!important;
  padding:0!important;
  margin:0!important;
  float:none!important;
  white-space:normal!important;
}
body.sgmax-interface-real .card-header .breadcrumb .button-voltar,
body.sgmax-interface-real .card-header .breadcrumb .btn{
  position:static!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:auto!important;
  white-space:nowrap!important;
  margin:0 8px 0 0!important;
  padding:.43rem .9rem!important;
}
body.sgmax-interface-real .card-header h6{
  font-size:1rem!important;
  font-weight:900!important;
}

/* Dashboard inicial menor e mais legível */
body.sgmax-interface-real .sgmax-dashboard-home .row:first-child h6{
  font-size:1.55rem!important;
  line-height:1.18!important;
  margin-bottom:.2rem!important;
}
body.sgmax-interface-real .sgmax-dashboard-home .row:first-child small{
  font-size:.86rem!important;
}
body.sgmax-interface-real .sgmax-dashboard-home .sgmax-filter-card .card-body{
  padding:1rem!important;
}
body.sgmax-interface-real .sgmax-dashboard-home .sgmax-pill-btn{
  min-width:120px!important;
  margin:.22rem .22rem .12rem 0!important;
  padding:.58rem .78rem!important;
}
body.sgmax-interface-real .sgmax-dashboard-home .sg-kpi-card{
  min-height:108px!important;
  padding:2px!important;
}
body.sgmax-interface-real .sgmax-dashboard-home .sg-kpi-card .info-box-icon{
  width:62px!important;
  min-width:62px!important;
  height:62px!important;
  margin:10px!important;
}
body.sgmax-interface-real .sgmax-dashboard-home .sg-kpi-card .info-box-icon img{
  max-width:54px!important;
  max-height:54px!important;
}
body.sgmax-interface-real .sgmax-dashboard-home .sg-kpi-card .info-box-content{
  padding:10px 10px 10px 0!important;
}
body.sgmax-interface-real .sgmax-dashboard-home .sg-kpi-card .info-box-text{
  font-size:.98rem!important;
  line-height:1.25!important;
}
body.sgmax-interface-real .sgmax-dashboard-home .sg-kpi-card .info-box-number{
  font-size:1.35rem!important;
  line-height:1.1!important;
}
body.sgmax-interface-real .sgmax-dashboard-home .sg-result-card{
  min-height:100px!important;
}
body.sgmax-interface-real .sgmax-dashboard-home .sg-result-card .inner{
  padding:16px!important;
}
body.sgmax-interface-real .sgmax-dashboard-home .sg-result-card .inner h4{
  font-size:1.75rem!important;
  line-height:1.1!important;
}
body.sgmax-interface-real .sgmax-dashboard-home .sg-result-card .inner p{
  font-size:.95rem!important;
}
body.sgmax-interface-real .sgmax-dashboard-home .sg-result-card .icon{
  top:18px!important;
  right:20px!important;
  font-size:58px!important;
}

/* PDV Rápido: botões visíveis e status da impressora sem sobrepor */
body.sgmax-interface-real .pdv-topbar{
  padding:14px 18px!important;
  border-radius:18px!important;
}
body.sgmax-interface-real .pdv-topbar h4{
  font-size:1.42rem!important;
  line-height:1.2!important;
}
body.sgmax-interface-real .pdv-topbar .col-md-7.text-right{
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:8px!important;
  text-align:right!important;
}
body.sgmax-interface-real .pdv-topbar .btn-outline-light{
  color:#ffffff!important;
  background:rgba(255,255,255,.10)!important;
  border:1px solid rgba(255,255,255,.75)!important;
  opacity:1!important;
  visibility:visible!important;
  min-width:auto!important;
  padding:.48rem .78rem!important;
  font-weight:900!important;
}
body.sgmax-interface-real .pdv-topbar .btn-outline-light i{
  color:#ffffff!important;
  opacity:1!important;
}
body.sgmax-interface-real .pdv-topbar .btn-outline-light:hover{
  background:#ffffff!important;
  color:#0b817a!important;
}
body.sgmax-interface-real .pdv-topbar .btn-outline-light:hover i{
  color:#0b817a!important;
}
body.sgmax-interface-real .pdv-topbar .printer-badge,
body.sgmax-interface-real .printer-badge{
  position:static!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  max-width:100%!important;
  white-space:normal!important;
  line-height:1.2!important;
  border-radius:999px!important;
  padding:.48rem .85rem!important;
  margin:0!important;
  font-size:.88rem!important;
  font-weight:900!important;
  box-shadow:none!important;
}
body.sgmax-interface-real .pdv-topbar .printer-ok{
  background:#eafff4!important;
  color:#067247!important;
}
body.sgmax-interface-real .pdv-topbar .printer-bad{
  background:#fff0f0!important;
  color:#9d1c1c!important;
}
body.sgmax-interface-real .pdv-topbar .printer-warn{
  background:#fff6d7!important;
  color:#765700!important;
}
body.sgmax-interface-real .pdv-card,
body.sgmax-interface-real .shortcut-box,
body.sgmax-interface-real .total-box{
  border-radius:16px!important;
}
body.sgmax-interface-real .total-box{
  padding:16px!important;
}
body.sgmax-interface-real .total-value{
  font-size:2.55rem!important;
}
body.sgmax-interface-real .shortcut-main{
  height:auto!important;
  min-height:48px!important;
}

/* Responsivo */
@media(max-width: 991px){
  body.sgmax-interface-real .main-sidebar .brand-link img{
    max-width:185px!important;
    max-height:50px!important;
  }
  body.sgmax-interface-real .pdv-topbar .col-md-7.text-right{
    justify-content:flex-start!important;
    margin-top:12px!important;
  }
}
@media(max-width: 768px){
  body.sgmax-interface-real .content-wrapper .container-fluid{
    padding-left:10px!important;
    padding-right:10px!important;
  }
  body.sgmax-interface-real .sgmax-dashboard-home .row:first-child h6{
    font-size:1.25rem!important;
  }
  body.sgmax-interface-real .card-header .breadcrumb{
    justify-content:flex-start!important;
    margin-top:8px!important;
  }
  body.sgmax-interface-real .card-header .col-sm-6{
    width:100%!important;
    max-width:100%!important;
    flex:0 0 100%!important;
  }
  body.sgmax-interface-real .pdv-topbar{
    margin:10px 0 12px!important;
  }
  body.sgmax-interface-real .pdv-topbar h4{
    font-size:1.2rem!important;
  }
}


/* =========================================================
   SGMax Fiscal - Refino Visual + PDV v16.12
   ========================================================= */

/* Marca SGMax no lugar do XFiscal e acompanhando menu recolhido */
body.sgmax-interface-real .main-sidebar .brand-link.sgmax-brand-link,
body.sgmax-interface-real .main-sidebar .brand-link{
  background:linear-gradient(90deg,#0f9b95,#1098ad)!important;
  border-bottom:1px solid rgba(255,255,255,.22)!important;
  height:58px!important;
  min-height:58px!important;
  max-height:58px!important;
  padding:0 10px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  overflow:hidden!important;
  text-decoration:none!important;
}
body.sgmax-interface-real .main-sidebar .brand-link img{display:none!important;}
body.sgmax-interface-real .sgmax-brand-full{
  display:inline-flex!important;
  align-items:center!important;
  color:#fff!important;
  font-size:1.72rem!important;
  font-weight:950!important;
  line-height:1!important;
  letter-spacing:.01em!important;
}
body.sgmax-interface-real .sgmax-brand-full::before{
  content:"∞";
  display:inline-block!important;
  margin-right:8px!important;
  font-size:2.05rem!important;
  font-weight:900!important;
  line-height:.8!important;
}
body.sgmax-interface-real .sgmax-brand-mini{
  display:none!important;
  color:#fff!important;
  font-size:1.05rem!important;
  font-weight:950!important;
  line-height:1!important;
}
body.sgmax-interface-real.sidebar-collapse .sgmax-brand-full{display:none!important;}
body.sgmax-interface-real.sidebar-collapse .sgmax-brand-mini{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
}

/* Menu lateral mais compacto e sem logo estourando */
body.sgmax-interface-real .main-sidebar,
body.sgmax-interface-real .main-sidebar::before{width:248px!important;}
body.sgmax-interface-real .content-wrapper,
body.sgmax-interface-real .main-header,
body.sgmax-interface-real .main-footer{margin-left:248px!important;}
body.sgmax-interface-real.sidebar-collapse .main-sidebar,
body.sgmax-interface-real.sidebar-collapse .main-sidebar::before{width:4.6rem!important;}
body.sgmax-interface-real.sidebar-collapse .content-wrapper,
body.sgmax-interface-real.sidebar-collapse .main-header,
body.sgmax-interface-real.sidebar-collapse .main-footer{margin-left:4.6rem!important;}
body.sgmax-interface-real .sidebar{padding:8px 7px 10px!important;}
body.sgmax-interface-real .nav-sidebar .nav-header{
  font-size:.70rem!important;
  padding:10px 8px 4px!important;
  letter-spacing:.055em!important;
}
body.sgmax-interface-real .nav-sidebar .nav-item>.nav-link{
  margin:2px 0!important;
  padding:8px 9px!important;
  min-height:36px!important;
  font-size:13.4px!important;
  line-height:1.15!important;
}
body.sgmax-interface-real .nav-sidebar .nav-item>.nav-link p{
  white-space:normal!important;
  line-height:1.12!important;
  margin:0!important;
}
body.sgmax-interface-real .nav-sidebar .nav-item>.nav-link .nav-icon{
  width:21px!important;
  margin-right:.32rem!important;
  font-size:.92rem!important;
}
body.sgmax-interface-real.sidebar-collapse .nav-sidebar .nav-header{display:none!important;}
body.sgmax-interface-real.sidebar-collapse .nav-sidebar .nav-link{
  justify-content:center!important;
  padding:9px 0!important;
}
body.sgmax-interface-real.sidebar-collapse .nav-sidebar .nav-link p{display:none!important;}
body.sgmax-interface-real.sidebar-collapse .nav-sidebar .nav-link .nav-icon{margin-right:0!important;}

/* Barrinhas do menu maiores */
body.sgmax-interface-real .main-header [data-widget="pushmenu"]{
  width:42px!important;
  height:42px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  border-radius:12px!important;
  margin-left:2px!important;
  background:rgba(255,255,255,.12)!important;
}
body.sgmax-interface-real .main-header [data-widget="pushmenu"] i{font-size:1.14rem!important;}

/* Dashboard: atalhos do filtro lado a lado e negativos vermelhos */
body.sgmax-interface-real .sgmax-dashboard-home .sgmax-filter-card .col-lg-6.col-md-12{
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:end!important;
}
body.sgmax-interface-real .sgmax-dashboard-home .sgmax-filter-card .col-lg-6.col-md-12 .form-group{
  display:flex!important;
  flex-wrap:wrap!important;
  gap:8px!important;
  align-items:center!important;
  margin-bottom:0!important;
}
body.sgmax-interface-real .sgmax-dashboard-home .sgmax-pill-btn{
  width:auto!important;
  min-width:112px!important;
  height:42px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  margin:0!important;
}
body.sgmax-interface-real .sgmax-dashboard-home .sg-result-cancelado,
body.sgmax-interface-real .small-box.bg-danger{
  background:linear-gradient(90deg,#ef4444,#dc2626)!important;
  color:#fff!important;
}
body.sgmax-interface-real .sgmax-dashboard-home .sg-result-cancelado .inner h4,
body.sgmax-interface-real .sgmax-dashboard-home .sg-result-cancelado .inner p,
body.sgmax-interface-real .small-box.bg-danger .inner h4,
body.sgmax-interface-real .small-box.bg-danger .inner p{color:#fff!important;}
body.sgmax-interface-real .sgmax-dashboard-home .sg-result-cancelado .icon,
body.sgmax-interface-real .small-box.bg-danger .icon{
  color:#7f1d1d!important;
  opacity:.20!important;
}
body.sgmax-interface-real .text-danger,
body.sgmax-interface-real .negative,
body.sgmax-interface-real .valor-negativo,
body.sgmax-interface-real .cancelada,
body.sgmax-interface-real .canceladas{color:#dc2626!important;}

/* PDV: compactar tela e manter atalhos visíveis */
body.sgmax-interface-real .pdv-wrapper{
  min-height:calc(100vh - 56px)!important;
  padding-bottom:0!important;
}
body.sgmax-interface-real .pdv-wrapper .container-fluid{padding-top:10px!important;}
body.sgmax-interface-real .pdv-topbar{
  margin:0 0 10px!important;
  min-height:76px!important;
  display:flex!important;
  align-items:center!important;
}
body.sgmax-interface-real .pdv-topbar h4{font-size:1.32rem!important;}
body.sgmax-interface-real .pdv-topbar .col-md-5,
body.sgmax-interface-real .pdv-topbar .col-md-7{
  display:flex!important;
  align-items:center!important;
}
body.sgmax-interface-real .pdv-topbar .col-md-7.text-right{
  justify-content:flex-end!important;
  gap:8px!important;
  flex-wrap:nowrap!important;
}
body.sgmax-interface-real .pdv-topbar .btn-outline-light{
  height:36px!important;
  min-height:36px!important;
  padding:.34rem .68rem!important;
  font-size:.84rem!important;
  white-space:nowrap!important;
}

/* Status impressora: card fixo */
body.sgmax-interface-real .pdv-topbar .printer-badge,
body.sgmax-interface-real .printer-badge,
body.sgmax-interface-real .printer-ok,
body.sgmax-interface-real .printer-bad,
body.sgmax-interface-real .printer-warn{
  width:246px!important;
  min-width:246px!important;
  max-width:246px!important;
  height:36px!important;
  min-height:36px!important;
  border-radius:999px!important;
  padding:0 12px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  font-size:.84rem!important;
  font-weight:950!important;
  line-height:1!important;
  margin:0!important;
  position:static!important;
}
body.sgmax-interface-real .printer-ok{
  background:#eafff4!important;
  color:#067247!important;
  border:1px solid #b8efd4!important;
}
body.sgmax-interface-real .printer-bad{
  background:#ffe8e8!important;
  color:#b91c1c!important;
  border:1px solid #ffc4c4!important;
}
body.sgmax-interface-real .printer-warn{
  background:#fff4cf!important;
  color:#8a5c00!important;
  border:1px solid #ffe08a!important;
}

/* Remove dica fixa "Use quant*código..." */
body.sgmax-interface-real .pdv-card small,
body.sgmax-interface-real .pdv-card .form-text,
body.sgmax-interface-real .pdv-card .help-block{display:none!important;}
body.sgmax-interface-real .pdv-card{padding:12px!important;}
body.sgmax-interface-real .pdv-card label{margin-bottom:5px!important;}
body.sgmax-interface-real .pdv-card .form-control-lg{
  height:42px!important;
  min-height:42px!important;
  font-size:1rem!important;
  padding:.45rem .8rem!important;
}
body.sgmax-interface-real .produto-atual{
  margin-top:8px!important;
  font-size:1rem!important;
  line-height:1.15!important;
}
body.sgmax-interface-real .itens-card{
  padding:10px 12px!important;
  min-height:70px!important;
}
body.sgmax-interface-real .itens-card table{margin-bottom:0!important;}
body.sgmax-interface-real .pdv-right .total-box{
  padding:13px 16px!important;
  min-height:108px!important;
}
body.sgmax-interface-real .pdv-right .total-label{font-size:.9rem!important;}
body.sgmax-interface-real .pdv-right .total-value{
  font-size:2.35rem!important;
  line-height:1.05!important;
}
body.sgmax-interface-real .shortcut-box{
  padding:14px!important;
  max-height:calc(100vh - 250px)!important;
  overflow:hidden!important;
}
body.sgmax-interface-real .shortcut-main{
  min-height:44px!important;
  height:44px!important;
  padding:.42rem .8rem!important;
  margin-bottom:8px!important;
}
body.sgmax-interface-real .shortcut-box hr{margin:10px 0!important;}
body.sgmax-interface-real .atalhos-title{
  margin:8px 0 6px!important;
  font-size:.84rem!important;
}
body.sgmax-interface-real .atalho-line{
  padding:5px 0!important;
  min-height:30px!important;
}
body.sgmax-interface-real .atalho-line span{
  min-width:70px!important;
  padding:4px 8px!important;
  font-size:.8rem!important;
}
body.sgmax-interface-real .atalho-line b{font-size:.82rem!important;}

/* Cores por forma de pagamento */
body.sgmax-interface-real .sg-pay-dinheiro,
body.sgmax-interface-real #modalPagamento button.sg-pay-dinheiro{
  background:#2563eb!important;
  border-color:#2563eb!important;
  color:#fff!important;
}
body.sgmax-interface-real .sg-pay-pix,
body.sgmax-interface-real #modalPagamento button.sg-pay-pix{
  background:#16a34a!important;
  border-color:#16a34a!important;
  color:#fff!important;
}
body.sgmax-interface-real .sg-pay-debito,
body.sgmax-interface-real #modalPagamento button.sg-pay-debito{
  background:#facc15!important;
  border-color:#facc15!important;
  color:#1f2937!important;
}
body.sgmax-interface-real .sg-pay-credito,
body.sgmax-interface-real #modalPagamento button.sg-pay-credito{
  background:#7c3aed!important;
  border-color:#7c3aed!important;
  color:#fff!important;
}

/* Tela cheia PDV */
body.sgmax-pdv-fullscreen,
body.sgmax-pdv-fullscreen.sgmax-interface-real{overflow:hidden!important;}
body.sgmax-pdv-fullscreen .main-header,
body.sgmax-pdv-fullscreen .main-sidebar,
body.sgmax-pdv-fullscreen .main-footer{display:none!important;}
body.sgmax-pdv-fullscreen .content-wrapper{
  margin-left:0!important;
  min-height:100vh!important;
}
body.sgmax-pdv-fullscreen .pdv-wrapper{
  height:100vh!important;
  overflow:hidden!important;
}
body.sgmax-pdv-fullscreen .pdv-topbar{min-height:72px!important;}
body.sgmax-pdv-fullscreen .pdv-wrapper .pdv-card{margin-bottom:10px!important;}
body.sgmax-pdv-fullscreen .shortcut-box{max-height:calc(100vh - 205px)!important;}

/* Responsivo */
@media(max-width:1200px){
  body.sgmax-interface-real .pdv-topbar .printer-badge,
  body.sgmax-interface-real .printer-badge,
  body.sgmax-interface-real .printer-ok,
  body.sgmax-interface-real .printer-bad,
  body.sgmax-interface-real .printer-warn{
    width:210px!important;
    min-width:210px!important;
    max-width:210px!important;
  }
  body.sgmax-interface-real .pdv-topbar .btn-outline-light{
    font-size:.78rem!important;
    padding:.32rem .55rem!important;
  }
}
@media(max-width:991px){
  body.sgmax-interface-real .content-wrapper,
  body.sgmax-interface-real .main-header,
  body.sgmax-interface-real .main-footer{margin-left:0!important;}
  body.sgmax-interface-real .pdv-topbar .col-md-7.text-right{
    flex-wrap:wrap!important;
    justify-content:flex-start!important;
  }
  body.sgmax-interface-real .pdv-topbar .printer-badge,
  body.sgmax-interface-real .printer-badge{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
  }
}
@media(max-width:768px){
  body.sgmax-interface-real .sgmax-dashboard-home .sgmax-filter-card .col-lg-6.col-md-12 .form-group{width:100%!important;}
  body.sgmax-interface-real .sgmax-dashboard-home .sgmax-pill-btn{
    flex:1 1 calc(50% - 8px)!important;
    min-width:0!important;
  }
}


/* =========================================================
   SGMax Fiscal - Interface fiscal, ações, mobile/PWA v16.12
   ========================================================= */
html{background:#f2f7f8!important;}
body.sgmax-interface-real{overscroll-behavior:none!important;}
body.sgmax-interface-real .content-wrapper{overflow-x:hidden!important;}

/* Início destacado no PC e mobile */
body.sgmax-interface-real .nav-sidebar a[href="/inicio/emissor"],
body.sgmax-interface-real .nav-sidebar a[href="/inicio/admin"],
body.sgmax-interface-real .nav-sidebar a[href="/inicio/contador"]{
  min-height:42px!important;
  font-size:14.5px!important;
  font-weight:950!important;
}

/* Cards de filtro: botões sempre organizados ao lado do período */
body.sgmax-interface-real .sgmax-action-filter-card .row,
body.sgmax-interface-real .sgmax-filter-card .row{align-items:end!important;}
body.sgmax-interface-real .sgmax-action-filter-card .col-lg-6,
body.sgmax-interface-real .sgmax-action-filter-card .col-lg-5,
body.sgmax-interface-real .sgmax-action-filter-card .col-lg-4,
body.sgmax-interface-real .sgmax-action-filter-card .col-lg-3,
body.sgmax-interface-real .sgmax-action-filter-card .col-md-12:last-child,
body.sgmax-interface-real .sgmax-filter-card .col-lg-6.col-md-12{
  display:flex!important;
  align-items:end!important;
  flex-wrap:wrap!important;
}
body.sgmax-interface-real .sgmax-action-filter-card .form-group,
body.sgmax-interface-real .sgmax-filter-card .col-lg-6.col-md-12 .form-group{
  display:flex!important;
  flex-wrap:wrap!important;
  gap:8px!important;
  align-items:center!important;
  margin-bottom:0!important;
  width:100%!important;
}
body.sgmax-interface-real .sgmax-action-filter-card .btn,
body.sgmax-interface-real .sgmax-filter-card .btn,
body.sgmax-interface-real .sg-btn-search,
body.sgmax-interface-real .sg-btn-month,
body.sgmax-interface-real .sg-btn-download,
body.sgmax-interface-real .sg-btn-export,
body.sgmax-interface-real .sg-btn-sync,
body.sgmax-interface-real .sg-btn-history{
  height:40px!important;
  min-height:40px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:6px!important;
  margin:0!important;
  white-space:nowrap!important;
}
body.sgmax-interface-real .sg-btn-search{background:#0f9b95!important;color:#fff!important;border-color:#0f9b95!important;}
body.sgmax-interface-real .sg-btn-month{background:#7c8793!important;color:#fff!important;border-color:#7c8793!important;}
body.sgmax-interface-real .sg-btn-download{background:#10b981!important;color:#fff!important;border-color:#10b981!important;}
body.sgmax-interface-real .sg-btn-export{background:#334155!important;color:#fff!important;border-color:#334155!important;}
body.sgmax-interface-real .sg-btn-sync{background:#2563eb!important;color:#fff!important;border-color:#2563eb!important;}
body.sgmax-interface-real .sg-btn-history{background:#f59e0b!important;color:#1f2937!important;border-color:#f59e0b!important;}

/* Cards/caixas fiscais com cores por módulo */
body.sgmax-interface-real .sgmax-compras-mde .small-box:nth-child(1),
body.sgmax-interface-real .sgmax-compras-mde .small-box.bg-info{background:linear-gradient(90deg,#0ea5e9,#0284c7)!important;color:#fff!important;}
body.sgmax-interface-real .sgmax-compras-mde .small-box.bg-secondary{background:linear-gradient(90deg,#64748b,#475569)!important;color:#fff!important;}
body.sgmax-interface-real .sgmax-compras-mde .small-box.bg-success{background:linear-gradient(90deg,#22c55e,#16a34a)!important;color:#fff!important;}
body.sgmax-interface-real .sgmax-compras-mde .small-box.bg-primary{background:linear-gradient(90deg,#8b5cf6,#7c3aed)!important;color:#fff!important;}
body.sgmax-interface-real .sgmax-compras-mde .small-box.bg-warning{background:linear-gradient(90deg,#f59e0b,#facc15)!important;color:#1f2937!important;}
body.sgmax-interface-real .sgmax-nfe-compras .small-box.bg-primary{background:linear-gradient(90deg,#2563eb,#1d4ed8)!important;}
body.sgmax-interface-real .sgmax-nfe-compras .small-box.bg-success{background:linear-gradient(90deg,#16a34a,#15803d)!important;}
body.sgmax-interface-real .sgmax-nfe-compras .small-box.bg-info{background:linear-gradient(90deg,#0f9b95,#1098ad)!important;}

/* Tabelas fiscais: caber na tela sem barra horizontal grande */
body.sgmax-interface-real .table-responsive{border-radius:14px!important;}
body.sgmax-interface-real .sgmax-compras-mde table,
body.sgmax-interface-real .sgmax-nfe-compras table,
body.sgmax-interface-real .content-wrapper table.table.text-nowrap{
  table-layout:auto!important;
  width:100%!important;
}
body.sgmax-interface-real table.table.text-nowrap td,
body.sgmax-interface-real table.table.text-nowrap th{white-space:normal!important;}
body.sgmax-interface-real table td:first-child,
body.sgmax-interface-real table th:first-child{max-width:330px!important;word-break:break-word!important;}
body.sgmax-interface-real table td:last-child,
body.sgmax-interface-real table th:last-child{white-space:nowrap!important;min-width:150px!important;}

/* Botões de ação por ícone/ação */
body.sgmax-interface-real .table td .btn-sm,
body.sgmax-interface-real .table td form .btn-sm{
  width:34px!important;
  height:34px!important;
  min-width:34px!important;
  padding:0!important;
  border-radius:10px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  margin:2px!important;
  font-size:.84rem!important;
  box-shadow:none!important;
}
body.sgmax-interface-real .sg-action-print{background:#2563eb!important;border-color:#2563eb!important;color:#fff!important;}
body.sgmax-interface-real .sg-action-sefaz{background:#334155!important;border-color:#334155!important;color:#fff!important;}
body.sgmax-interface-real .sg-action-download{background:#16a34a!important;border-color:#16a34a!important;color:#fff!important;}
body.sgmax-interface-real .sg-action-email{background:#7c3aed!important;border-color:#7c3aed!important;color:#fff!important;}
body.sgmax-interface-real .sg-action-whatsapp{background:#22c55e!important;border-color:#22c55e!important;color:#fff!important;}
body.sgmax-interface-real .sg-action-undo{background:#f59e0b!important;border-color:#f59e0b!important;color:#1f2937!important;}
body.sgmax-interface-real .sg-action-delete{background:#ef4444!important;border-color:#ef4444!important;color:#fff!important;}

/* Card download agente de impressão */
body.sgmax-interface-real a[href*="SGMax"].btn,
body.sgmax-interface-real a[href*="Print"].btn,
body.sgmax-interface-real a[href*="print"].btn{
  background:linear-gradient(90deg,#7c3aed,#2563eb)!important;
  border-color:transparent!important;
  color:#fff!important;
}
body.sgmax-interface-real .alert-info,
body.sgmax-interface-real .bg-info:not(.small-box){background:#0ea5b7!important;border-color:#0ea5b7!important;color:#fff!important;}

/* Mobile/app-like */
@media(max-width:768px){
  body.sgmax-interface-real{background:#f2f7f8!important;font-size:14px!important;}
  body.sgmax-interface-real .main-header.navbar{position:sticky!important;top:0!important;z-index:1035!important;height:54px!important;min-height:54px!important;}
  body.sgmax-interface-real .content-wrapper{padding-bottom:18px!important;}
  body.sgmax-interface-real .card,body.sgmax-interface-real .info-box,body.sgmax-interface-real .small-box{border-radius:18px!important;}
  body.sgmax-interface-real .sgmax-action-filter-card .form-group,
  body.sgmax-interface-real .sgmax-filter-card .form-group{gap:8px!important;}
  body.sgmax-interface-real .sgmax-action-filter-card .btn,
  body.sgmax-interface-real .sgmax-filter-card .btn{flex:1 1 calc(50% - 8px)!important;min-width:0!important;}
  body.sgmax-interface-real .table-responsive{overflow-x:auto!important;-webkit-overflow-scrolling:touch!important;}
  body.sgmax-interface-real .table td,body.sgmax-interface-real .table th{font-size:12px!important;}
  body.sgmax-interface-real .nav-sidebar a[href="/inicio/emissor"]{font-size:15px!important;}
}


/* =========================================================
   SGMax Fiscal - v16.12 Menu, tabelas fiscais e PDV mobile
   ========================================================= */

/* Evita que o modo tela cheia do PDV fique travado depois do ESC */
body.sgmax-interface-real:not(.sgmax-pdv-fullscreen).pdv-fullscreen-mode .main-sidebar,
body.sgmax-interface-real:not(.sgmax-pdv-fullscreen).pdv-fullscreen-mode .main-header{
  display:block!important;
}
body.sgmax-interface-real:not(.sgmax-pdv-fullscreen).pdv-fullscreen-mode .content-wrapper{
  margin-left:248px!important;
}
body.sgmax-interface-real.sidebar-collapse:not(.sgmax-pdv-fullscreen).pdv-fullscreen-mode .content-wrapper{
  margin-left:4.6rem!important;
}

/* Mobile: menu abre com 1 clique, como drawer nativo */
.sgmax-sidebar-backdrop{display:none;}
@media(max-width:991px){
  body.sgmax-interface-real{overflow-x:hidden!important;}
  body.sgmax-interface-real .main-header.navbar{
    position:sticky!important;
    top:0!important;
    z-index:1030!important;
    margin-left:0!important;
  }
  body.sgmax-interface-real .main-header [data-widget="pushmenu"]{
    width:54px!important;
    height:54px!important;
    border-radius:14px!important;
    background:rgba(255,255,255,.18)!important;
  }
  body.sgmax-interface-real .main-header [data-widget="pushmenu"] i{font-size:1.45rem!important;}
  body.sgmax-interface-real .content-wrapper,
  body.sgmax-interface-real .main-footer{margin-left:0!important;}
  body.sgmax-interface-real .main-sidebar,
  body.sgmax-interface-real .main-sidebar::before{
    width:min(78vw, 360px)!important;
  }
  body.sgmax-interface-real .main-sidebar{
    position:fixed!important;
    left:0!important;
    top:0!important;
    bottom:0!important;
    height:100vh!important;
    z-index:1050!important;
    transform:translateX(-102%)!important;
    transition:transform .22s ease!important;
    box-shadow:20px 0 44px rgba(0,0,0,.28)!important;
    overflow-y:auto!important;
    -webkit-overflow-scrolling:touch!important;
  }
  body.sgmax-interface-real.sgmax-mobile-sidebar-open .main-sidebar{
    transform:translateX(0)!important;
  }
  body.sgmax-interface-real.sgmax-mobile-sidebar-open .sgmax-sidebar-backdrop{
    display:block!important;
    position:fixed!important;
    inset:0!important;
    z-index:1040!important;
    background:rgba(15,23,42,.45)!important;
    backdrop-filter:blur(2px)!important;
  }
  body.sgmax-interface-real.sidebar-collapse .main-sidebar{
    transform:translateX(-102%)!important;
    width:min(78vw, 360px)!important;
  }
  body.sgmax-interface-real.sidebar-collapse.sgmax-mobile-sidebar-open .main-sidebar{
    transform:translateX(0)!important;
  }
  body.sgmax-interface-real.sidebar-collapse .sgmax-brand-mini{display:none!important;}
  body.sgmax-interface-real.sidebar-collapse .sgmax-brand-full{display:inline-flex!important;}
  body.sgmax-interface-real.sidebar-collapse .nav-sidebar .nav-header{display:block!important;}
  body.sgmax-interface-real.sidebar-collapse .nav-sidebar .nav-link p{display:block!important;}
  body.sgmax-interface-real.sidebar-collapse .nav-sidebar .nav-link .nav-icon{margin-right:.32rem!important;}
}

/* Seções recolhíveis no menu */
body.sgmax-interface-real .nav-header.sgmax-toggle-section{
  cursor:pointer!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  user-select:none!important;
}
body.sgmax-interface-real .nav-header.sgmax-toggle-section::after{
  content:"▾";
  font-size:.78rem;
  opacity:.85;
  margin-left:8px;
}
body.sgmax-interface-real .nav-header.sgmax-toggle-section.sgmax-collapsed::after{content:"▸";}
body.sgmax-interface-real .nav-item.sgmax-section-hidden{display:none!important;}

/* Tabelas fiscais: ocultar chave visualmente, botão copiar e ações compactas */
body.sgmax-interface-real.sgmax-page-controle-fiscal .table-responsive,
body.sgmax-interface-real.sgmax-page-compras .table-responsive{
  overflow-x:hidden!important;
}
body.sgmax-interface-real .sg-chave-col{
  display:none!important;
}
body.sgmax-interface-real .sg-action-cell{
  min-width:178px!important;
  max-width:230px!important;
  white-space:normal!important;
}
body.sgmax-interface-real .sg-action-cell .sg-action-wrap{
  display:grid!important;
  grid-template-columns:repeat(4, 31px)!important;
  gap:5px!important;
  align-items:center!important;
  justify-content:start!important;
}
body.sgmax-interface-real .sg-action-cell .btn-sm,
body.sgmax-interface-real .sg-action-cell a.btn,
body.sgmax-interface-real .sg-action-cell button.btn{
  width:31px!important;
  height:31px!important;
  min-width:31px!important;
  padding:0!important;
  border-radius:9px!important;
  margin:0!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  font-size:.78rem!important;
}
body.sgmax-interface-real .sg-copy-chave{
  background:#0ea5e9!important;
  border-color:#0ea5e9!important;
  color:#fff!important;
}
body.sgmax-interface-real .sg-copy-chave.sg-copied{
  background:#22c55e!important;
  border-color:#22c55e!important;
}
body.sgmax-interface-real.sgmax-page-controle-fiscal table.table td,
body.sgmax-interface-real.sgmax-page-controle-fiscal table.table th{
  font-size:12.5px!important;
  padding:.48rem .5rem!important;
  vertical-align:middle!important;
}
body.sgmax-interface-real.sgmax-page-controle-fiscal table td:first-child,
body.sgmax-interface-real.sgmax-page-controle-fiscal table th:first-child{
  max-width:42px!important;
  width:42px!important;
  word-break:normal!important;
  text-align:center!important;
}
body.sgmax-interface-real.sgmax-page-controle-fiscal table td:nth-child(3),
body.sgmax-interface-real.sgmax-page-controle-fiscal table th:nth-child(3){
  max-width:70px!important;
}
body.sgmax-interface-real.sgmax-page-controle-fiscal table td:last-child,
body.sgmax-interface-real.sgmax-page-controle-fiscal table th:last-child{
  min-width:178px!important;
  max-width:230px!important;
}

/* PDV desktop: evita rolagem excessiva e conserta retorno da tela cheia */
body.sgmax-interface-real.sgmax-pdv-page .pdv-wrapper{overflow-x:hidden!important;}
body.sgmax-interface-real.sgmax-pdv-page .pdv-grid{
  grid-template-columns:minmax(0,1fr) 320px!important;
  gap:12px!important;
}
body.sgmax-interface-real.sgmax-pdv-page .shortcut-box{
  max-height:none!important;
  overflow:visible!important;
  padding:12px!important;
}
body.sgmax-interface-real.sgmax-pdv-page .atalho-line{padding:4px 0!important;}
body.sgmax-interface-real.sgmax-pdv-page .atalhos-title{margin:6px 0 4px!important;}
body.sgmax-interface-real.sgmax-pdv-page .pdv-right .total-box{min-height:92px!important;}
body.sgmax-interface-real.sgmax-pdv-page .pdv-right .total-value{font-size:2rem!important;}
body.sgmax-interface-real.sgmax-pdv-page.pdv-fullscreen-mode .pdv-wrapper{
  position:fixed!important;
  inset:0!important;
  z-index:99999!important;
  overflow:hidden!important;
  padding:10px!important;
}
body.sgmax-interface-real.sgmax-pdv-page.pdv-fullscreen-mode .pdv-grid{
  grid-template-columns:minmax(0,1fr) 310px!important;
}
body.sgmax-interface-real.sgmax-pdv-page.pdv-fullscreen-mode .pdv-topbar{min-height:68px!important;}
body.sgmax-interface-real.sgmax-pdv-page.pdv-fullscreen-mode .itens-card{max-height:calc(100vh - 250px)!important;}

/* PDV mobile 100% app: sem menu/topo global, cartões melhorados e pagamento colorido */
@media(max-width:768px){
  body.sgmax-interface-real.sgmax-pdv-mobile-page .main-header,
  body.sgmax-interface-real.sgmax-pdv-mobile-page .main-sidebar,
  body.sgmax-interface-real.sgmax-pdv-mobile-page .main-footer,
  body.sgmax-interface-real.sgmax-pdv-mobile-manager-page .main-header,
  body.sgmax-interface-real.sgmax-pdv-mobile-manager-page .main-sidebar,
  body.sgmax-interface-real.sgmax-pdv-mobile-manager-page .main-footer{
    display:none!important;
  }
  body.sgmax-interface-real.sgmax-pdv-mobile-page .content-wrapper,
  body.sgmax-interface-real.sgmax-pdv-mobile-manager-page .content-wrapper{
    margin-left:0!important;
    padding:0!important;
    min-height:100vh!important;
    background:#f2f7f8!important;
  }
  body.sgmax-interface-real.sgmax-pdv-mobile-page .content,
  body.sgmax-interface-real.sgmax-pdv-mobile-manager-page .content,
  body.sgmax-interface-real.sgmax-pdv-mobile-page .container-fluid,
  body.sgmax-interface-real.sgmax-pdv-mobile-manager-page .container-fluid{
    padding:0!important;
  }
  body.sgmax-interface-real .pdv-mobile-app .pm-top,
  body.sgmax-interface-real .pmg-app .pmg-top{
    background:linear-gradient(90deg,#0f9b95,#1098ad)!important;
    color:#fff!important;
    border-radius:0 0 22px 22px!important;
    box-shadow:0 12px 28px rgba(15,155,149,.28)!important;
    padding:14px!important;
  }
  body.sgmax-interface-real .pdv-mobile-app .pm-page,
  body.sgmax-interface-real .pmg-app .pmg-page{
    padding:12px!important;
    max-width:540px!important;
  }
  body.sgmax-interface-real .pdv-mobile-app .pm-card,
  body.sgmax-interface-real .pmg-app .pmg-card,
  body.sgmax-interface-real .pmg-app .pmg-note{
    border-radius:20px!important;
    border:1px solid #dce8ec!important;
    box-shadow:0 8px 24px rgba(15,23,42,.08)!important;
  }
  body.sgmax-interface-real .pdv-mobile-app .pm-bottom{
    position:sticky!important;
    bottom:0!important;
    border-radius:22px 22px 0 0!important;
    box-shadow:0 -10px 26px rgba(15,23,42,.14)!important;
  }
  body.sgmax-interface-real .pdv-mobile-app .pm-payment[data-label="Dinheiro"]{background:#2563eb!important;border-color:#2563eb!important;color:#fff!important;}
  body.sgmax-interface-real .pdv-mobile-app .pm-payment[data-label="PIX"]{background:#16a34a!important;border-color:#16a34a!important;color:#fff!important;}
  body.sgmax-interface-real .pdv-mobile-app .pm-payment[data-label="Débito"]{background:#facc15!important;border-color:#facc15!important;color:#1f2937!important;}
  body.sgmax-interface-real .pdv-mobile-app .pm-payment[data-label="Crédito"]{background:#7c3aed!important;border-color:#7c3aed!important;color:#fff!important;}
}


/* =========================================================
   SGMax Fiscal - v16.12 Responsivo Global + Tabelas + Menu
   ========================================================= */

/* Sidebar: evita "Configurações" colado no rodapé e melhora rolagem */
body.sgmax-interface-real .main-sidebar{
  overflow:hidden!important;
}
body.sgmax-interface-real .main-sidebar .sidebar{
  height:calc(100vh - 58px)!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  padding-bottom:96px!important;
  scrollbar-width:thin!important;
}
body.sgmax-interface-real .main-sidebar .sidebar::-webkit-scrollbar{width:6px!important;}
body.sgmax-interface-real .main-sidebar .sidebar::-webkit-scrollbar-thumb{
  background:rgba(255,255,255,.28)!important;
  border-radius:999px!important;
}
body.sgmax-interface-real .nav-header.sgmax-toggle-section{
  margin-top:8px!important;
}

/* Mobile: drawer deve abrir/fechar com 1 toque e não ficar travado */
@media(max-width:991px){
  body.sgmax-interface-real.sgmax-mobile-sidebar-open{
    overflow:hidden!important;
  }
  body.sgmax-interface-real .main-header.navbar{
    left:0!important;
    right:0!important;
    width:100%!important;
    margin-left:0!important;
    z-index:1032!important;
  }
  body.sgmax-interface-real .main-header [data-widget="pushmenu"],
  body.sgmax-interface-real .main-header .sgmax-mobile-menu-trigger{
    width:56px!important;
    height:56px!important;
    min-width:56px!important;
    border-radius:14px!important;
    background:rgba(255,255,255,.20)!important;
    color:#fff!important;
    margin:0 8px 0 0!important;
    touch-action:manipulation!important;
    -webkit-tap-highlight-color:transparent!important;
  }
  body.sgmax-interface-real .main-header [data-widget="pushmenu"] i,
  body.sgmax-interface-real .main-header .sgmax-mobile-menu-trigger i{
    font-size:1.55rem!important;
    color:#fff!important;
  }
  body.sgmax-interface-real .main-sidebar{
    position:fixed!important;
    top:0!important;
    left:0!important;
    bottom:0!important;
    height:100dvh!important;
    width:min(82vw, 340px)!important;
    max-width:min(82vw, 340px)!important;
    z-index:1050!important;
    transform:translate3d(-105%,0,0)!important;
    transition:transform .20s ease!important;
    will-change:transform!important;
    box-shadow:20px 0 44px rgba(0,0,0,.32)!important;
  }
  body.sgmax-interface-real.sgmax-mobile-sidebar-open .main-sidebar{
    transform:translate3d(0,0,0)!important;
  }
  body.sgmax-interface-real.sidebar-collapse .main-sidebar{
    transform:translate3d(-105%,0,0)!important;
    width:min(82vw, 340px)!important;
    max-width:min(82vw, 340px)!important;
  }
  body.sgmax-interface-real.sidebar-collapse.sgmax-mobile-sidebar-open .main-sidebar{
    transform:translate3d(0,0,0)!important;
  }
  body.sgmax-interface-real .main-sidebar .sidebar{
    height:calc(100dvh - 58px)!important;
    padding-bottom:120px!important;
  }
  body.sgmax-interface-real .sgmax-sidebar-backdrop{
    display:none!important;
    position:fixed!important;
    inset:0!important;
    z-index:1040!important;
    background:rgba(15,23,42,.52)!important;
    backdrop-filter:blur(2px)!important;
  }
  body.sgmax-interface-real.sgmax-mobile-sidebar-open .sgmax-sidebar-backdrop{
    display:block!important;
  }
  body.sgmax-interface-real .content-wrapper,
  body.sgmax-interface-real .main-footer{
    margin-left:0!important;
    width:100%!important;
  }
  body.sgmax-interface-real.sidebar-collapse .content-wrapper,
  body.sgmax-interface-real.sidebar-collapse .main-footer{
    margin-left:0!important;
  }
}

/* Tabelas globais: compactar sem deformar, em todo o sistema */
body.sgmax-interface-real .table-responsive{
  width:100%!important;
  overflow-x:auto!important;
  -webkit-overflow-scrolling:touch!important;
}
body.sgmax-interface-real table.table{
  width:100%!important;
  margin-bottom:0!important;
  table-layout:auto!important;
}
body.sgmax-interface-real table.table th,
body.sgmax-interface-real table.table td{
  padding:.42rem .46rem!important;
  font-size:12.6px!important;
  line-height:1.18!important;
  vertical-align:middle!important;
  white-space:nowrap!important;
  word-break:normal!important;
  overflow-wrap:normal!important;
}
body.sgmax-interface-real table.table thead th{
  font-size:12.4px!important;
  font-weight:900!important;
  white-space:nowrap!important;
}
body.sgmax-interface-real table.table td:nth-child(1),
body.sgmax-interface-real table.table th:nth-child(1){
  min-width:48px!important;
  width:54px!important;
  max-width:70px!important;
  text-align:center!important;
}
body.sgmax-interface-real table.table td[data-title*="Código"],
body.sgmax-interface-real table.table td[data-label*="Código"],
body.sgmax-interface-real table.table th:contains("Código"){
  white-space:nowrap!important;
}

/* Coluna de chave escondida: continua copiável pelo botão */
body.sgmax-interface-real .sg-chave-col{
  display:none!important;
}

/* Colunas longas gerais não devem quebrar a grade */
body.sgmax-interface-real .sgmax-long-text,
body.sgmax-interface-real table.table td.sgmax-long-text{
  max-width:220px!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}

/* Ações globais em uma linha, para todas as tabelas */
body.sgmax-interface-real td.sg-action-cell,
body.sgmax-interface-real table.table td.sg-action-cell,
body.sgmax-interface-real table.table td:last-child.sg-action-cell{
  min-width:252px!important;
  width:252px!important;
  max-width:320px!important;
  white-space:nowrap!important;
}
body.sgmax-interface-real .sg-action-wrap{
  display:flex!important;
  flex-direction:row!important;
  flex-wrap:nowrap!important;
  gap:4px!important;
  align-items:center!important;
  justify-content:flex-start!important;
  white-space:nowrap!important;
  overflow:visible!important;
}
body.sgmax-interface-real .sg-action-wrap .btn,
body.sgmax-interface-real td.sg-action-cell .btn,
body.sgmax-interface-real td.sg-action-cell a.btn,
body.sgmax-interface-real td.sg-action-cell button.btn{
  width:27px!important;
  height:27px!important;
  min-width:27px!important;
  max-width:27px!important;
  padding:0!important;
  margin:0!important;
  border-radius:8px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  font-size:0!important;
  line-height:1!important;
}
body.sgmax-interface-real .sg-action-wrap .btn i,
body.sgmax-interface-real td.sg-action-cell .btn i{
  font-size:12px!important;
  margin:0!important;
}
body.sgmax-interface-real .sg-action-wrap .btn span,
body.sgmax-interface-real td.sg-action-cell .btn span{
  display:none!important;
}

/* Classes para ações mesmo fora do controle fiscal */
body.sgmax-interface-real .sg-copy-chave{background:#0ea5e9!important;border-color:#0ea5e9!important;color:#fff!important;}
body.sgmax-interface-real .sg-action-print{background:#0f9b95!important;border-color:#0f9b95!important;color:#fff!important;}
body.sgmax-interface-real .sg-action-sefaz{background:#1f2937!important;border-color:#1f2937!important;color:#22d3ee!important;}
body.sgmax-interface-real .sg-action-download{background:#10b981!important;border-color:#10b981!important;color:#fff!important;}
body.sgmax-interface-real .sg-action-email{background:#0891b2!important;border-color:#0891b2!important;color:#fff!important;}
body.sgmax-interface-real .sg-action-whatsapp{background:#059669!important;border-color:#059669!important;color:#fff!important;}
body.sgmax-interface-real .sg-action-undo{background:#f59e0b!important;border-color:#f59e0b!important;color:#1f2937!important;}
body.sgmax-interface-real .sg-action-delete{background:#ef4444!important;border-color:#ef4444!important;color:#fff!important;}
body.sgmax-interface-real .sg-action-edit{background:#6366f1!important;border-color:#6366f1!important;color:#fff!important;}
body.sgmax-interface-real .sg-action-view{background:#64748b!important;border-color:#64748b!important;color:#fff!important;}

/* Fiscal e NF-e/NFC-e: grade mais limpa */
body.sgmax-interface-real.sgmax-page-controle-fiscal .table-responsive,
body.sgmax-interface-real.sgmax-page-compras .table-responsive{
  overflow-x:auto!important;
}
body.sgmax-interface-real.sgmax-page-controle-fiscal table.table th,
body.sgmax-interface-real.sgmax-page-controle-fiscal table.table td,
body.sgmax-interface-real.sgmax-page-compras table.table th,
body.sgmax-interface-real.sgmax-page-compras table.table td{
  font-size:12.2px!important;
  padding:.38rem .42rem!important;
}
body.sgmax-interface-real.sgmax-page-controle-fiscal table.table td:last-child,
body.sgmax-interface-real.sgmax-page-controle-fiscal table.table th:last-child,
body.sgmax-interface-real.sgmax-page-compras table.table td:last-child,
body.sgmax-interface-real.sgmax-page-compras table.table th:last-child{
  min-width:252px!important;
  width:252px!important;
}

/* Filtros e cards de botões: sempre alinhados e sem sobrepor */
body.sgmax-interface-real .card .row.align-items-end,
body.sgmax-interface-real .sgmax-filter-card .row,
body.sgmax-interface-real .sgmax-action-filter-card .row{
  row-gap:10px!important;
}
body.sgmax-interface-real .sgmax-filter-card .form-group,
body.sgmax-interface-real .sgmax-action-filter-card .form-group,
body.sgmax-interface-real form .form-group{
  margin-bottom:.65rem!important;
}
body.sgmax-interface-real .sgmax-action-filter-card .btn,
body.sgmax-interface-real .sgmax-filter-card .btn,
body.sgmax-interface-real form .btn{
  white-space:nowrap!important;
}

/* Mobile/tablet: sistema em modo app, responsivo e legível */
@media(max-width:768px){
  html,body{width:100%!important;overflow-x:hidden!important;}
  body.sgmax-interface-real .content-wrapper .container-fluid{
    padding-left:10px!important;
    padding-right:10px!important;
  }
  body.sgmax-interface-real .main-header.navbar{
    height:58px!important;
    min-height:58px!important;
  }
  body.sgmax-interface-real .main-header .navbar-nav.ml-auto:first-of-type{
    flex:1!important;
    justify-content:center!important;
    overflow:hidden!important;
  }
  body.sgmax-interface-real .main-header .navbar-nav.ml-auto:first-of-type .nav-item,
  body.sgmax-interface-real .main-header .navbar-nav.ml-auto:first-of-type li{
    font-size:15px!important;
    line-height:1.1!important;
    white-space:normal!important;
    text-align:center!important;
    max-width:220px!important;
  }
  body.sgmax-interface-real .sgmax-dashboard-home .row:first-child h6{
    font-size:1.25rem!important;
    line-height:1.16!important;
  }
  body.sgmax-interface-real .card{
    border-radius:18px!important;
  }
  body.sgmax-interface-real .card-body{
    padding:.9rem!important;
  }
  body.sgmax-interface-real .form-control,
  body.sgmax-interface-real .custom-select{
    min-height:44px!important;
    font-size:15px!important;
  }
  body.sgmax-interface-real .btn{
    min-height:42px!important;
    font-size:14px!important;
  }
  body.sgmax-interface-real table.table{
    min-width:760px!important;
  }
  body.sgmax-interface-real table.table th,
  body.sgmax-interface-real table.table td{
    font-size:12px!important;
    padding:.38rem .4rem!important;
  }
  body.sgmax-interface-real td.sg-action-cell,
  body.sgmax-interface-real table.table td.sg-action-cell{
    min-width:238px!important;
    width:238px!important;
  }
}

/* PDV Mobile: força comportamento de app e evita conflito de menu global */
@media(max-width:768px){
  body.sgmax-interface-real.sgmax-pdv-mobile-page,
  body.sgmax-interface-real.sgmax-pdv-mobile-manager-page{
    overflow-x:hidden!important;
    background:#f2f7f8!important;
  }
  body.sgmax-interface-real.sgmax-pdv-mobile-page .main-header,
  body.sgmax-interface-real.sgmax-pdv-mobile-page .main-sidebar,
  body.sgmax-interface-real.sgmax-pdv-mobile-page .main-footer,
  body.sgmax-interface-real.sgmax-pdv-mobile-manager-page .main-header,
  body.sgmax-interface-real.sgmax-pdv-mobile-manager-page .main-sidebar,
  body.sgmax-interface-real.sgmax-pdv-mobile-manager-page .main-footer{
    display:none!important;
  }
  body.sgmax-interface-real.sgmax-pdv-mobile-page .content-wrapper,
  body.sgmax-interface-real.sgmax-pdv-mobile-manager-page .content-wrapper{
    margin-left:0!important;
    width:100%!important;
    padding:0!important;
    min-height:100dvh!important;
  }
  body.sgmax-interface-real.sgmax-pdv-mobile-page .content,
  body.sgmax-interface-real.sgmax-pdv-mobile-page .container-fluid,
  body.sgmax-interface-real.sgmax-pdv-mobile-manager-page .content,
  body.sgmax-interface-real.sgmax-pdv-mobile-manager-page .container-fluid{
    padding:0!important;
    margin:0!important;
    max-width:none!important;
  }
}


/* =========================================================
   SGMax Fiscal - v16.12 tabelas compactas + menu mobile + PDV mobile
   ========================================================= */

/* Configurações mais acima, sem ficar presa no rodapé */
body.sgmax-interface-real .main-sidebar .sidebar{
  padding-bottom:58px!important;
}
body.sgmax-interface-real .nav-sidebar .nav-header{
  margin-top:4px!important;
  padding-top:7px!important;
  padding-bottom:3px!important;
}
body.sgmax-interface-real .nav-sidebar .nav-item>.nav-link{
  min-height:32px!important;
  padding:7px 8px!important;
  font-size:12.9px!important;
}
body.sgmax-interface-real .nav-sidebar .nav-item>.nav-link .nav-icon{
  width:19px!important;
  font-size:.86rem!important;
}
body.sgmax-interface-real .nav-sidebar .sgmax-section-hidden{
  display:none!important;
}

/* Menu mobile 1 clique robusto */
@media(max-width:991px){
  body.sgmax-interface-real .main-sidebar{
    transform:translateX(-105%)!important;
    visibility:hidden!important;
    opacity:0!important;
    pointer-events:none!important;
  }
  body.sgmax-interface-real.sgmax-mobile-sidebar-open .main-sidebar{
    transform:translateX(0)!important;
    visibility:visible!important;
    opacity:1!important;
    pointer-events:auto!important;
  }
  body.sgmax-interface-real.sgmax-mobile-sidebar-open .sgmax-sidebar-backdrop{
    display:block!important;
  }
}

/* Tabelas: aproveitar espaço, sem deformar código, ações em uma linha */
body.sgmax-interface-real .table-responsive,
body.sgmax-interface-real .dataTables_wrapper,
body.sgmax-interface-real .card-body.table-responsive{
  overflow-x:auto!important;
  overflow-y:visible!important;
}
body.sgmax-interface-real table.table{
  width:100%!important;
  table-layout:auto!important;
}
body.sgmax-interface-real table.table th,
body.sgmax-interface-real table.table td{
  padding:.34rem .36rem!important;
  font-size:11.8px!important;
  line-height:1.12!important;
  white-space:nowrap!important;
  vertical-align:middle!important;
}
body.sgmax-interface-real table.table th{
  font-size:11.6px!important;
}

/* Código/Número não quebrar em várias linhas */
body.sgmax-interface-real table.table th:nth-child(1),
body.sgmax-interface-real table.table td:nth-child(1){
  width:42px!important;
  min-width:42px!important;
  max-width:54px!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  text-align:center!important;
}
body.sgmax-interface-real table.table th:nth-child(2),
body.sgmax-interface-real table.table td:nth-child(2){
  min-width:62px!important;
  white-space:nowrap!important;
}

/* Descrição/nome ocupa espaço restante sem quebrar layout */
body.sgmax-interface-real table.table td:not(.sg-action-cell):not(.sg-chave-col){
  max-width:240px!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}

/* Célula de ações sempre em uma linha */
body.sgmax-interface-real td.sg-action-cell,
body.sgmax-interface-real table.table td.sg-action-cell,
body.sgmax-interface-real table.table td:last-child.sg-action-cell{
  width:auto!important;
  min-width:248px!important;
  max-width:none!important;
  white-space:nowrap!important;
  overflow:visible!important;
}
body.sgmax-interface-real .sg-action-wrap{
  display:inline-flex!important;
  flex-wrap:nowrap!important;
  gap:3px!important;
  align-items:center!important;
  justify-content:flex-start!important;
  width:auto!important;
  max-width:none!important;
  white-space:nowrap!important;
}
body.sgmax-interface-real .sg-action-wrap form{
  display:inline-flex!important;
  margin:0!important;
  padding:0!important;
  flex:0 0 auto!important;
}
body.sgmax-interface-real .sg-action-wrap .btn,
body.sgmax-interface-real td.sg-action-cell .btn,
body.sgmax-interface-real td.sg-action-cell a.btn,
body.sgmax-interface-real td.sg-action-cell button.btn,
body.sgmax-interface-real .sg-action-wrap form .btn{
  width:23px!important;
  height:23px!important;
  min-width:23px!important;
  max-width:23px!important;
  padding:0!important;
  margin:0!important;
  border-radius:7px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  font-size:0!important;
  line-height:1!important;
  flex:0 0 23px!important;
}
body.sgmax-interface-real .sg-action-wrap .btn i,
body.sgmax-interface-real td.sg-action-cell .btn i{
  font-size:10.5px!important;
  line-height:1!important;
  margin:0!important;
}

/* Tabelas fiscais: chave oculta e ações mais largas */
body.sgmax-interface-real.sgmax-page-controle-fiscal table.table,
body.sgmax-interface-real.sgmax-page-compras table.table{
  min-width:980px!important;
}
body.sgmax-interface-real.sgmax-page-controle-fiscal .sg-chave-col,
body.sgmax-interface-real.sgmax-page-compras .sg-chave-col{
  display:none!important;
}
body.sgmax-interface-real.sgmax-page-controle-fiscal table.table td.sg-action-cell,
body.sgmax-interface-real.sgmax-page-compras table.table td.sg-action-cell{
  min-width:286px!important;
}

/* Em telas comuns, mantém responsivo sem quebrar botões */
@media(max-width:768px){
  body.sgmax-interface-real table.table{
    min-width:780px!important;
  }
  body.sgmax-interface-real table.table th,
  body.sgmax-interface-real table.table td{
    font-size:11.3px!important;
    padding:.32rem .34rem!important;
  }
  body.sgmax-interface-real td.sg-action-cell,
  body.sgmax-interface-real table.table td.sg-action-cell{
    min-width:250px!important;
  }
}

/* PDV Mobile: botão voltar e app layout */
.sgmax-pdv-mobile-back{
  position:fixed!important;
  left:12px!important;
  top:12px!important;
  z-index:10050!important;
  min-width:84px!important;
  height:40px!important;
  border-radius:999px!important;
  background:rgba(15,155,149,.96)!important;
  color:#fff!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:6px!important;
  font-weight:900!important;
  font-size:13px!important;
  box-shadow:0 10px 22px rgba(15,23,42,.18)!important;
  text-decoration:none!important;
}
.sgmax-pdv-mobile-back:hover{
  color:#fff!important;
}

/* Ajuste PDV rápido para não criar rolagem desnecessária */
body.sgmax-interface-real .shortcut-box{
  max-height:calc(100vh - 225px)!important;
}
body.sgmax-interface-real .atalho-line{
  min-height:26px!important;
  padding:4px 0!important;
}
body.sgmax-interface-real .atalho-line span{
  min-width:58px!important;
  font-size:.75rem!important;
}
body.sgmax-interface-real .atalho-line b{
  font-size:.78rem!important;
}


/* =========================================================
   SGMax Fiscal - v16.12 correção real tabelas/menu/PDV mobile
   ========================================================= */

/* Menu lateral ainda mais compacto para Configurações subir */
body.sgmax-interface-real .main-sidebar .brand-link{height:50px!important;min-height:50px!important;max-height:50px!important;}
body.sgmax-interface-real .sgmax-brand-full{font-size:1.45rem!important;}
body.sgmax-interface-real .sgmax-brand-full::before{font-size:1.7rem!important;margin-right:6px!important;}
body.sgmax-interface-real .main-sidebar .sidebar{height:calc(100vh - 50px)!important;padding:5px 5px 72px!important;}
body.sgmax-interface-real .nav-sidebar .nav-header{font-size:.66rem!important;line-height:1!important;padding:7px 7px 3px!important;margin-top:2px!important;}
body.sgmax-interface-real .nav-sidebar .nav-item>.nav-link{min-height:29px!important;padding:5px 7px!important;margin:1px 0!important;font-size:12.3px!important;border-radius:9px!important;}
body.sgmax-interface-real .nav-sidebar .nav-item>.nav-link .nav-icon{font-size:.8rem!important;width:17px!important;margin-right:.25rem!important;}
body.sgmax-interface-real .nav-sidebar .nav-item>.nav-link p{line-height:1.05!important;}
body.sgmax-interface-real .main-footer{min-height:34px!important;padding:8px 12px!important;font-size:12px!important;}

/* Tabelas fiscais: largura distribuída, sem espaços grandes e sem quebra de código */
body.sgmax-interface-real.sgmax-page-controle-fiscal .card-body,
body.sgmax-interface-real.sgmax-page-compras .card-body{padding:.7rem!important;}
body.sgmax-interface-real.sgmax-page-controle-fiscal .table-responsive,
body.sgmax-interface-real.sgmax-page-compras .table-responsive{overflow-x:auto!important;}
body.sgmax-interface-real.sgmax-page-controle-fiscal table.table,
body.sgmax-interface-real.sgmax-page-compras table.table{table-layout:fixed!important;width:100%!important;min-width:0!important;}
body.sgmax-interface-real.sgmax-page-controle-fiscal table.table th,
body.sgmax-interface-real.sgmax-page-controle-fiscal table.table td,
body.sgmax-interface-real.sgmax-page-compras table.table th,
body.sgmax-interface-real.sgmax-page-compras table.table td{font-size:11.2px!important;padding:.30rem .34rem!important;line-height:1.08!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;height:auto!important;}
/* Cód, Número, Valor, Data, Hora, Tipo, Status, Ações */
body.sgmax-interface-real.sgmax-page-controle-fiscal table.table th:nth-child(1),
body.sgmax-interface-real.sgmax-page-controle-fiscal table.table td:nth-child(1),
body.sgmax-interface-real.sgmax-page-compras table.table th:nth-child(1),
body.sgmax-interface-real.sgmax-page-compras table.table td:nth-child(1){width:44px!important;max-width:44px!important;min-width:44px!important;}
body.sgmax-interface-real.sgmax-page-controle-fiscal table.table th:nth-child(2),
body.sgmax-interface-real.sgmax-page-controle-fiscal table.table td:nth-child(2),
body.sgmax-interface-real.sgmax-page-compras table.table th:nth-child(2),
body.sgmax-interface-real.sgmax-page-compras table.table td:nth-child(2){width:74px!important;min-width:74px!important;}
body.sgmax-interface-real.sgmax-page-controle-fiscal table.table th:nth-child(3),
body.sgmax-interface-real.sgmax-page-controle-fiscal table.table td:nth-child(3),
body.sgmax-interface-real.sgmax-page-compras table.table th:nth-child(3),
body.sgmax-interface-real.sgmax-page-compras table.table td:nth-child(3){width:80px!important;}
body.sgmax-interface-real.sgmax-page-controle-fiscal table.table th:nth-child(4),
body.sgmax-interface-real.sgmax-page-controle-fiscal table.table td:nth-child(4),
body.sgmax-interface-real.sgmax-page-compras table.table th:nth-child(4),
body.sgmax-interface-real.sgmax-page-compras table.table td:nth-child(4){width:88px!important;}
body.sgmax-interface-real.sgmax-page-controle-fiscal table.table th:nth-child(5),
body.sgmax-interface-real.sgmax-page-controle-fiscal table.table td:nth-child(5),
body.sgmax-interface-real.sgmax-page-compras table.table th:nth-child(5),
body.sgmax-interface-real.sgmax-page-compras table.table td:nth-child(5){width:72px!important;}
body.sgmax-interface-real.sgmax-page-controle-fiscal table.table th:nth-child(6),
body.sgmax-interface-real.sgmax-page-controle-fiscal table.table td:nth-child(6),
body.sgmax-interface-real.sgmax-page-compras table.table th:nth-child(6),
body.sgmax-interface-real.sgmax-page-compras table.table td:nth-child(6){width:58px!important;}
body.sgmax-interface-real.sgmax-page-controle-fiscal table.table th:nth-child(7),
body.sgmax-interface-real.sgmax-page-controle-fiscal table.table td:nth-child(7),
body.sgmax-interface-real.sgmax-page-compras table.table th:nth-child(7),
body.sgmax-interface-real.sgmax-page-compras table.table td:nth-child(7){width:78px!important;}
body.sgmax-interface-real.sgmax-page-controle-fiscal table.table th:last-child,
body.sgmax-interface-real.sgmax-page-controle-fiscal table.table td:last-child,
body.sgmax-interface-real.sgmax-page-compras table.table th:last-child,
body.sgmax-interface-real.sgmax-page-compras table.table td:last-child{width:305px!important;min-width:305px!important;max-width:305px!important;overflow:visible!important;}

/* Ícones das ações: sempre uma linha. Se precisar, rola só dentro da célula, não empilha. */
body.sgmax-interface-real table.table td:last-child,
body.sgmax-interface-real td.sg-action-cell{white-space:nowrap!important;overflow:visible!important;}
body.sgmax-interface-real .sg-action-wrap,
body.sgmax-interface-real table.table td:last-child .sg-action-wrap{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;gap:2px!important;align-items:center!important;justify-content:flex-start!important;white-space:nowrap!important;overflow:visible!important;width:max-content!important;max-width:none!important;}
body.sgmax-interface-real .sg-action-wrap form,
body.sgmax-interface-real table.table td:last-child form{display:inline-flex!important;flex:0 0 auto!important;margin:0!important;padding:0!important;}
body.sgmax-interface-real .sg-action-wrap .btn,
body.sgmax-interface-real td.sg-action-cell .btn,
body.sgmax-interface-real table.table td:last-child .btn,
body.sgmax-interface-real table.table td:last-child a.btn,
body.sgmax-interface-real table.table td:last-child button.btn{width:19px!important;height:19px!important;min-width:19px!important;max-width:19px!important;flex:0 0 19px!important;padding:0!important;margin:0!important;border-radius:6px!important;font-size:0!important;line-height:1!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;}
body.sgmax-interface-real .sg-action-wrap .btn i,
body.sgmax-interface-real table.table td:last-child .btn i{font-size:8.5px!important;margin:0!important;line-height:1!important;}
body.sgmax-interface-real .sg-action-wrap .btn span,
body.sgmax-interface-real table.table td:last-child .btn span{display:none!important;}

/* Tabelas gerais do sistema: ações também compactas */
body.sgmax-interface-real table.table:not(.dataTable) td:last-child .btn,
body.sgmax-interface-real .dataTables_wrapper table td:last-child .btn{width:22px!important;height:22px!important;min-width:22px!important;padding:0!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;}
body.sgmax-interface-real .dataTables_wrapper table td:last-child{white-space:nowrap!important;}

/* Mobile: tabela vira rolagem horizontal limpa, sem quebrar a tela */
@media(max-width:768px){
  body.sgmax-interface-real .table-responsive{overflow-x:auto!important;}
  body.sgmax-interface-real table.table{min-width:780px!important;}
  body.sgmax-interface-real.sgmax-page-controle-fiscal table.table,
  body.sgmax-interface-real.sgmax-page-compras table.table{min-width:800px!important;}
  body.sgmax-interface-real .content-wrapper .container-fluid{padding-left:8px!important;padding-right:8px!important;}
}

/* PDV Mobile: voltar sem cobrir título */
@media(max-width:768px){
  body.sgmax-interface-real .pdv-mobile-app .pm-top{position:sticky!important;top:0!important;padding:12px 12px 12px!important;border-radius:0 0 20px 20px!important;}
  body.sgmax-interface-real .pdv-mobile-app .pm-back{position:absolute!important;left:10px!important;top:12px!important;height:38px!important;min-width:76px!important;border-radius:999px!important;background:rgba(255,255,255,.18)!important;color:#fff!important;border:1px solid rgba(255,255,255,.25)!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:5px!important;text-decoration:none!important;font-weight:900!important;font-size:12px!important;z-index:3!important;}
  body.sgmax-interface-real .pdv-mobile-app .pm-top-row{min-height:48px!important;padding-left:86px!important;}
  body.sgmax-interface-real .pdv-mobile-app .pm-title-box{flex:1!important;text-align:center!important;}
  body.sgmax-interface-real .pdv-mobile-app .pm-title-box h1{font-size:18px!important;margin:0!important;text-align:center!important;}
  body.sgmax-interface-real .pdv-mobile-app .pm-status{font-size:10px!important;display:inline-flex!important;margin-top:3px!important;}
  body.sgmax-interface-real .pdv-mobile-app .pm-total{font-size:19px!important;}
  body.sgmax-interface-real .sgmax-pdv-mobile-back{display:none!important;}
  body.sgmax-interface-real .pmg-top{position:sticky!important;top:0!important;padding:12px!important;border-radius:0 0 20px 20px!important;}
  body.sgmax-interface-real .pmg-top-row{gap:8px!important;}
  body.sgmax-interface-real .pmg-back{min-width:78px!important;border-radius:999px!important;font-weight:900!important;}
  body.sgmax-interface-real .pmg-title{flex:1!important;text-align:center!important;color:#fff!important;font-weight:900!important;}
  body.sgmax-interface-real .pmg-top-spacer{display:block!important;width:78px!important;}
  body.sgmax-interface-real .pmg-copy-chave{margin-top:6px!important;border-radius:999px!important;font-weight:900!important;}
}


/* =========================================================
   SGMax Fiscal - v16.12 Refino visual responsivo
   Objetivo: devolver leitura do menu, botões e tabelas sem empilhar.
   ========================================================= */

/* MENU LATERAL: tamanho confortável, mas sem jogar Configurações para baixo */
body.sgmax-interface-real .main-sidebar,
body.sgmax-interface-real .main-sidebar::before{
  width:250px!important;
}
body.sgmax-interface-real .content-wrapper,
body.sgmax-interface-real .main-header,
body.sgmax-interface-real .main-footer{
  margin-left:250px!important;
}
body.sgmax-interface-real.sidebar-collapse .main-sidebar,
body.sgmax-interface-real.sidebar-collapse .main-sidebar::before{
  width:4.6rem!important;
}
body.sgmax-interface-real.sidebar-collapse .content-wrapper,
body.sgmax-interface-real.sidebar-collapse .main-header,
body.sgmax-interface-real.sidebar-collapse .main-footer{
  margin-left:4.6rem!important;
}
body.sgmax-interface-real .main-sidebar .brand-link.sgmax-brand-link,
body.sgmax-interface-real .main-sidebar .brand-link{
  height:62px!important;
  min-height:62px!important;
  max-height:62px!important;
}
body.sgmax-interface-real .sgmax-brand-full{
  font-size:1.62rem!important;
}
body.sgmax-interface-real .sgmax-brand-full::before{
  font-size:1.85rem!important;
  margin-right:7px!important;
}
body.sgmax-interface-real .main-sidebar .sidebar{
  height:calc(100vh - 62px)!important;
  padding:8px 7px 74px!important;
}
body.sgmax-interface-real .nav-sidebar .nav-header{
  font-size:.74rem!important;
  padding:9px 8px 4px!important;
  margin-top:2px!important;
  letter-spacing:.055em!important;
}
body.sgmax-interface-real .nav-sidebar .nav-item>.nav-link{
  min-height:36px!important;
  padding:8px 10px!important;
  margin:2px 0!important;
  border-radius:12px!important;
  font-size:14px!important;
  line-height:1.16!important;
}
body.sgmax-interface-real .nav-sidebar .nav-item>.nav-link p{
  line-height:1.16!important;
  font-size:14px!important;
  font-weight:900!important;
}
body.sgmax-interface-real .nav-sidebar .nav-item>.nav-link .nav-icon{
  width:22px!important;
  font-size:.98rem!important;
  margin-right:.42rem!important;
}
body.sgmax-interface-real .nav-sidebar>.nav-item:first-of-type>.nav-link,
body.sgmax-interface-real .nav-sidebar a[href="/inicio/emissor"],
body.sgmax-interface-real .nav-sidebar a[href="/inicio/admin"],
body.sgmax-interface-real .nav-sidebar a[href="/inicio/contador"]{
  min-height:42px!important;
  font-size:14.4px!important;
}
body.sgmax-interface-real .nav-sidebar>.nav-item:first-of-type>.nav-link p,
body.sgmax-interface-real .nav-sidebar a[href="/inicio/emissor"] p,
body.sgmax-interface-real .nav-sidebar a[href="/inicio/admin"] p,
body.sgmax-interface-real .nav-sidebar a[href="/inicio/contador"] p{
  font-size:14.4px!important;
}

/* Configurações fica visível, mas não colada no rodapé */
body.sgmax-interface-real .nav-header.sgmax-toggle-section,
body.sgmax-interface-real .nav-sidebar .nav-header:last-of-type{
  margin-top:6px!important;
  padding-top:8px!important;
  padding-bottom:5px!important;
}
body.sgmax-interface-real .nav-header.sgmax-toggle-section::after{
  font-size:.75rem!important;
  right:8px!important;
}

/* Botão das 3 barrinhas: maior, sem exagerar */
body.sgmax-interface-real .main-header [data-widget="pushmenu"],
body.sgmax-interface-real .main-header [data-sgmax-menu="1"],
body.sgmax-interface-real .main-header .sgmax-mobile-menu-trigger{
  width:46px!important;
  height:46px!important;
  min-width:46px!important;
  border-radius:13px!important;
}
body.sgmax-interface-real .main-header [data-widget="pushmenu"] i,
body.sgmax-interface-real .main-header [data-sgmax-menu="1"] i,
body.sgmax-interface-real .main-header .sgmax-mobile-menu-trigger i{
  font-size:1.28rem!important;
}

/* TABELAS: ícones legíveis e uma linha; espaços mais equilibrados */
body.sgmax-interface-real .card-body.table-responsive,
body.sgmax-interface-real .table-responsive{
  padding:10px!important;
}
body.sgmax-interface-real table.table{
  width:100%!important;
  min-width:0!important;
  table-layout:fixed!important;
}
body.sgmax-interface-real table.table th,
body.sgmax-interface-real table.table td{
  padding:.45rem .48rem!important;
  font-size:12.7px!important;
  line-height:1.18!important;
  white-space:nowrap!important;
  vertical-align:middle!important;
}
body.sgmax-interface-real table.table th{
  font-size:12.4px!important;
  font-weight:950!important;
}

/* Distribuição padrão: código/número/valor/data/hora/status/ações */
body.sgmax-interface-real table.table th:nth-child(1),
body.sgmax-interface-real table.table td:nth-child(1){
  width:56px!important;
  min-width:56px!important;
  max-width:56px!important;
  text-align:center!important;
}
body.sgmax-interface-real table.table th:nth-child(2),
body.sgmax-interface-real table.table td:nth-child(2){
  width:90px!important;
  min-width:74px!important;
}
body.sgmax-interface-real table.table th:nth-child(3),
body.sgmax-interface-real table.table td:nth-child(3){
  width:100px!important;
}
body.sgmax-interface-real table.table th:nth-child(4),
body.sgmax-interface-real table.table td:nth-child(4){
  width:120px!important;
}
body.sgmax-interface-real table.table th:nth-child(5),
body.sgmax-interface-real table.table td:nth-child(5){
  width:92px!important;
}
body.sgmax-interface-real table.table th:nth-child(6),
body.sgmax-interface-real table.table td:nth-child(6){
  width:110px!important;
}
body.sgmax-interface-real table.table th:nth-child(7),
body.sgmax-interface-real table.table td:nth-child(7){
  width:120px!important;
}

/* Coluna ação: largura suficiente para até 12 ícones pequenos em linha */
body.sgmax-interface-real table.table th:last-child,
body.sgmax-interface-real table.table td.sg-action-cell,
body.sgmax-interface-real table.table td:last-child.sg-action-cell,
body.sgmax-interface-real.sgmax-page-controle-fiscal table.table td.sg-action-cell,
body.sgmax-interface-real.sgmax-page-compras table.table td.sg-action-cell{
  width:330px!important;
  min-width:330px!important;
  max-width:330px!important;
  overflow:visible!important;
}

/* Botões de ação: tamanho médio/legível, sem empilhar */
body.sgmax-interface-real .sg-action-wrap{
  display:flex!important;
  flex-direction:row!important;
  flex-wrap:nowrap!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:5px!important;
  width:100%!important;
  max-width:100%!important;
  overflow:visible!important;
  white-space:nowrap!important;
}
body.sgmax-interface-real .sg-action-wrap form{
  display:inline-flex!important;
  flex:0 0 auto!important;
  margin:0!important;
  padding:0!important;
}
body.sgmax-interface-real .sg-action-wrap .btn,
body.sgmax-interface-real td.sg-action-cell .btn,
body.sgmax-interface-real td.sg-action-cell a.btn,
body.sgmax-interface-real td.sg-action-cell button.btn,
body.sgmax-interface-real .sg-action-wrap form .btn{
  width:28px!important;
  height:28px!important;
  min-width:28px!important;
  max-width:28px!important;
  flex:0 0 28px!important;
  border-radius:8px!important;
  padding:0!important;
  margin:0!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  font-size:0!important;
  line-height:1!important;
}
body.sgmax-interface-real .sg-action-wrap .btn i,
body.sgmax-interface-real td.sg-action-cell .btn i{
  font-size:12px!important;
  margin:0!important;
  line-height:1!important;
}

/* Tabelas fiscais sem chave visual e com largura inteligente */
body.sgmax-interface-real.sgmax-page-controle-fiscal table.table,
body.sgmax-interface-real.sgmax-page-compras table.table{
  table-layout:fixed!important;
  min-width:980px!important;
}
body.sgmax-interface-real.sgmax-page-controle-fiscal .sg-chave-col,
body.sgmax-interface-real.sgmax-page-compras .sg-chave-col{
  display:none!important;
}
body.sgmax-interface-real.sgmax-page-controle-fiscal table.table th:nth-child(1),
body.sgmax-interface-real.sgmax-page-controle-fiscal table.table td:nth-child(1),
body.sgmax-interface-real.sgmax-page-compras table.table th:nth-child(1),
body.sgmax-interface-real.sgmax-page-compras table.table td:nth-child(1){
  width:58px!important;
}
body.sgmax-interface-real.sgmax-page-controle-fiscal table.table th:nth-child(2),
body.sgmax-interface-real.sgmax-page-controle-fiscal table.table td:nth-child(2),
body.sgmax-interface-real.sgmax-page-compras table.table th:nth-child(2),
body.sgmax-interface-real.sgmax-page-compras table.table td:nth-child(2){
  width:90px!important;
}
body.sgmax-interface-real.sgmax-page-controle-fiscal table.table th:nth-child(3),
body.sgmax-interface-real.sgmax-page-controle-fiscal table.table td:nth-child(3),
body.sgmax-interface-real.sgmax-page-compras table.table th:nth-child(3),
body.sgmax-interface-real.sgmax-page-compras table.table td:nth-child(3){
  width:110px!important;
}
body.sgmax-interface-real.sgmax-page-controle-fiscal table.table th:nth-child(4),
body.sgmax-interface-real.sgmax-page-controle-fiscal table.table td:nth-child(4),
body.sgmax-interface-real.sgmax-page-compras table.table th:nth-child(4),
body.sgmax-interface-real.sgmax-page-compras table.table td:nth-child(4){
  width:115px!important;
}
body.sgmax-interface-real.sgmax-page-controle-fiscal table.table th:nth-child(5),
body.sgmax-interface-real.sgmax-page-controle-fiscal table.table td:nth-child(5),
body.sgmax-interface-real.sgmax-page-compras table.table th:nth-child(5),
body.sgmax-interface-real.sgmax-page-compras table.table td:nth-child(5){
  width:88px!important;
}
body.sgmax-interface-real.sgmax-page-controle-fiscal table.table th:nth-child(6),
body.sgmax-interface-real.sgmax-page-controle-fiscal table.table td:nth-child(6),
body.sgmax-interface-real.sgmax-page-compras table.table th:nth-child(6),
body.sgmax-interface-real.sgmax-page-compras table.table td:nth-child(6){
  width:100px!important;
}
body.sgmax-interface-real.sgmax-page-controle-fiscal table.table th:nth-child(7),
body.sgmax-interface-real.sgmax-page-controle-fiscal table.table td:nth-child(7),
body.sgmax-interface-real.sgmax-page-compras table.table th:nth-child(7),
body.sgmax-interface-real.sgmax-page-compras table.table td:nth-child(7){
  width:100px!important;
}

/* Para telas de cadastro/listagens gerais, conserva nomes com elipse */
body.sgmax-interface-real table.table td:not(.sg-action-cell):not(.sg-chave-col){
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}

/* Mobile: responsivo por rolagem horizontal suave, sem deformar */
@media(max-width:991px){
  body.sgmax-interface-real .content-wrapper,
  body.sgmax-interface-real .main-header,
  body.sgmax-interface-real .main-footer{
    margin-left:0!important;
  }
  body.sgmax-interface-real .main-sidebar{
    width:min(84vw, 350px)!important;
    max-width:min(84vw, 350px)!important;
  }
  body.sgmax-interface-real .nav-sidebar .nav-item>.nav-link,
  body.sgmax-interface-real .nav-sidebar .nav-item>.nav-link p{
    font-size:15px!important;
  }
  body.sgmax-interface-real .nav-sidebar .nav-item>.nav-link{
    min-height:44px!important;
    padding:10px 12px!important;
  }
  body.sgmax-interface-real .main-header [data-widget="pushmenu"],
  body.sgmax-interface-real .main-header [data-sgmax-menu="1"],
  body.sgmax-interface-real .main-header .sgmax-mobile-menu-trigger{
    width:58px!important;
    height:58px!important;
    min-width:58px!important;
  }
}
@media(max-width:768px){
  body.sgmax-interface-real .table-responsive{
    padding:8px!important;
    overflow-x:auto!important;
  }
  body.sgmax-interface-real table.table,
  body.sgmax-interface-real.sgmax-page-controle-fiscal table.table,
  body.sgmax-interface-real.sgmax-page-compras table.table{
    min-width:980px!important;
    table-layout:fixed!important;
  }
  body.sgmax-interface-real table.table th,
  body.sgmax-interface-real table.table td{
    font-size:12px!important;
    padding:.42rem .42rem!important;
  }
  body.sgmax-interface-real .sg-action-wrap .btn,
  body.sgmax-interface-real td.sg-action-cell .btn{
    width:27px!important;
    height:27px!important;
    min-width:27px!important;
    max-width:27px!important;
    flex-basis:27px!important;
  }
}

/* PDV Mobile: botão voltar abaixo do topo e título central livre */
.sgmax-pdv-mobile-back{
  top:64px!important;
  left:12px!important;
  height:38px!important;
  min-width:78px!important;
  font-size:12.5px!important;
  z-index:10040!important;
}
body.sgmax-interface-real.sgmax-pdv-mobile-page .pm-top h1,
body.sgmax-interface-real.sgmax-pdv-mobile-manager-page .pm-top h1{
  text-align:center!important;
  width:100%!important;
  padding-left:86px!important;
  padding-right:86px!important;
}


/* =========================================================
   SGMax Fiscal - v16.12 ícones bonitos + configurações visível
   ========================================================= */

/* Menu: mantém leitura confortável e deixa Configurações sempre acessível */
body.sgmax-interface-real .main-sidebar .sidebar{
  padding-bottom:108px!important;
}
body.sgmax-interface-real .nav-sidebar .nav-item>.nav-link{
  min-height:35px!important;
  padding:7px 10px!important;
  font-size:13.8px!important;
}
body.sgmax-interface-real .nav-sidebar .nav-item>.nav-link p{
  font-size:13.8px!important;
}
body.sgmax-interface-real .nav-sidebar .nav-header{
  font-size:.72rem!important;
  padding-top:7px!important;
  padding-bottom:3px!important;
}

/* Botão flutuante Configurações no rodapé do menu */
body.sgmax-interface-real .sgmax-config-float{
  position:absolute!important;
  left:8px!important;
  right:8px!important;
  bottom:10px!important;
  z-index:30!important;
  height:42px!important;
  border-radius:14px!important;
  background:rgba(255,255,255,.16)!important;
  border:1px solid rgba(255,255,255,.18)!important;
  color:#fff!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  padding:0 12px!important;
  font-size:13.8px!important;
  font-weight:950!important;
  cursor:pointer!important;
  box-shadow:0 8px 20px rgba(0,0,0,.12)!important;
  backdrop-filter:blur(3px)!important;
}
body.sgmax-interface-real .sgmax-config-float i{
  color:#fff!important;
}
body.sgmax-interface-real .sgmax-config-float:hover{
  background:rgba(255,255,255,.22)!important;
}
body.sgmax-interface-real.sidebar-collapse .sgmax-config-float{
  left:6px!important;
  right:6px!important;
  width:auto!important;
  padding:0!important;
  justify-content:center!important;
}
body.sgmax-interface-real.sidebar-collapse .sgmax-config-float span{
  display:none!important;
}
body.sgmax-interface-real .nav-header.sgmax-toggle-section{
  background:rgba(255,255,255,.12)!important;
  border-radius:12px!important;
  margin:6px 0 4px!important;
  padding:9px 10px!important;
  cursor:pointer!important;
}

/* Tabelas fiscais: distribuição automática com ações legíveis */
body.sgmax-interface-real.sgmax-page-controle-fiscal table.table,
body.sgmax-interface-real.sgmax-page-compras table.table{
  table-layout:auto!important;
  min-width:0!important;
  width:100%!important;
}
body.sgmax-interface-real table.table th,
body.sgmax-interface-real table.table td{
  font-size:12.8px!important;
  padding:.44rem .48rem!important;
}
body.sgmax-interface-real table.table th:nth-child(1),
body.sgmax-interface-real table.table td:nth-child(1){
  width:58px!important;
  min-width:58px!important;
  max-width:68px!important;
}
body.sgmax-interface-real table.table th:nth-child(2),
body.sgmax-interface-real table.table td:nth-child(2){
  width:92px!important;
  min-width:82px!important;
}
body.sgmax-interface-real table.table th:nth-child(3),
body.sgmax-interface-real table.table td:nth-child(3){
  width:105px!important;
  min-width:95px!important;
}
body.sgmax-interface-real table.table th:nth-child(4),
body.sgmax-interface-real table.table td:nth-child(4){
  width:112px!important;
  min-width:105px!important;
}
body.sgmax-interface-real table.table th:nth-child(5),
body.sgmax-interface-real table.table td:nth-child(5){
  width:86px!important;
  min-width:80px!important;
}
body.sgmax-interface-real table.table th:nth-child(6),
body.sgmax-interface-real table.table td:nth-child(6){
  width:95px!important;
  min-width:88px!important;
}
body.sgmax-interface-real .sg-chave-col{
  display:none!important;
}

/* Ações: tamanho adequado, sem achatamento, sem botão alto */
body.sgmax-interface-real table.table td.sg-action-cell,
body.sgmax-interface-real table.table td:last-child.sg-action-cell,
body.sgmax-interface-real.sgmax-page-controle-fiscal table.table td.sg-action-cell,
body.sgmax-interface-real.sgmax-page-compras table.table td.sg-action-cell{
  width:auto!important;
  min-width:calc((var(--sg-actions-count, 8) * 36px) + 12px)!important;
  max-width:none!important;
  white-space:nowrap!important;
  overflow:visible!important;
  padding-left:.55rem!important;
  padding-right:.55rem!important;
}
body.sgmax-interface-real .sg-action-wrap{
  display:flex!important;
  flex-direction:row!important;
  flex-wrap:nowrap!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:6px!important;
  width:max-content!important;
  max-width:none!important;
  white-space:nowrap!important;
  overflow:visible!important;
}
body.sgmax-interface-real .sg-action-wrap form{
  display:inline-flex!important;
  flex:0 0 auto!important;
  margin:0!important;
  padding:0!important;
}
body.sgmax-interface-real .sg-action-wrap .btn,
body.sgmax-interface-real td.sg-action-cell .btn,
body.sgmax-interface-real td.sg-action-cell a.btn,
body.sgmax-interface-real td.sg-action-cell button.btn,
body.sgmax-interface-real .sg-action-wrap form .btn{
  width:32px!important;
  height:32px!important;
  min-width:32px!important;
  min-height:32px!important;
  max-width:32px!important;
  max-height:32px!important;
  flex:0 0 32px!important;
  padding:0!important;
  margin:0!important;
  border-radius:10px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  font-size:0!important;
  line-height:1!important;
  box-shadow:0 5px 11px rgba(15,23,42,.10)!important;
  border:0!important;
  transform:none!important;
}
body.sgmax-interface-real .sg-action-wrap .btn:hover,
body.sgmax-interface-real td.sg-action-cell .btn:hover{
  transform:translateY(-1px)!important;
  filter:brightness(1.03)!important;
}
body.sgmax-interface-real .sg-action-wrap .btn i,
body.sgmax-interface-real td.sg-action-cell .btn i{
  font-size:13.5px!important;
  line-height:1!important;
  margin:0!important;
  width:auto!important;
  height:auto!important;
}

/* Visual mais moderno por ação */
body.sgmax-interface-real .sg-copy-chave{background:linear-gradient(135deg,#38bdf8,#0ea5e9)!important;color:#fff!important;}
body.sgmax-interface-real .sg-action-print{background:linear-gradient(135deg,#14b8a6,#0f766e)!important;color:#fff!important;}
body.sgmax-interface-real .sg-action-sefaz{background:linear-gradient(135deg,#334155,#111827)!important;color:#22d3ee!important;}
body.sgmax-interface-real .sg-action-download{background:linear-gradient(135deg,#22c55e,#10b981)!important;color:#fff!important;}
body.sgmax-interface-real .sg-action-email{background:linear-gradient(135deg,#06b6d4,#0891b2)!important;color:#fff!important;}
body.sgmax-interface-real .sg-action-whatsapp{background:linear-gradient(135deg,#25d366,#16a34a)!important;color:#fff!important;}
body.sgmax-interface-real .sg-action-undo{background:linear-gradient(135deg,#fbbf24,#f59e0b)!important;color:#1f2937!important;}
body.sgmax-interface-real .sg-action-delete{background:linear-gradient(135deg,#fb7185,#ef4444)!important;color:#fff!important;}
body.sgmax-interface-real .sg-action-edit{background:linear-gradient(135deg,#818cf8,#6366f1)!important;color:#fff!important;}
body.sgmax-interface-real .sg-action-view{background:linear-gradient(135deg,#94a3b8,#64748b)!important;color:#fff!important;}

/* Se a tabela tiver muitos botões, deixa a tabela rolar só horizontal, não quebra os ícones */
body.sgmax-interface-real .table-responsive,
body.sgmax-interface-real .card-body.table-responsive{
  overflow-x:auto!important;
  overflow-y:visible!important;
  padding:10px 12px!important;
}
body.sgmax-interface-real table.table{
  border-collapse:collapse!important;
}

/* Responsivo */
@media(max-width:991px){
  body.sgmax-interface-real table.table,
  body.sgmax-interface-real.sgmax-page-controle-fiscal table.table,
  body.sgmax-interface-real.sgmax-page-compras table.table{
    min-width:980px!important;
  }
  body.sgmax-interface-real .sg-action-wrap .btn,
  body.sgmax-interface-real td.sg-action-cell .btn{
    width:31px!important;
    height:31px!important;
    min-width:31px!important;
    min-height:31px!important;
    flex-basis:31px!important;
  }
}
@media(max-width:768px){
  body.sgmax-interface-real .sg-action-wrap{
    gap:5px!important;
  }
  body.sgmax-interface-real .sg-action-wrap .btn,
  body.sgmax-interface-real td.sg-action-cell .btn{
    width:30px!important;
    height:30px!important;
    min-width:30px!important;
    min-height:30px!important;
    flex-basis:30px!important;
  }
}


/* =========================================================
   SGMax Fiscal - v16.12 Menu lateral definitivo + Dashboard pizza
   ========================================================= */

/* Remove o botão flutuante de Configurações que ficou estranho */
body.sgmax-interface-real .sgmax-config-float{
  display:none!important;
}

/* Configurações vira seção normal do menu e fica visível acima do Controle Fiscal */
body.sgmax-interface-real .nav-header.sgmax-toggle-section,
body.sgmax-interface-real .nav-sidebar .nav-header{
  cursor:default!important;
}
body.sgmax-interface-real .nav-sidebar .nav-item.sgmax-section-hidden{
  display:block!important;
}
body.sgmax-interface-real .nav-sidebar .nav-header.sgmax-collapsed::after{
  transform:none!important;
}

/* Menu lateral mais harmonioso e com altura melhor distribuída */
body.sgmax-interface-real .main-sidebar .sidebar{
  padding:8px 7px 24px!important;
}
body.sgmax-interface-real .nav-sidebar .nav-header{
  font-size:.72rem!important;
  padding:8px 9px 3px!important;
  margin-top:3px!important;
  opacity:.95!important;
}
body.sgmax-interface-real .nav-sidebar .nav-item>.nav-link{
  min-height:36px!important;
  padding:8px 10px!important;
  margin:2px 0!important;
  border-radius:12px!important;
  font-size:14px!important;
}
body.sgmax-interface-real .nav-sidebar .nav-item>.nav-link p{
  font-size:14px!important;
  font-weight:900!important;
}
body.sgmax-interface-real .nav-sidebar .nav-item>.nav-link .nav-icon{
  font-size:.96rem!important;
  width:22px!important;
}

/* Destaque sutil para seção Configurações no menu normal */
body.sgmax-interface-real .nav-sidebar .nav-header:nth-of-type(n){
  user-select:none!important;
}
body.sgmax-interface-real .nav-sidebar .nav-header{
  border-radius:10px!important;
}

/* Dashboard: gráficos em modo pizza/doughnut responsivo */
body.sgmax-interface-real .sgmax-dashboard-home #chartjs-valores,
body.sgmax-interface-real .sgmax-dashboard-home #chartjs-quantidades{
  width:100%!important;
  height:300px!important;
  min-height:260px!important;
  max-height:340px!important;
}
body.sgmax-interface-real .sgmax-dashboard-home .card:has(#chartjs-valores),
body.sgmax-interface-real .sgmax-dashboard-home .card:has(#chartjs-quantidades){
  min-height:390px!important;
}
body.sgmax-interface-real .sgmax-dashboard-home .card-body:has(#chartjs-valores),
body.sgmax-interface-real .sgmax-dashboard-home .card-body:has(#chartjs-quantidades){
  padding:1rem!important;
}

/* Compatibilidade caso :has não seja aceito */
body.sgmax-interface-real .sgmax-dashboard-home .chartjs{
  height:300px!important;
  min-height:260px!important;
  max-height:340px!important;
}

/* Ajuste final dos ícones: bonitos sem achatar */
body.sgmax-interface-real .sg-action-wrap .btn,
body.sgmax-interface-real td.sg-action-cell .btn,
body.sgmax-interface-real td.sg-action-cell a.btn,
body.sgmax-interface-real td.sg-action-cell button.btn,
body.sgmax-interface-real .sg-action-wrap form .btn{
  width:34px!important;
  height:34px!important;
  min-width:34px!important;
  min-height:34px!important;
  max-width:34px!important;
  max-height:34px!important;
  flex:0 0 34px!important;
  border-radius:11px!important;
  box-shadow:0 6px 13px rgba(15,23,42,.12)!important;
}
body.sgmax-interface-real .sg-action-wrap .btn i,
body.sgmax-interface-real td.sg-action-cell .btn i{
  font-size:14px!important;
}
body.sgmax-interface-real table.table td.sg-action-cell,
body.sgmax-interface-real table.table td:last-child.sg-action-cell{
  min-width:calc((var(--sg-actions-count, 8) * 40px) + 10px)!important;
}

/* Em telas menores, mantém pizza legível e menu nativo */
@media(max-width:991px){
  body.sgmax-interface-real .sgmax-dashboard-home #chartjs-valores,
  body.sgmax-interface-real .sgmax-dashboard-home #chartjs-quantidades,
  body.sgmax-interface-real .sgmax-dashboard-home .chartjs{
    height:280px!important;
    min-height:250px!important;
  }
}
@media(max-width:768px){
  body.sgmax-interface-real .sgmax-dashboard-home #chartjs-valores,
  body.sgmax-interface-real .sgmax-dashboard-home #chartjs-quantidades,
  body.sgmax-interface-real .sgmax-dashboard-home .chartjs{
    height:250px!important;
    min-height:230px!important;
  }
  body.sgmax-interface-real .sgmax-dashboard-home .card{
    margin-bottom:14px!important;
  }
  body.sgmax-interface-real .nav-sidebar .nav-item>.nav-link,
  body.sgmax-interface-real .nav-sidebar .nav-item>.nav-link p{
    font-size:15px!important;
  }
}


/* =========================================================
   SGMax Fiscal - v16.12 PDV Rápido fullscreen responsivo
   Corrige margem herdada do menu lateral ao entrar em tela cheia.
   ========================================================= */

/* Quando qualquer elemento entra em fullscreen no Chrome/Edge */
html:fullscreen,
body:fullscreen,
.pdv-wrapper:fullscreen,
.content-wrapper:fullscreen{
  background:#eef6f7!important;
}

html:fullscreen body.sgmax-interface-real .main-header,
html:fullscreen body.sgmax-interface-real .main-sidebar,
html:fullscreen body.sgmax-interface-real .main-footer,
body.sgmax-pdv-fullscreen .main-header,
body.sgmax-pdv-fullscreen .main-sidebar,
body.sgmax-pdv-fullscreen .main-footer,
body.sgmax-force-pdv-fullscreen .main-header,
body.sgmax-force-pdv-fullscreen .main-sidebar,
body.sgmax-force-pdv-fullscreen .main-footer{
  display:none!important;
  visibility:hidden!important;
  width:0!important;
  height:0!important;
  min-height:0!important;
  overflow:hidden!important;
}

/* Remove definitivamente a margem lateral no fullscreen */
html:fullscreen body.sgmax-interface-real .content-wrapper,
html:fullscreen body.sgmax-interface-real.sidebar-collapse .content-wrapper,
body.sgmax-pdv-fullscreen .content-wrapper,
body.sgmax-pdv-fullscreen.sidebar-collapse .content-wrapper,
body.sgmax-force-pdv-fullscreen .content-wrapper,
body.sgmax-force-pdv-fullscreen.sidebar-collapse .content-wrapper{
  margin-left:0!important;
  margin-right:0!important;
  width:100vw!important;
  max-width:100vw!important;
  min-height:100vh!important;
  height:100vh!important;
  padding:0!important;
  overflow:hidden!important;
  background:#eef6f7!important;
}

html:fullscreen body.sgmax-interface-real .content,
html:fullscreen body.sgmax-interface-real .container-fluid,
body.sgmax-pdv-fullscreen .content,
body.sgmax-pdv-fullscreen .container-fluid,
body.sgmax-force-pdv-fullscreen .content,
body.sgmax-force-pdv-fullscreen .container-fluid{
  margin:0!important;
  padding:8px 10px!important;
  max-width:none!important;
  width:100%!important;
  height:100%!important;
}

/* PDV ocupando a largura inteira */
html:fullscreen body.sgmax-interface-real .pdv-wrapper,
body.sgmax-pdv-fullscreen .pdv-wrapper,
body.sgmax-force-pdv-fullscreen .pdv-wrapper{
  width:100vw!important;
  max-width:100vw!important;
  height:100vh!important;
  min-height:100vh!important;
  margin:0!important;
  padding:8px 10px!important;
  overflow:hidden!important;
  background:#eef6f7!important;
}

/* Topo compacto no fullscreen */
html:fullscreen body.sgmax-interface-real .pdv-topbar,
body.sgmax-pdv-fullscreen .pdv-topbar,
body.sgmax-force-pdv-fullscreen .pdv-topbar{
  margin:0 0 8px!important;
  min-height:66px!important;
  height:66px!important;
  border-radius:16px!important;
  padding:10px 16px!important;
}
html:fullscreen body.sgmax-interface-real .pdv-topbar h4,
body.sgmax-pdv-fullscreen .pdv-topbar h4,
body.sgmax-force-pdv-fullscreen .pdv-topbar h4{
  font-size:1.25rem!important;
}

/* Oculta a dica amarela de fullscreen para economizar altura */
html:fullscreen body.sgmax-interface-real .pdv-topbar small,
body.sgmax-pdv-fullscreen .pdv-topbar small,
body.sgmax-force-pdv-fullscreen .pdv-topbar small{
  display:none!important;
}

/* Aviso caixa fechado compacto */
html:fullscreen body.sgmax-interface-real .pdv-wrapper .alert,
body.sgmax-pdv-fullscreen .pdv-wrapper .alert,
body.sgmax-force-pdv-fullscreen .pdv-wrapper .alert{
  margin:0 0 8px!important;
  padding:8px 12px!important;
  min-height:42px!important;
  border-radius:14px!important;
  font-size:.9rem!important;
}

/* Grid do PDV: esquerda ampla, direita fixa, tudo sem scroll */
html:fullscreen body.sgmax-interface-real .pdv-main,
body.sgmax-pdv-fullscreen .pdv-main,
body.sgmax-force-pdv-fullscreen .pdv-main{
  display:grid!important;
  grid-template-columns:minmax(0, 1fr) 310px!important;
  gap:10px!important;
  height:calc(100vh - 132px)!important;
  max-height:calc(100vh - 132px)!important;
  overflow:hidden!important;
}

html:fullscreen body.sgmax-interface-real .pdv-left,
body.sgmax-pdv-fullscreen .pdv-left,
body.sgmax-force-pdv-fullscreen .pdv-left{
  min-width:0!important;
  height:100%!important;
  overflow:hidden!important;
}

html:fullscreen body.sgmax-interface-real .pdv-right,
body.sgmax-pdv-fullscreen .pdv-right,
body.sgmax-force-pdv-fullscreen .pdv-right{
  width:310px!important;
  min-width:310px!important;
  max-width:310px!important;
  height:100%!important;
  overflow:hidden!important;
}

/* Cards compactos no fullscreen */
html:fullscreen body.sgmax-interface-real .pdv-card,
body.sgmax-pdv-fullscreen .pdv-card,
body.sgmax-force-pdv-fullscreen .pdv-card{
  padding:10px 12px!important;
  border-radius:14px!important;
  margin-bottom:8px!important;
}

html:fullscreen body.sgmax-interface-real .pdv-card .form-control-lg,
body.sgmax-pdv-fullscreen .pdv-card .form-control-lg,
body.sgmax-force-pdv-fullscreen .pdv-card .form-control-lg{
  height:40px!important;
  min-height:40px!important;
  font-size:.98rem!important;
}

html:fullscreen body.sgmax-interface-real .produto-atual,
body.sgmax-pdv-fullscreen .produto-atual,
body.sgmax-force-pdv-fullscreen .produto-atual{
  margin-top:6px!important;
  font-size:.95rem!important;
}

html:fullscreen body.sgmax-interface-real .itens-card,
body.sgmax-pdv-fullscreen .itens-card,
body.sgmax-force-pdv-fullscreen .itens-card{
  height:calc(100% - 122px)!important;
  min-height:0!important;
  overflow:auto!important;
}

/* Lateral de totais/atalhos sempre visível */
html:fullscreen body.sgmax-interface-real .total-box,
body.sgmax-pdv-fullscreen .total-box,
body.sgmax-force-pdv-fullscreen .total-box{
  min-height:96px!important;
  padding:12px 14px!important;
  margin-bottom:8px!important;
}

html:fullscreen body.sgmax-interface-real .total-value,
body.sgmax-pdv-fullscreen .total-value,
body.sgmax-force-pdv-fullscreen .total-value{
  font-size:2.25rem!important;
}

html:fullscreen body.sgmax-interface-real .shortcut-box,
body.sgmax-pdv-fullscreen .shortcut-box,
body.sgmax-force-pdv-fullscreen .shortcut-box{
  height:calc(100% - 104px)!important;
  max-height:none!important;
  overflow:hidden!important;
  padding:12px!important;
}

html:fullscreen body.sgmax-interface-real .shortcut-main,
body.sgmax-pdv-fullscreen .shortcut-main,
body.sgmax-force-pdv-fullscreen .shortcut-main{
  height:42px!important;
  min-height:42px!important;
  margin-bottom:7px!important;
}

html:fullscreen body.sgmax-interface-real .atalhos-title,
body.sgmax-pdv-fullscreen .atalhos-title,
body.sgmax-force-pdv-fullscreen .atalhos-title{
  margin:6px 0 4px!important;
  font-size:.78rem!important;
}

html:fullscreen body.sgmax-interface-real .atalho-line,
body.sgmax-pdv-fullscreen .atalho-line,
body.sgmax-force-pdv-fullscreen .atalho-line{
  min-height:24px!important;
  padding:3px 0!important;
}

html:fullscreen body.sgmax-interface-real .atalho-line span,
body.sgmax-pdv-fullscreen .atalho-line span,
body.sgmax-force-pdv-fullscreen .atalho-line span{
  min-width:54px!important;
  font-size:.72rem!important;
  padding:3px 7px!important;
}

html:fullscreen body.sgmax-interface-real .atalho-line b,
body.sgmax-pdv-fullscreen .atalho-line b,
body.sgmax-force-pdv-fullscreen .atalho-line b{
  font-size:.74rem!important;
}

/* Em telas menores, reduz lateral sem perder atalhos */
@media(max-width:1200px){
  html:fullscreen body.sgmax-interface-real .pdv-main,
  body.sgmax-pdv-fullscreen .pdv-main,
  body.sgmax-force-pdv-fullscreen .pdv-main{
    grid-template-columns:minmax(0, 1fr) 280px!important;
  }
  html:fullscreen body.sgmax-interface-real .pdv-right,
  body.sgmax-pdv-fullscreen .pdv-right,
  body.sgmax-force-pdv-fullscreen .pdv-right{
    width:280px!important;
    min-width:280px!important;
    max-width:280px!important;
  }
}

/* Se a tela for muito estreita, vira empilhado, mas ainda sem menu lateral */
@media(max-width:900px){
  html:fullscreen body.sgmax-interface-real .pdv-main,
  body.sgmax-pdv-fullscreen .pdv-main,
  body.sgmax-force-pdv-fullscreen .pdv-main{
    grid-template-columns:1fr!important;
    grid-template-rows:auto 1fr!important;
    overflow:auto!important;
  }
  html:fullscreen body.sgmax-interface-real .pdv-right,
  body.sgmax-pdv-fullscreen .pdv-right,
  body.sgmax-force-pdv-fullscreen .pdv-right{
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
  }
}


/* =========================================================
   SGMax Fiscal v16.12.3 - Ícones de ação semânticos
   APENAS botões/ícones de ação:
   - cores diferentes
   - símbolo coerente com a ação
   - tamanho quadrado
   - espaçamento seguro
   ========================================================= */

body.sgmax-interface-real td.sg-action-cell,
body.sgmax-interface-real table.table td.sg-action-cell,
body.sgmax-interface-real table.table td:last-child:has(.btn){
  white-space:nowrap!important;
  overflow:visible!important;
  min-width:var(--sg-action-cell-width, 440px)!important;
  width:var(--sg-action-cell-width, 440px)!important;
  max-width:none!important;
  padding:10px 14px!important;
}

body.sgmax-interface-real .sg-action-wrap{
  display:inline-flex!important;
  flex-direction:row!important;
  flex-wrap:nowrap!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:14px!important;
  column-gap:14px!important;
  row-gap:0!important;
  width:max-content!important;
  max-width:none!important;
  white-space:nowrap!important;
  overflow:visible!important;
  padding:4px 0!important;
}

body.sgmax-interface-real .sg-action-wrap form,
body.sgmax-interface-real table.table td:last-child form{
  display:inline-flex!important;
  flex:0 0 auto!important;
  margin:0!important;
  padding:0!important;
}

body.sgmax-interface-real .sg-action-wrap .btn,
body.sgmax-interface-real .sg-action-cell .btn,
body.sgmax-interface-real td.sg-action-cell a.btn,
body.sgmax-interface-real td.sg-action-cell button.btn,
body.sgmax-interface-real table.table td:last-child:has(.btn) .btn{
  width:42px!important;
  height:42px!important;
  min-width:42px!important;
  min-height:42px!important;
  max-width:42px!important;
  max-height:42px!important;
  flex:0 0 42px!important;
  border-radius:10px!important;
  padding:0!important;
  margin:0!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  line-height:1!important;
  border:0!important;
  box-shadow:0 7px 16px rgba(15,23,42,.16)!important;
  transform:none!important;
  font-size:0!important;
}

body.sgmax-interface-real .sg-action-wrap .btn i,
body.sgmax-interface-real .sg-action-cell .btn i,
body.sgmax-interface-real table.table td:last-child:has(.btn) .btn i{
  font-size:16px!important;
  line-height:1!important;
  margin:0!important;
  width:auto!important;
  height:auto!important;
  pointer-events:none!important;
}

body.sgmax-interface-real .sg-action-wrap .btn span,
body.sgmax-interface-real .sg-action-cell .btn span{
  display:none!important;
}

/* Cores por ação */
body.sgmax-interface-real .sg-action-copy{background:#0ea5e9!important;color:#fff!important;}         /* copiar chave */
body.sgmax-interface-real .sg-action-print{background:#0f766e!important;color:#fff!important;}        /* imprimir */
body.sgmax-interface-real .sg-action-sefaz{background:#1f2937!important;color:#22d3ee!important;}     /* consultar SEFAZ */
body.sgmax-interface-real .sg-action-download{background:#10b981!important;color:#fff!important;}     /* baixar XML/PDF */
body.sgmax-interface-real .sg-action-email{background:#0891b2!important;color:#fff!important;}        /* e-mail */
body.sgmax-interface-real .sg-action-whatsapp{background:#16a34a!important;color:#fff!important;}     /* WhatsApp */
body.sgmax-interface-real .sg-action-edit{background:#facc15!important;color:#1f2937!important;}      /* editar amarelo */
body.sgmax-interface-real .sg-action-return{background:#f59e0b!important;color:#1f2937!important;}    /* devolução/retorno */
body.sgmax-interface-real .sg-action-cancel{background:#ef4444!important;color:#fff!important;}       /* cancelar/excluir */
body.sgmax-interface-real .sg-action-pdf{background:#dc2626!important;color:#fff!important;}          /* PDF */
body.sgmax-interface-real .sg-action-history{background:#64748b!important;color:#fff!important;}      /* histórico */
body.sgmax-interface-real .sg-action-view{background:#7c3aed!important;color:#fff!important;}         /* visualizar */
body.sgmax-interface-real .sg-action-cce{background:#eab308!important;color:#1f2937!important;}       /* carta correção */
body.sgmax-interface-real .sg-action-default{background:#475569!important;color:#fff!important;}

@media(hover:hover){
  body.sgmax-interface-real .sg-action-wrap .btn:hover,
  body.sgmax-interface-real .sg-action-cell .btn:hover{
    transform:translateY(-1px)!important;
    filter:brightness(1.06)!important;
  }
}

body.sgmax-interface-real .table-responsive,
body.sgmax-interface-real .card-body.table-responsive,
body.sgmax-interface-real .dataTables_wrapper{
  overflow-x:auto!important;
  overflow-y:visible!important;
}

@media(max-width:991px){
  body.sgmax-interface-real .sg-action-wrap{
    gap:12px!important;
    column-gap:12px!important;
  }

  body.sgmax-interface-real .sg-action-wrap .btn,
  body.sgmax-interface-real .sg-action-cell .btn,
  body.sgmax-interface-real table.table td:last-child:has(.btn) .btn{
    width:42px!important;
    height:42px!important;
    min-width:42px!important;
    min-height:42px!important;
    flex-basis:42px!important;
  }
}


/* =========================================================
   SGMax Fiscal v16.12.4 - correção dos ícones de ação
   Corrige WhatsApp, e-mail, XML, impressão rápida e cancelamento no PDV gerenciar.
   ========================================================= */

body.sgmax-interface-real .sg-action-wrap .btn,
body.sgmax-interface-real .sg-action-cell .btn,
body.sgmax-interface-real td.sg-action-cell a.btn,
body.sgmax-interface-real td.sg-action-cell button.btn,
body.sgmax-interface-real table.table td:last-child:has(.btn) .btn{
  width:42px!important;
  height:42px!important;
  min-width:42px!important;
  min-height:42px!important;
  max-width:42px!important;
  max-height:42px!important;
  flex:0 0 42px!important;
  border-radius:10px!important;
  padding:0!important;
  margin:0!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  font-size:0!important;
  line-height:1!important;
  border:0!important;
  box-shadow:0 7px 16px rgba(15,23,42,.16)!important;
}

body.sgmax-interface-real .sg-action-wrap{
  gap:14px!important;
  column-gap:14px!important;
}

body.sgmax-interface-real .sg-action-wrap .btn i,
body.sgmax-interface-real .sg-action-cell .btn i{
  font-size:16px!important;
  line-height:1!important;
  margin:0!important;
}

/* Cores definitivas */
body.sgmax-interface-real .sg-action-copy{background:#0ea5e9!important;color:#fff!important;}
body.sgmax-interface-real .sg-action-danfe{background:#0f766e!important;color:#fff!important;}
body.sgmax-interface-real .sg-action-print{background:#0f766e!important;color:#fff!important;}
body.sgmax-interface-real .sg-action-print-fast{background:#155e75!important;color:#fff!important;}
body.sgmax-interface-real .sg-action-sefaz{background:#1f2937!important;color:#22d3ee!important;}
body.sgmax-interface-real .sg-action-download{background:#10b981!important;color:#fff!important;}
body.sgmax-interface-real .sg-action-email{background:#2563eb!important;color:#fff!important;}
body.sgmax-interface-real .sg-action-whatsapp{background:#16a34a!important;color:#fff!important;}
body.sgmax-interface-real .sg-action-edit{background:#facc15!important;color:#1f2937!important;}
body.sgmax-interface-real .sg-action-return{background:#f59e0b!important;color:#1f2937!important;}
body.sgmax-interface-real .sg-action-cancel{background:#ef4444!important;color:#fff!important;}
body.sgmax-interface-real .sg-action-pdf{background:#dc2626!important;color:#fff!important;}
body.sgmax-interface-real .sg-action-history{background:#64748b!important;color:#fff!important;}
body.sgmax-interface-real .sg-action-view{background:#7c3aed!important;color:#fff!important;}
body.sgmax-interface-real .sg-action-cce{background:#eab308!important;color:#1f2937!important;}
body.sgmax-interface-real .sg-action-info{background:#334155!important;color:#fff!important;}
body.sgmax-interface-real .sg-action-default{background:#475569!important;color:#fff!important;}

body.sgmax-interface-real td.sg-action-cell,
body.sgmax-interface-real table.table td.sg-action-cell,
body.sgmax-interface-real table.table td:last-child:has(.btn){
  min-width:var(--sg-action-cell-width, 440px)!important;
  width:var(--sg-action-cell-width, 440px)!important;
  white-space:nowrap!important;
  overflow:visible!important;
}


/* SGMax Fiscal v16.12.5 - Correção específica Gerenciar PDV/NFC-e */
body.sgmax-interface-real .sg-action-print-fast{
  background:#155e75!important;
  color:#fff!important;
}
body.sgmax-interface-real .sg-action-pdf{
  background:#dc2626!important;
  color:#fff!important;
}
body.sgmax-interface-real .sg-action-whatsapp{
  background:#16a34a!important;
  color:#fff!important;
}
body.sgmax-interface-real .sg-action-cancel{
  background:#ef4444!important;
  color:#fff!important;
}


/* =========================================================
   SGMax Fiscal v16.12.6 - Correções finais de ícones
   - Cadastros do Controle Geral: visualizar / editar / excluir
   - NFe Controle Fiscal: ordem correta das ações
   ========================================================= */

body.sgmax-interface-real .sg-action-view{
  background:#475569!important;
  color:#fff!important;
}
body.sgmax-interface-real .sg-action-pdv{
  background:#0f766e!important;
  color:#fff!important;
}
body.sgmax-interface-real .sg-action-print-fast-a4{
  background:#155e75!important;
  color:#fff!important;
}
body.sgmax-interface-real .sg-action-cce-print{
  background:#0d9488!important;
  color:#fff!important;
}
body.sgmax-interface-real .sg-action-cce{
  background:#facc15!important;
  color:#1f2937!important;
}
body.sgmax-interface-real .sg-action-history{
  background:#64748b!important;
  color:#fff!important;
}
body.sgmax-interface-real .sg-action-whatsapp{
  background:#16a34a!important;
  color:#fff!important;
}
body.sgmax-interface-real .sg-action-cancel{
  background:#ef4444!important;
  color:#fff!important;
}


/* SGMax Fiscal v16.12.7 - Correção NFe: 2º botão é PDF */
body.sgmax-interface-real .sg-action-pdf{
  background:#dc2626!important;
  color:#fff!important;
}
body.sgmax-interface-real .sg-action-print-fast-a4{
  background:#155e75!important;
  color:#fff!important;
}
body.sgmax-interface-real .sg-action-whatsapp{
  background:#16a34a!important;
  color:#fff!important;
}
body.sgmax-interface-real .sg-action-email{
  background:#2563eb!important;
  color:#fff!important;
}
body.sgmax-interface-real .sg-action-download{
  background:#10b981!important;
  color:#fff!important;
}
body.sgmax-interface-real .sg-action-cce{
  background:#facc15!important;
  color:#1f2937!important;
}
body.sgmax-interface-real .sg-action-cce-print{
  background:#0d9488!important;
  color:#fff!important;
}
body.sgmax-interface-real .sg-action-history{
  background:#64748b!important;
  color:#fff!important;
}
body.sgmax-interface-real .sg-action-cancel{
  background:#ef4444!important;
  color:#fff!important;
}


/* SGMax v16.25 - força cache e tamanho dos ícones de ação */
body.sgmax-interface-real .sg-action-wrap{display:inline-flex!important;flex-wrap:nowrap!important;gap:9px!important;align-items:center!important;white-space:nowrap!important;width:max-content!important;max-width:none!important;}
body.sgmax-interface-real td.sg-action-cell{white-space:nowrap!important;overflow:visible!important;min-width:var(--sg-action-cell-width,360px)!important;width:auto!important;}
body.sgmax-interface-real .sg-action-wrap .btn,body.sgmax-interface-real .sg-action-cell .btn{width:34px!important;height:34px!important;min-width:34px!important;min-height:34px!important;max-width:34px!important;max-height:34px!important;flex:0 0 34px!important;border-radius:9px!important;padding:0!important;margin:0!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;font-size:0!important;line-height:1!important;border:0!important;box-shadow:0 4px 10px rgba(15,23,42,.15)!important;}
body.sgmax-interface-real .sg-action-wrap .btn i,body.sgmax-interface-real .sg-action-cell .btn i{font-size:14px!important;line-height:1!important;margin:0!important;}
body.sgmax-interface-real .sg-action-copy{background:#0ea5e9!important;color:#fff!important;}
body.sgmax-interface-real .sg-action-pdf{background:#dc2626!important;color:#fff!important;}
body.sgmax-interface-real .sg-action-print-fast-a4,body.sgmax-interface-real .sg-action-print-fast{background:#155e75!important;color:#fff!important;}
body.sgmax-interface-real .sg-action-print,body.sgmax-interface-real .sg-action-danfe{background:#0f766e!important;color:#fff!important;}
body.sgmax-interface-real .sg-action-download{background:#10b981!important;color:#fff!important;}
body.sgmax-interface-real .sg-action-email{background:#2563eb!important;color:#fff!important;}
body.sgmax-interface-real .sg-action-whatsapp{background:#16a34a!important;color:#fff!important;}
body.sgmax-interface-real .sg-action-return{background:#f59e0b!important;color:#1f2937!important;}
body.sgmax-interface-real .sg-action-cce{background:#facc15!important;color:#1f2937!important;}
body.sgmax-interface-real .sg-action-history{background:#64748b!important;color:#fff!important;}
body.sgmax-interface-real .sg-action-cce-print{background:#0d9488!important;color:#fff!important;}
body.sgmax-interface-real .sg-action-cancel{background:#ef4444!important;color:#fff!important;}
body.sgmax-interface-real .sg-action-view{background:#475569!important;color:#fff!important;}
body.sgmax-interface-real .sg-action-edit{background:#facc15!important;color:#1f2937!important;}


/* SGMax v16.26 - correção visual segura dos botões de ação */
body.sgmax-interface-real .sg-action-wrap{display:inline-flex!important;flex-wrap:nowrap!important;align-items:center!important;gap:12px!important;white-space:nowrap!important;overflow:visible!important;}
body.sgmax-interface-real .sg-action-wrap form{display:inline-flex!important;margin:0!important;padding:0!important;}
body.sgmax-interface-real .sg-action-cell{white-space:nowrap!important;overflow:visible!important;}
body.sgmax-interface-real .sg-action-wrap .btn,
body.sgmax-interface-real .sg-action-cell .btn{width:42px!important;height:42px!important;min-width:42px!important;min-height:42px!important;border-radius:10px!important;padding:0!important;margin:0!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;font-size:0!important;border:0!important;box-shadow:0 6px 14px rgba(15,23,42,.16)!important;}
body.sgmax-interface-real .sg-action-wrap .btn i,
body.sgmax-interface-real .sg-action-cell .btn i{font-size:16px!important;line-height:1!important;margin:0!important;}
body.sgmax-interface-real .sg-action-copy{background:#0ea5e9!important;color:#fff!important;}
body.sgmax-interface-real .sg-action-pdf{background:#dc2626!important;color:#fff!important;}
body.sgmax-interface-real .sg-action-print-fast-a4{background:#155e75!important;color:#fff!important;}
body.sgmax-interface-real .sg-action-print{background:#0f766e!important;color:#fff!important;}
body.sgmax-interface-real .sg-action-print-fast{background:#155e75!important;color:#fff!important;}
body.sgmax-interface-real .sg-action-download{background:#10b981!important;color:#fff!important;}
body.sgmax-interface-real .sg-action-email{background:#2563eb!important;color:#fff!important;}
body.sgmax-interface-real .sg-action-whatsapp{background:#16a34a!important;color:#fff!important;}
body.sgmax-interface-real .sg-action-return{background:#f59e0b!important;color:#1f2937!important;}
body.sgmax-interface-real .sg-action-cce{background:#facc15!important;color:#1f2937!important;}
body.sgmax-interface-real .sg-action-history{background:#64748b!important;color:#fff!important;}
body.sgmax-interface-real .sg-action-cce-print{background:#0d9488!important;color:#fff!important;}
body.sgmax-interface-real .sg-action-cancel{background:#ef4444!important;color:#fff!important;}
body.sgmax-interface-real .sg-action-view{background:#475569!important;color:#fff!important;}
body.sgmax-interface-real .sg-action-edit{background:#facc15!important;color:#1f2937!important;}
