:root{--nav:#111827;--red:#b91c1c;--red2:#dc2626;--bg:#f4f6fa;--text:#172033;--muted:#6b7280;--line:#e5e7eb;--green:#16835b}*{box-sizing:border-box}body{margin:0;font-family:Inter,Segoe UI,Arial,sans-serif;background:var(--bg);color:var(--text);display:flex;min-height:100vh}.sidebar{width:250px;background:linear-gradient(180deg,#111827,#171d2b);color:#fff;position:fixed;inset:0 auto 0 0;padding:26px 16px;display:flex;flex-direction:column}.brand{display:flex;gap:12px;align-items:center;padding:0 10px 28px}.brand .logo{width:43px;height:43px;background:linear-gradient(145deg,#dc2626,#8f1111);border-radius:13px;display:grid;place-items:center;font:700 24px Georgia}.brand strong{letter-spacing:1.8px}.brand small,.user small{display:block;color:#9ca3af;margin-top:3px}.nav{border:0;color:#bfc6d2;background:transparent;width:100%;padding:13px 15px;border-radius:9px;text-align:left;font-size:15px;margin:2px 0;cursor:pointer}.nav:hover,.nav.active{background:#2a3140;color:#fff}.nav.active{box-shadow:inset 3px 0 var(--red2)}.nav span{margin-left:12px}.branch{margin-top:auto;border-top:1px solid #343b49;padding:18px 8px 0}.branch small{color:#9097a5;letter-spacing:1px}.branch select{width:100%;margin-top:9px;background:#252c3a;border:1px solid #3b4353;color:white;padding:10px;border-radius:8px}main{margin-left:250px;padding:0 32px 40px;width:calc(100% - 250px)}header{height:92px;display:flex;align-items:center;justify-content:space-between}h1{font-size:27px;margin:0}header p,.panel p{margin:6px 0 0;color:var(--muted)}.user{display:flex;align-items:center;gap:10px}.avatar{background:#fee2e2;color:#991b1b;width:40px;height:40px;border-radius:50%;display:grid;place-items:center;font-weight:700}.demo{background:#fff7ed;color:#9a3412;border:1px solid #fed7aa;padding:9px 14px;border-radius:8px;font-size:12px;margin-bottom:20px}.page{display:none}.page.active{display:block}.cards{display:grid;grid-template-columns:repeat(4,1fr);gap:18px}.cards article,.panel,.empty{background:white;border:1px solid var(--line);border-radius:13px;padding:22px;box-shadow:0 1px 2px #00000008}.cards span{color:var(--muted);font-size:12px;font-weight:700;letter-spacing:.7px}.cards b{display:block;font-size:28px;margin:14px 0 10px}.cards em{font-size:12px;color:var(--green);font-style:normal}.cards .alert em{color:#b45309}.grid{display:grid;grid-template-columns:minmax(0,2.2fr) minmax(250px,.8fr);gap:18px;margin-top:18px}.panel-head,.toolbar{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px}.panel h2,.empty h2{font-size:18px;margin:0}.primary{background:var(--red);color:#fff!important;border:0!important;border-radius:8px;padding:11px 16px;cursor:pointer;font-weight:600}.table-wrap{overflow:auto}table{border-collapse:collapse;width:100%;font-size:14px}th{text-align:left;color:var(--muted);font-size:11px;letter-spacing:.5px;padding:12px;border-bottom:1px solid var(--line)}td{padding:14px 12px;border-bottom:1px solid #f0f1f4}.status{font-size:11px;padding:5px 8px;border-radius:20px;background:#dcfce7;color:#166534;font-weight:700}.status.open{background:#fef3c7;color:#92400e}.quick{display:grid;gap:10px;margin-top:20px}.quick button{background:#fafafa;border:1px solid var(--line);padding:14px;border-radius:9px;text-align:left;cursor:pointer}.quick b{display:inline-grid;place-items:center;width:28px;height:28px;border-radius:7px;background:#fee2e2;color:var(--red);margin-right:10px}.toolbar{margin-bottom:16px}.toolbar input{width:min(500px,55%);padding:12px 14px;border:1px solid var(--line);border-radius:9px;background:white}.notice,.warning{margin-top:20px;padding:16px;border-radius:9px;background:#eff6ff;color:#1e40af}.warning{background:#fff7ed;color:#9a3412}.empty{text-align:center;padding:70px 20px}.empty>div{font-size:38px;color:var(--red)}.empty p{color:var(--muted);margin:10px 0 20px}dialog{border:0;border-radius:14px;padding:0;width:520px;box-shadow:0 25px 80px #0005}dialog::backdrop{background:#111827aa}dialog form{padding:24px}.modal-head{display:flex;justify-content:space-between}.modal-head button{border:0;background:none;font-size:28px;cursor:pointer}label{display:block;font-size:13px;font-weight:600;margin-top:15px}label input{width:100%;padding:11px;border:1px solid var(--line);border-radius:8px;margin-top:6px}.row{display:grid;grid-template-columns:1fr 1fr;gap:12px}.actions{display:flex;justify-content:flex-end;gap:10px;margin-top:24px}.actions button{padding:10px 15px;border:1px solid var(--line);background:white;border-radius:8px}@media(max-width:1150px){.cards{grid-template-columns:1fr 1fr}.grid{grid-template-columns:1fr}.sidebar{width:210px}main{margin-left:210px;width:calc(100% - 210px)}}

/* v0.8.8 — visual ERP desktop inspirado na referência aprovada */
body{padding-top:50px;padding-bottom:34px;background:#f3f6fa}
.erp-topbar{position:fixed;z-index:80;left:0;right:0;top:0;height:50px;background:linear-gradient(#fff,#edf3f9);border-bottom:1px solid #b8c8d8;display:flex;align-items:center;box-shadow:0 1px 4px #0001}
.erp-appname{height:100%;display:flex;align-items:center;gap:9px;padding:0 17px;border-right:1px solid #ccd8e4;min-width:255px;font-size:18px;color:#111}
.erp-appname small{font-size:12px;color:#526274;font-weight:500}.erp-cube{display:grid;place-items:center;width:28px;height:28px;border-radius:7px;background:#147bd1;color:#fff;font-size:19px}
.erp-global-actions{display:flex;height:100%;align-items:stretch}.erp-global-actions button{border:0;border-right:1px solid #d5dee8;background:transparent;padding:0 14px;font-size:15px;cursor:pointer;display:flex;gap:6px;align-items:center;color:#17283a}.erp-global-actions button:hover{background:#dcecff}.erp-global-actions small{font-size:11px;color:#66798c}.erp-global-actions .danger{color:#d71920}.erp-global-actions .danger:hover{outline:2px solid #ef2c2c;outline-offset:-2px;background:#fff}
.erp-global-search{margin-left:auto;margin-right:18px;width:255px;height:34px;border:1px solid #b7c8d9;background:#fff;border-radius:5px;display:flex;align-items:center;padding:0 10px;font-size:20px;color:#173b61}.erp-global-search input{border:0;outline:0;width:100%;font-size:14px;padding-left:8px}
.sidebar{top:50px;bottom:34px;width:255px;padding:8px 6px;background:linear-gradient(90deg,#f7fbff,#eaf2f9);color:#13263a;border-right:1px solid #b9c9d8}.brand{display:none}.sidebar nav{overflow:auto}.nav{color:#17283a;padding:11px 14px;border-radius:5px;font-size:15px}.nav:hover,.nav.active{background:linear-gradient(#35a2f6,#1685df);color:#fff}.nav.active{box-shadow:none}.nav-section{color:#607386;font-size:10px;padding:15px 14px 5px}.branch{border-top:1px solid #c4d2df;padding:10px 8px}.branch small{color:#5e7185}.branch select{background:#fff;border:1px solid #b7c8d9;color:#17283a;border-radius:4px;padding:8px}
main{margin-left:255px;width:calc(100% - 255px);padding:0 10px 30px}header{height:88px;padding:0 18px;background:#f5f8fc;border-bottom:1px solid #d6e0e9;margin:0 -10px 10px}header h1{font-size:25px}.avatar{background:#dceeff;color:#1767a8}
.panel,.cards article,.empty{border-radius:5px;border-color:#c8d6e3;box-shadow:none}.panel{padding:14px}.product-module-tabs{border-radius:5px!important}.product-table-scroll table,.table-wrap table{border:1px solid #c3d1de}.product-table-scroll th,.table-wrap th{background:linear-gradient(#f8fbfd,#e5edf4);color:#17283a;border:1px solid #c6d3df;padding:7px 9px}.product-table-scroll td,.table-wrap td{border:1px solid #d6e0e8;padding:7px 9px}.product-table-scroll tbody tr:nth-child(even),.table-wrap tbody tr:nth-child(even){background:#f7fafc}.product-table-scroll tbody tr.selected,.catalog-manager tbody tr.selected{background:linear-gradient(90deg,#2699ee,#1683dc)!important;color:#fff}
.catalog-actions button,.product-command-bar button,.stock-command-bar button{border-radius:4px!important}
dialog{border-radius:7px;border:1px solid #7e9db9}.modal-head{background:linear-gradient(90deg,#0878cf,#1266ad);color:#fff;margin:-24px -24px 18px;padding:10px 14px;align-items:center}.modal-head h2{font-size:17px}.modal-head button{color:#fff}
.erp-statusbar{position:fixed;z-index:90;left:0;right:0;bottom:0;height:34px;background:linear-gradient(#f8fbfd,#e6eef5);border-top:1px solid #b9c8d6;display:flex;align-items:center;gap:28px;padding:0 16px;font-size:12px;color:#24384d}.erp-statusbar>span{padding-right:20px;border-right:1px solid #c7d3df}.erp-statusbar .status-spacer{flex:1;border:0}
@media(max-width:1150px){.erp-global-actions button{padding:0 7px}.erp-global-actions small{display:none}.erp-global-search{width:190px}.sidebar{width:215px}main{margin-left:215px;width:calc(100% - 215px)}.erp-appname{min-width:215px}}

/* 0.12.17 — mensagens críticas sempre acima dos fluxos de trabalho */
.system-error-dialog{
  z-index:2147483647 !important;
  border:0;padding:0;background:transparent;
  max-width:min(720px,calc(100vw - 32px));width:min(720px,calc(100vw - 32px));
  /* 0.13.46: dialog.show() (não-modal) não centraliza sozinho como showModal() faz — sem isso o
     diálogo nascia colado no topo da janela, atrás da barra de título. */
  position:fixed !important;inset:0 !important;margin:auto !important;height:fit-content !important;
}
.system-error-dialog::backdrop{background:rgba(15,23,42,.48);}
.system-error-card{background:#fff;border-radius:12px;box-shadow:0 24px 80px rgba(0,0,0,.35);overflow:hidden;}
.system-error-title{font-size:18px;font-weight:700;padding:16px 20px;border-bottom:1px solid #e5e7eb;}
.system-error-text{white-space:pre-wrap;word-break:break-word;max-height:55vh;overflow:auto;margin:0;padding:18px 20px;font:14px/1.45 system-ui,sans-serif;user-select:text;}
.system-error-actions{display:flex;justify-content:flex-end;padding:12px 20px 18px;}
/* janelas de trabalho podem ser movidas pelo cabeçalho sem afetar o conteúdo */
dialog[data-draggable-dialog]{overflow:visible;}
dialog[data-draggable-dialog] .modal-header,
dialog[data-draggable-dialog] .dialog-header{cursor:move;user-select:none;}
.purchase-xml-product-complete{width:min(1120px,96vw);max-width:1120px;max-height:92vh;padding:0;border:0;border-radius:14px;overflow:hidden}.purchase-xml-product-complete form{max-height:92vh;overflow:auto;background:#f6f8fb}.purchase-xml-product-complete header{position:sticky;top:0;z-index:3;background:#fff;padding:18px 22px;border-bottom:1px solid #dfe5ec;display:flex;justify-content:space-between;align-items:center}.xml-product-section{background:#fff;margin:14px 18px;padding:16px;border:1px solid #dfe5ec;border-radius:12px}.xml-product-section h3{margin:0 0 12px}.purchase-xml-product-grid.cols4{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.purchase-xml-product-grid .span2{grid-column:span 2}.purchase-xml-product-grid .span4{grid-column:span 4}.xml-lookup{display:grid;grid-template-columns:100px 1fr;gap:6px}.purchase-xml-product-complete footer{position:sticky;bottom:0;background:#fff;border-top:1px solid #dfe5ec;padding:14px 18px;display:flex;justify-content:flex-end;gap:10px}@media(max-width:850px){.purchase-xml-product-grid.cols4{grid-template-columns:repeat(2,minmax(0,1fr))}.purchase-xml-product-grid .span4{grid-column:span 2}}
/* 0.12.21 — Compras/XML e feedback */
.product-toast{display:flex;align-items:center;gap:14px;max-width:min(680px,calc(100vw - 32px))}
.product-toast-close{border:0;background:transparent;color:inherit;font-size:20px;line-height:1;padding:0 2px;cursor:pointer}
.purchase-xml-modern{width:min(1480px,96vw);max-width:none;height:min(900px,94vh);padding:0;border:0;border-radius:14px;overflow:hidden}
.purchase-xml-modern>form{height:100%;display:flex;flex-direction:column;background:#f6f8fb}
.xml-modern-head{display:flex;justify-content:space-between;align-items:flex-start;padding:18px 22px;background:#fff;border-bottom:1px solid #e5e9ef}
.xml-modern-head h2{margin:2px 0 3px}.xml-modern-head p{margin:0;color:#667085}.xml-close{font-size:24px}
.purchase-xml-modern .xml-upload-row{padding:12px 22px;background:#fff}
.purchase-xml-modern .xml-summary{padding:0 22px 12px;background:#fff}
.xml-kpis{display:grid;grid-template-columns:120px minmax(260px,2fr) repeat(4,minmax(100px,1fr));gap:10px}
.xml-kpis>div{background:#f8fafc;border:1px solid #e5e9ef;border-radius:10px;padding:10px 12px;display:flex;flex-direction:column}
.xml-kpis small{color:#667085}.xml-kpis strong{font-size:16px}.xml-kpis span{font-size:12px;color:#667085}.xml-kpis .warn strong{color:#b54708}.xml-kpis .ok strong{color:#027a48}
.xml-key{margin-top:8px;color:#667085;font-size:12px}.xml-section-title{display:flex;justify-content:space-between;align-items:end;padding:12px 22px 8px}
.xml-section-title h3{margin:0}.xml-section-title small{color:#667085}
.xml-products-table{margin:0 22px;background:#fff;border:1px solid #e5e9ef;border-radius:10px;min-height:220px;max-height:38vh}
.xml-products-table td small{display:block;color:#667085;margin-top:2px}.xml-pending{color:#b54708}
.xml-duplicates-card{margin:10px 22px;background:#fff;border:1px solid #e5e9ef;border-radius:10px}.xml-duplicates-card .xml-section-title{padding:12px 14px 6px}.xml-duplicates-card .table-wrap{max-height:150px}
.xml-modern-footer{margin-top:auto;display:flex;justify-content:space-between;align-items:center;padding:12px 22px;background:#fff;border-top:1px solid #e5e9ef;color:#667085}
.purchase-xml-locate-dialog{width:min(1100px,92vw);max-width:none;border:0;border-radius:14px;padding:0}.xml-locate-card{background:#fff}.xml-locate-card header,.xml-locate-card footer{display:flex;justify-content:space-between;align-items:center;padding:14px 18px;border-bottom:1px solid #e5e9ef}.xml-locate-card footer{border-top:1px solid #e5e9ef;border-bottom:0}.xml-locate-card h2{margin:2px 0}.xml-locate-search{display:block;padding:14px 18px}.xml-locate-search input{width:100%;margin-top:5px}.xml-locate-card .table-wrap{max-height:55vh;margin:0 18px 14px}.xml-locate-card tr.selected{outline:2px solid currentColor;outline-offset:-2px}
@media(max-width:900px){.xml-kpis{grid-template-columns:repeat(2,1fr)}.xml-modern-footer{align-items:flex-start;gap:10px;flex-direction:column}}

.system-error-dialog{width:min(520px,calc(100vw - 32px))!important;max-width:520px!important;max-height:70vh!important;margin:auto!important;padding:0!important;border-radius:12px!important}.system-error-dialog .system-error-card{width:auto!important;max-width:none!important;max-height:70vh!important;padding:18px!important}.system-error-dialog .system-error-message{max-height:190px;overflow:auto;white-space:pre-wrap}.compact-auth-dialog{width:min(440px,calc(100vw - 32px));max-width:440px;border:0;border-radius:12px;padding:0}.compact-auth-dialog form{padding:18px}.compact-auth-dialog .actions{display:flex;justify-content:flex-end;gap:8px;margin-top:16px}

/* 0.12.23 - diálogos compactos, conferência XML rolável e linhas mais densas */
.compact-auth-dialog{box-sizing:border-box;overflow:hidden!important}
.compact-auth-dialog form{box-sizing:border-box;width:100%;max-width:100%;overflow:hidden}
.compact-auth-dialog label,.compact-auth-dialog input{box-sizing:border-box;max-width:100%;width:100%}
.compact-auth-dialog .actions{display:flex!important;flex-wrap:nowrap;justify-content:flex-end;overflow:visible}
.compact-auth-dialog .actions button{display:inline-flex!important;min-width:110px;justify-content:center}
.purchase-xml-modern>form{overflow-y:auto!important;overflow-x:hidden!important}
.purchase-xml-modern .xml-modern-head{position:sticky;top:0;z-index:8}
.purchase-xml-modern .xml-modern-footer{position:sticky;bottom:0;z-index:8;flex:0 0 auto}
.purchase-xml-modern .xml-products-table{max-height:none;min-height:220px;overflow:auto}
.purchase-xml-modern .xml-products-table table{font-size:12px}
.purchase-xml-modern .xml-products-table th,.purchase-xml-modern .xml-products-table td{padding:6px 8px;line-height:1.25}
.purchase-xml-modern .xml-duplicates-card .table-wrap{max-height:none}

#purchaseAuthDialog.compact-auth-dialog{width:min(430px,calc(100vw - 32px))!important;min-width:0!important;max-width:430px!important;padding:0!important;overflow:hidden!important}
#purchaseAuthDialog.compact-auth-dialog form{width:100%!important;min-width:0!important;max-width:100%!important;margin:0!important;padding:20px!important;box-sizing:border-box!important;overflow:hidden!important}
#purchaseAuthDialog.compact-auth-dialog input{width:100%!important;min-width:0!important;max-width:100%!important;box-sizing:border-box!important}
#purchaseAuthDialog.compact-auth-dialog .actions{width:100%!important;display:grid!important;grid-template-columns:1fr 1fr!important;gap:10px!important;box-sizing:border-box!important;overflow:hidden!important}
#purchaseAuthDialog.compact-auth-dialog .actions button{width:100%!important;min-width:0!important;max-width:100%!important;margin:0!important}
.finance-shell{display:flex;flex-direction:column;gap:16px}.finance-head{display:flex;align-items:center;justify-content:space-between;gap:16px}.finance-head h2,.finance-head p{margin:0}.finance-tabs{display:flex;gap:8px;flex-wrap:wrap}.finance-tab.active{font-weight:700}.finance-filters{display:flex;gap:12px;flex-wrap:wrap}.finance-filters label{display:flex;flex-direction:column;gap:5px;min-width:220px}.finance-panel{display:none}.finance-panel.active{display:block}.finance-kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:14px}.finance-kpis>div{border:1px solid var(--line,#ddd);border-radius:12px;padding:14px}.finance-kpis small,.finance-kpis strong{display:block}.finance-kpis strong{font-size:20px;margin-top:5px}.finance-note{font-size:12px;opacity:.72;margin-top:12px}@media(max-width:760px){.finance-kpis{grid-template-columns:1fr}.finance-filters label{min-width:100%}}

/* 0.12.25 - Financeiro operacional, preservando a sidebar existente */
.finance-kpis{grid-template-columns:repeat(4,minmax(0,1fr))}
.finance-kpis>div[data-fin-filter]{cursor:pointer}
.finance-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:4px 0 12px}
.finance-quick{display:flex;gap:6px;flex-wrap:wrap}.finance-quick button.active{font-weight:700}
.finance-settle-dialog{width:min(620px,calc(100vw - 32px))!important;max-width:620px!important;overflow:hidden!important}
.finance-settle-dialog form{width:100%;box-sizing:border-box;padding:20px;overflow:hidden}
.finance-settle-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.finance-settle-grid label{display:flex;flex-direction:column;gap:5px}.finance-settle-grid .wide{grid-column:1/-1}.finance-settle-grid input,.finance-settle-grid select,.finance-settle-grid textarea{width:100%;min-width:0;box-sizing:border-box}
.finance-settle-total{display:flex;justify-content:space-between;align-items:center;padding:14px;margin:14px 0;border:1px solid var(--line,#ddd);border-radius:10px}.finance-settle-total strong{font-size:20px}
@media(max-width:760px){.finance-kpis{grid-template-columns:1fr 1fr}.finance-settle-grid{grid-template-columns:1fr}.finance-settle-grid .wide{grid-column:auto}}

/* 0.12.27 - correção estrutural do modal de autorização de Compras */
#purchaseAuthDialog{
  width:min(560px,calc(100vw - 32px))!important;
  max-width:560px!important;
  max-height:calc(100vh - 32px)!important;
  padding:0!important;
  overflow:hidden!important;
  box-sizing:border-box!important;
}
#purchaseAuthDialog .purchase-auth-form,
#purchaseAuthDialog form{
  width:100%!important;
  max-width:none!important;
  max-height:calc(100vh - 32px)!important;
  margin:0!important;
  padding:0!important;
  overflow:hidden!important;
  box-sizing:border-box!important;
}
#purchaseAuthDialog input,#purchaseAuthDialog select{
  width:100%!important;min-width:0!important;box-sizing:border-box!important;
}
#purchaseAuthDialog .actions,
#purchaseAuthDialog .dialog-actions,
#purchaseAuthDialog .modal-actions{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
  gap:12px!important;
  width:100%!important;
  box-sizing:border-box!important;
  overflow:visible!important;
}
#purchaseAuthDialog .actions button,
#purchaseAuthDialog .dialog-actions button,
#purchaseAuthDialog .modal-actions button,
#purchaseAuthDialog button[type="submit"],
#purchaseAuthDialog .purchase-auth-confirm{
  min-width:0!important;
  width:100%!important;
  height:48px!important;
  box-sizing:border-box!important;
}
#purchaseAuthDialog .purchase-auth-confirm{display:block!important;visibility:visible!important;opacity:1!important}

/* 0.12.28 - Financeiro moderno / Contas a Pagar completo em interface */
.finance-tabs{display:flex;gap:8px;flex-wrap:wrap;padding:8px;background:#f3f6fb;border-radius:14px}
.finance-tab{border:0!important;background:transparent!important;border-radius:10px!important;padding:11px 15px!important;display:flex!important;align-items:center;gap:8px;font-weight:700;color:#566176}
.finance-tab.active{background:#fff!important;color:#1467d8!important;box-shadow:0 2px 10px rgba(22,54,95,.10)}
.fin-tab-icon{font-size:20px}
.fin-section-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:18px 0}
.fin-section-head h2{margin:0;font-size:24px}.fin-section-head p{margin:4px 0 0;color:#778197}
.fin-head-actions{display:flex;gap:9px}.btn-modern{border:1px solid #d7deea;border-radius:9px;padding:10px 15px;background:#fff;font-weight:700}.btn-modern.primary{background:#1467d8;color:#fff;border-color:#1467d8}
.finance-kpis.modern{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.finance-kpis.modern button{position:relative;text-align:left;border:1px solid #e1e6ef;background:#fff;border-radius:13px;padding:16px 16px 14px;min-height:112px;box-shadow:0 2px 10px rgba(22,54,95,.05)}
.finance-kpis.modern .kpi-icon{position:absolute;right:14px;top:13px;font-size:22px}.finance-kpis.modern small{display:block;color:#7a8496;font-weight:700}.finance-kpis.modern strong{display:block;font-size:22px;margin:8px 0 3px}.finance-kpis.modern em{font-style:normal;color:#9aa2b0;font-size:12px}
.fin-search-card,.fin-table-card{background:#fff;border:1px solid #e1e6ef;border-radius:13px;padding:14px;margin-top:14px}
.fin-filter-row{display:grid;grid-template-columns:1.25fr 1fr 1fr 1fr 1fr;gap:10px}.fin-filter-row label,.fin-advanced label{font-size:12px;font-weight:700;color:#697386}.fin-filter-row input,.fin-filter-row select,.fin-advanced input{display:block;width:100%;height:39px;margin-top:5px;border:1px solid #d6dce7;border-radius:8px;padding:0 10px;box-sizing:border-box;background:#fff}
.finance-quick.modern{margin-top:12px}.finance-quick.modern button{border:1px solid #d8dfeb;border-radius:999px;background:#fff;padding:8px 13px;font-weight:700;color:#5e687b}.finance-quick.modern button.active{background:#e9f2ff;color:#1264cf;border-color:#b8d4fa}
.fin-advanced{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:12px;padding-top:12px;border-top:1px solid #edf0f5}.fin-advanced.hidden{display:none!important}
.fin-tabs-secondary{display:flex;gap:4px;margin:15px 0 0;border-bottom:1px solid #e1e6ef}.fin-tabs-secondary button{border:0;background:transparent;padding:10px 14px;font-weight:700;color:#7b8495;border-bottom:3px solid transparent}.fin-tabs-secondary button.active{color:#1467d8;border-bottom-color:#1467d8}
.fin-table-actions{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px;color:#7b8495}.fin-table-actions button{border:1px solid #d8dfeb;background:#fff;border-radius:8px;padding:8px 11px}
.finance-main-table{max-height:420px;overflow:auto}.finance-main-table table{min-width:1350px}.finance-main-table th{position:sticky;top:0;background:#f7f9fc;z-index:1}
.fin-summary-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:14px}.fin-summary-grid section{background:#fff;border:1px solid #e1e6ef;border-radius:13px;padding:14px}.fin-summary-grid h3{font-size:14px;margin:0 0 12px}.fin-summary-empty{color:#9aa2b0;font-size:13px;padding:14px 0}
.fin-detail-dialog{width:min(1040px,calc(100vw - 36px));max-width:1040px;max-height:calc(100vh - 36px);padding:0;border:0;border-radius:16px;overflow:hidden}.fin-detail-dialog form{max-height:calc(100vh - 36px);overflow:auto;padding:0}
.fin-detail-head,.fin-detail-status,.fin-detail-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 20px}.fin-detail-head{border-bottom:1px solid #e6eaf0}.fin-detail-head h2{margin:2px 0 0}.fin-detail-head small{color:#7c8698;font-weight:800}.icon-close{border:0;background:#f1f4f8;border-radius:50%;width:36px;height:36px;font-size:23px}.fin-detail-status{background:#f8fafc;padding-top:10px;padding-bottom:10px;color:#778197}.status-chip{background:#fff4d8;color:#a56b00;padding:6px 10px;border-radius:999px;font-weight:800;font-size:12px}
.fin-detail-grid{padding:0 20px 18px}.fin-detail-grid section{border-bottom:1px solid #edf0f4;padding:16px 0}.fin-detail-grid h3{margin:0 0 11px;font-size:14px}.fields-3{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.fields-2{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}.fields-3 label,.fields-2 label{font-size:12px;font-weight:700;color:#687286}.fields-3 input,.fields-2 input,.fields-2 textarea{display:block;width:100%;box-sizing:border-box;margin-top:5px;border:1px solid #d8dee8;border-radius:8px;padding:9px}.fields-2 .wide{grid-column:1/-1}.copy-field{display:flex;gap:6px}.copy-field input{flex:1}.copy-field button{margin-top:5px;white-space:nowrap}
.fin-detail-footer{position:sticky;bottom:0;background:#fff;border-top:1px solid #e4e8ef}.fin-detail-footer>div{display:flex;gap:7px;flex-wrap:wrap}.fin-detail-footer button{border:1px solid #d6dde8;background:#fff;border-radius:8px;padding:9px 12px;font-weight:700}.fin-detail-footer button.primary{background:#1467d8;color:#fff;border-color:#1467d8}
@media(max-width:900px){.finance-kpis.modern{grid-template-columns:1fr 1fr}.fin-filter-row,.fin-advanced{grid-template-columns:1fr 1fr}.fin-summary-grid{grid-template-columns:1fr}.fields-3{grid-template-columns:1fr 1fr}}

/* 0.12.29 - Contas a Pagar / Análise por Fornecedor */
.fin-supplier-analysis{margin-top:14px}
.fin-supplier-analysis.hidden{display:none!important}
.fin-analysis-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:10px}
.fin-analysis-toolbar>div:first-child{display:flex;flex-direction:column;gap:3px}
.fin-analysis-toolbar span{font-size:12px;color:#8791a3}
.fin-analysis-toolbar button{border:1px solid #d7deea;background:#fff;border-radius:8px;padding:9px 12px;font-weight:700}
.fin-analysis-block{background:#fff;border:1px solid #e1e6ef;border-radius:13px;padding:12px;margin-bottom:12px}
.fin-supplier-table tbody tr{cursor:pointer}
.fin-supplier-table tbody tr:hover{background:#f3f7fd}
.fin-supplier-table tbody tr.selected{background:#e7f1ff}
.fin-supplier-table tfoot{background:#f7f9fc}
.fin-supplier-table td:nth-child(n+3),.fin-supplier-table th:nth-child(n+3){text-align:right}
.fin-selected-supplier{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:3px 3px 12px}
.fin-selected-supplier>div{display:flex;flex-direction:column}.fin-selected-supplier small{color:#8a94a5;font-weight:800;font-size:10px}.fin-selected-supplier strong{margin-top:3px}
.finance-supplier-detail{max-height:330px;overflow:auto}.finance-supplier-detail table{min-width:1900px}.finance-supplier-detail th{position:sticky;top:0;background:#f7f9fc;z-index:1}

/* 0.12.30 - lançamento compacto + filtros rápidos funcionais */
.fin-detail-dialog.fin-new-mode{width:min(900px,calc(100vw - 42px));max-width:900px}
.fin-detail-dialog.fin-new-mode .fin-detail-head{padding:12px 16px}
.fin-detail-dialog.fin-new-mode .fin-detail-head h2{font-size:20px}
.fin-detail-dialog.fin-new-mode .fin-detail-status{padding:7px 16px;font-size:12px}
.fin-detail-dialog.fin-new-mode .fin-detail-grid{padding:0 16px 10px}
.fin-detail-dialog.fin-new-mode .fin-detail-grid section{padding:10px 0}
.fin-detail-dialog.fin-new-mode .fin-detail-grid h3{margin-bottom:7px;font-size:13px}
.fin-detail-dialog.fin-new-mode .fields-3,.fin-detail-dialog.fin-new-mode .fields-2{gap:7px}
.fin-detail-dialog.fin-new-mode label{font-size:11px}
.fin-detail-dialog.fin-new-mode input,.fin-detail-dialog.fin-new-mode textarea{padding:7px;font-size:13px}
.fin-detail-dialog.fin-new-mode textarea{max-height:55px}
.fin-detail-dialog.fin-new-mode .fin-existing-only{display:none!important}
.fin-detail-dialog:not(.fin-new-mode) .fin-new-only{display:none!important}
.fin-detail-dialog.fin-new-mode .fin-detail-footer{padding:10px 16px}
.finance-quick.modern button.active{background:#1467d8!important;color:#fff!important;border-color:#1467d8!important;box-shadow:0 2px 7px rgba(20,103,216,.18)}

/* 0.12.31 - Plano de contas ligado ao lançamento por lupas */
.fin-lookup{display:flex;gap:5px;margin-top:5px}.fin-lookup input{margin-top:0!important;flex:1;background:#f8fafc}.fin-lookup button{width:38px;border:1px solid #d8dee8;background:#fff;border-radius:8px;font-size:16px;cursor:pointer}
.fin-lookup-dialog{width:min(720px,calc(100vw - 40px));max-width:720px;border:0;border-radius:14px;padding:0;overflow:hidden}
.fin-lookup-dialog form{margin:0}.fin-lookup-search{display:flex;gap:8px;padding:12px 16px;border-bottom:1px solid #e6eaf0}.fin-lookup-search input{flex:1;border:1px solid #d7deea;border-radius:8px;padding:9px 11px}.fin-lookup-search button,.fin-lookup-footer button{border:1px solid #d7deea;background:#fff;border-radius:8px;padding:8px 11px;font-weight:700}
.fin-lookup-table{max-height:360px;overflow:auto}.fin-lookup-table table{width:100%}.fin-lookup-table tbody tr{cursor:pointer}.fin-lookup-table tbody tr:hover{background:#eef5ff}
.fin-lookup-footer{display:flex;align-items:center;justify-content:space-between;padding:11px 16px;border-top:1px solid #e6eaf0;color:#7b8495;font-size:12px}

/* 0.12.32 - correções funcionais de Compras */
#purchaseAuthDialog.compact-auth-dialog{
 width:560px!important;max-width:calc(100vw - 32px)!important;min-width:0!important;
 overflow:visible!important;padding:0!important;
}
#purchaseAuthDialog .purchase-auth-form{
 display:block!important;width:100%!important;max-width:100%!important;
 padding:20px!important;overflow:visible!important;box-sizing:border-box!important;
}
#purchaseAuthDialog .actions{
 display:flex!important;flex-direction:row!important;justify-content:flex-end!important;
 align-items:center!important;gap:12px!important;width:100%!important;
 min-height:60px!important;overflow:visible!important;
}
#purchaseAuthDialog #purchaseAuthCancel,
#purchaseAuthDialog #purchaseAuthConfirm{
 display:inline-flex!important;visibility:visible!important;opacity:1!important;
 position:static!important;transform:none!important;float:none!important;
 flex:1 1 0!important;width:auto!important;min-width:0!important;max-width:none!important;
 height:48px!important;margin:0!important;align-items:center!important;justify-content:center!important;
}
#purchaseAuthDialog #purchaseAuthConfirm{
 background:#1467d8!important;color:#fff!important;border:1px solid #1467d8!important;
}
.purchase-cancel-top{border:1px solid #efb4af;background:#fff;color:#b42318;border-radius:8px;padding:10px 13px;font-weight:700}
.purchase-cancel-dialog{width:min(520px,calc(100vw - 32px));padding:0;overflow:hidden}
.purchase-cancel-dialog form{padding:0!important}
.purchase-cancel-head{display:flex;align-items:center;justify-content:space-between;padding:16px 18px;border-bottom:1px solid #e5e7eb}
.purchase-cancel-head h2{margin:2px 0 0}.purchase-cancel-head small{color:#6b7280;font-weight:800}
.purchase-cancel-head button{border:0;background:transparent;font-size:25px}
.purchase-cancel-content{padding:16px 18px}.purchase-cancel-content p{color:#596579;font-size:13px}
.purchase-cancel-content textarea,.purchase-cancel-content input{width:100%;box-sizing:border-box;margin-top:6px;padding:10px;border:1px solid #d8dee8;border-radius:8px}
.purchase-cancel-actions{display:flex;justify-content:flex-end;gap:9px;padding:12px 18px;border-top:1px solid #e5e7eb}
.purchase-cancel-actions button{padding:10px 14px;border-radius:8px;border:1px solid #d8dee8;font-weight:800}
.purchase-cancel-actions .danger{background:#b42318;color:#fff;border-color:#b42318}

/* 0.12.33 - ações modernas em Compras */
.purchase-back-modern{
 display:inline-flex;align-items:center;gap:8px;height:42px;padding:0 16px;
 border:1px solid #d8e0ea;border-radius:10px;background:#fff;color:#25324a;
 font-weight:750;box-shadow:0 1px 2px rgba(16,24,40,.04);cursor:pointer;
}
.purchase-back-modern:hover{background:#f7f9fc;border-color:#c8d2df}
.purchase-cancel-modern{
 display:inline-flex;align-items:center;justify-content:center;height:42px;padding:0 17px;
 border:1px solid #f1c2bd!important;border-radius:10px!important;background:#fff7f6!important;
 color:#b42318!important;font-weight:800!important;box-shadow:0 1px 2px rgba(16,24,40,.04);
 cursor:pointer;
}
.purchase-cancel-modern:hover{background:#fff0ee!important;border-color:#e59c94!important}

/* 0.12.35 — Compras / XML: acabamento moderno */
.purchase-action-modern{
 height:42px;padding:0 16px;border-radius:10px!important;font-weight:750!important;
 display:inline-flex;align-items:center;justify-content:center;gap:8px;cursor:pointer;
 box-shadow:0 1px 3px rgba(16,24,40,.08);transition:.15s ease;
}
.purchase-import-modern{background:#fff!important;color:#1769c2!important;border:1px solid #b9d4f3!important}
.purchase-import-modern:hover{background:#f3f8fe!important;border-color:#83b5ea!important}
.purchase-refresh-modern{background:#1769c2!important;color:#fff!important;border:1px solid #1769c2!important}
.purchase-refresh-modern:hover{filter:brightness(.96)}
.xml-icon-close-modern{
 width:38px!important;height:38px!important;border:0!important;border-radius:10px!important;
 background:#eef5fd!important;color:#174f8c!important;font-size:22px!important;font-weight:800!important;cursor:pointer;
}
.xml-close-modern{
 height:40px!important;padding:0 15px!important;border:1px solid #d8e0ea!important;border-radius:9px!important;
 background:#f7f9fc!important;color:#26354d!important;font-weight:750!important;cursor:pointer;
}
.xml-import-modern{
 height:42px!important;padding:0 20px!important;border:1px solid #1769c2!important;border-radius:10px!important;
 background:#1769c2!important;color:#fff!important;font-weight:800!important;cursor:pointer;
 box-shadow:0 2px 5px rgba(23,105,194,.16);
}
.xml-locate-modern{
 min-height:34px!important;padding:0 12px!important;border:1px solid #b9d4f3!important;border-radius:8px!important;
 background:#fff!important;color:#1769c2!important;font-weight:750!important;cursor:pointer;
}

/* Cadastro/Vínculo NF-e compacto: ~60% menor visualmente que o layout anterior.
   Mantém alvos clicáveis e leitura confortável em desktop. */
#xmlProductDialog, #xmlProductRegisterDialog, #xmlProductFormDialog, dialog.xml-product-dialog{
 width:min(760px,92vw)!important;max-width:760px!important;max-height:88vh!important;
 border-radius:14px!important;padding:0!important;
}
#xmlProductDialog .dialog-body, #xmlProductRegisterDialog .dialog-body,
#xmlProductFormDialog .dialog-body, dialog.xml-product-dialog .dialog-body{
 padding:14px 18px!important;
}
#xmlProductDialog h1,#xmlProductDialog h2,#xmlProductRegisterDialog h1,#xmlProductRegisterDialog h2,
#xmlProductFormDialog h1,#xmlProductFormDialog h2{margin:4px 0 10px!important;line-height:1.15!important}
#xmlProductDialog h1,#xmlProductRegisterDialog h1,#xmlProductFormDialog h1{font-size:23px!important}
#xmlProductDialog h2,#xmlProductRegisterDialog h2,#xmlProductFormDialog h2{font-size:18px!important}
#xmlProductDialog label,#xmlProductRegisterDialog label,#xmlProductFormDialog label{font-size:13px!important}
#xmlProductDialog input,#xmlProductDialog select,#xmlProductRegisterDialog input,#xmlProductRegisterDialog select,
#xmlProductFormDialog input,#xmlProductFormDialog select{height:38px!important;min-height:38px!important;padding:6px 10px!important;font-size:14px!important}
#xmlProductDialog textarea,#xmlProductRegisterDialog textarea,#xmlProductFormDialog textarea{min-height:58px!important;padding:8px 10px!important;font-size:14px!important}
#xmlProductDialog .card,#xmlProductRegisterDialog .card,#xmlProductFormDialog .card{padding:14px!important;margin-bottom:10px!important;border-radius:12px!important}
#xmlProductDialog .form-grid,#xmlProductRegisterDialog .form-grid,#xmlProductFormDialog .form-grid{gap:10px 12px!important}
#xmlProductDialog .actions,#xmlProductRegisterDialog .actions,#xmlProductFormDialog .actions{
 padding:10px 14px!important;min-height:56px!important;gap:10px!important;
}

#purchaseXmlProductDialog{width:min(760px,92vw)!important;max-width:760px!important;max-height:88vh!important;border-radius:14px!important;padding:0!important}
#purchaseXmlProductDialog input,#purchaseXmlProductDialog select{height:38px!important;min-height:38px!important;padding:6px 10px!important;font-size:14px!important}
#purchaseXmlProductDialog textarea{min-height:58px!important}
#purchaseXmlProductDialog .card{padding:14px!important;margin-bottom:10px!important}
#purchaseXmlProductDialog .form-grid{gap:10px 12px!important}
#purchaseXmlProductDialog .actions{padding:10px 14px!important;min-height:56px!important}

/* 0.12.37 — Cadastro e Vinculação NF-e */
dialog.xml-product-modern{
 width:min(880px,94vw)!important;max-width:880px!important;max-height:90vh!important;
 padding:0!important;border:1px solid #dbe5f1!important;border-radius:18px!important;
 background:#f7faff!important;box-shadow:0 24px 70px rgba(15,35,65,.24)!important;
 overflow:auto!important;
}
dialog.xml-product-modern::backdrop{background:rgba(18,32,55,.48)!important;backdrop-filter:blur(2px)}
dialog.xml-product-modern .dialog-head,
dialog.xml-product-modern .modal-head{
 position:sticky;top:0;z-index:4;background:#fff!important;border-bottom:1px solid #e5edf6!important;
 padding:16px 22px!important;margin:0!important;
}
dialog.xml-product-modern h1{font-size:25px!important;line-height:1.15!important;margin:3px 0 4px!important;color:#14213d!important}
dialog.xml-product-modern h2{font-size:18px!important;line-height:1.2!important;margin:0 0 12px!important;color:#14213d!important}
dialog.xml-product-modern .card,
dialog.xml-product-modern .form-card,
dialog.xml-product-modern section{
 background:#fff!important;border:1px solid #dfe8f2!important;border-radius:14px!important;
 padding:16px 18px!important;margin:12px 18px!important;box-shadow:0 1px 2px rgba(16,24,40,.025);
}
dialog.xml-product-modern .form-grid{gap:10px 12px!important}
dialog.xml-product-modern label{font-size:13px!important;font-weight:700!important;color:#24324a!important;margin-bottom:5px!important}
dialog.xml-product-modern input,
dialog.xml-product-modern select{
 height:38px!important;min-height:38px!important;padding:6px 10px!important;
 border:1px solid #d7e0eb!important;border-radius:9px!important;background:#fff!important;
 font-size:14px!important;box-shadow:none!important;
}
dialog.xml-product-modern input:focus,
dialog.xml-product-modern select:focus{
 border-color:#75aee9!important;outline:3px solid rgba(35,113,199,.10)!important;
}
dialog.xml-product-modern input[readonly],
dialog.xml-product-modern input:disabled{background:#f3f6fa!important;color:#66758c!important}
dialog.xml-product-modern textarea{min-height:58px!important;border-radius:9px!important;border:1px solid #d7e0eb!important}
dialog.xml-product-modern .actions,
dialog.xml-product-modern .dialog-actions,
dialog.xml-product-modern footer{
 position:sticky;bottom:0;z-index:5;background:rgba(255,255,255,.97)!important;
 border-top:1px solid #e2eaf3!important;padding:11px 18px!important;margin:0!important;
 min-height:62px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;
}
dialog.xml-product-modern button{
 border-radius:9px!important;min-height:38px!important;font-weight:750!important;cursor:pointer;
}
dialog.xml-product-modern button.primary{
 min-height:42px!important;padding:0 18px!important;border:1px solid #1769c2!important;
 background:#1769c2!important;color:#fff!important;box-shadow:0 2px 5px rgba(23,105,194,.16)!important;
}
dialog.xml-product-modern button:not(.primary){
 padding:0 13px!important;border:1px solid #d4deea!important;background:#f8fafc!important;color:#26364f!important;
}
dialog.xml-product-modern button:not(.primary):hover{background:#eef4fa!important}
dialog.xml-product-modern button.primary:hover{filter:brightness(.96)}
/* reduz o excesso de altura da versão anterior */
dialog.xml-product-modern p{margin:3px 0 8px!important}
dialog.xml-product-modern .field{margin-bottom:8px!important}

/* 0.12.37 — botões da Conferência NF-e */
#xmlReviewDialog input[type="file"]{font-size:13px!important}
#xmlReviewDialog input[type="file"]::file-selector-button{
 height:38px;padding:0 14px;margin-right:10px;border:1px solid #cbd9e8;border-radius:9px;
 background:#f5f8fc;color:#25415f;font-weight:750;cursor:pointer;
}
#xmlReviewDialog input[type="file"]::file-selector-button:hover{background:#eaf2fb}
#xmlReviewDialog button{
 border-radius:9px!important;font-weight:750!important;transition:.15s ease;
}
#xmlReviewDialog button:not(.primary){
 border:1px solid #d2deea!important;background:#f7f9fc!important;color:#27405e!important;
}
#xmlReviewDialog button:not(.primary):hover{background:#edf4fb!important;border-color:#b8cde2!important}
#xmlReviewDialog button.primary{
 border:1px solid #1769c2!important;background:#1769c2!important;color:#fff!important;
 box-shadow:0 2px 5px rgba(23,105,194,.14)!important;
}
#xmlReviewDialog button.primary:hover{filter:brightness(.96)}
#xmlReviewClose{width:40px!important;height:40px!important;padding:0!important;font-size:20px!important;border-radius:10px!important}
#xmlReviewCancel{height:40px!important;padding:0 15px!important}
#xmlReviewUse{height:42px!important;padding:0 21px!important}
.xml-locate-modern{height:36px!important;min-height:36px!important;padding:0 12px!important;border-radius:8px!important}

/* 0.12.38 — modal NF-e reorganizado diretamente */
#purchaseXmlProductDialog{
 width:min(900px,94vw)!important;max-width:900px!important;max-height:92vh!important;
 background:#f6f9fd!important;border:1px solid #d7e2ef!important;border-radius:16px!important;
 padding:0!important;overflow:auto!important;
}
#purchaseXmlProductDialog .modal-header{
 position:sticky;top:0;z-index:6;display:flex!important;align-items:center!important;justify-content:space-between!important;
 padding:14px 18px!important;background:#fff!important;border-bottom:1px solid #e3ebf4!important;
}
#purchaseXmlProductDialog .modal-header small{font-size:11px!important;color:#63748c!important;letter-spacing:.04em}
#purchaseXmlProductDialog .modal-header h2{font-size:23px!important;margin:2px 0!important}
#purchaseXmlProductClose{width:38px!important;height:38px!important;padding:0!important;border:0!important;border-radius:9px!important;background:#eef4fb!important;font-size:20px!important}
#purchaseXmlProductDialog .xml-product-section{
 background:#fff!important;border:1px solid #dfe7f1!important;border-radius:13px!important;
 padding:14px 16px!important;margin:10px 14px!important;
}
#purchaseXmlProductDialog .xml-product-section h3{font-size:17px!important;margin:0 0 11px!important}
#purchaseXmlProductDialog .purchase-xml-product-grid{gap:9px 11px!important}
#purchaseXmlProductDialog label{font-size:12.5px!important;font-weight:700!important;color:#25334a!important}
#purchaseXmlProductDialog input,#purchaseXmlProductDialog select{
 height:36px!important;min-height:36px!important;border:1px solid #d5dfeb!important;border-radius:8px!important;
 padding:5px 9px!important;font-size:13.5px!important;background:#fff!important;
}
#purchaseXmlProductDialog footer{
 position:sticky!important;bottom:0!important;z-index:7!important;margin:0!important;padding:10px 14px!important;
 min-height:58px!important;background:#fff!important;border-top:1px solid #dfe8f2!important;
 display:flex!important;align-items:center!important;justify-content:space-between!important;
}
#purchaseXmlProductDialog footer button{height:40px!important;border-radius:9px!important;padding:0 15px!important;font-weight:750!important}
#purchaseXmlProductDialog footer .primary{background:#1769c2!important;color:#fff!important;border:1px solid #1769c2!important}
.xml-section-heading{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:9px}
.xml-section-heading h3{margin:0!important}.xml-section-heading small{color:#77869a;font-size:12px}
.xml-commercial-list{display:grid;grid-template-columns:1fr 1fr;gap:9px 14px}
.xml-commercial-list>label{display:block}
.xml-lookup-row{display:grid;grid-template-columns:82px minmax(0,1fr) 38px;gap:6px;align-items:center;margin-top:5px}
.xml-lookup-row:has(#pxpSupplierSelect){grid-template-columns:82px minmax(0,1fr) 38px 58px}
.xml-lookup-row .xml-code{width:100%!important}
.xml-search-btn{
 width:38px!important;height:36px!important;min-height:36px!important;padding:0!important;
 border:1px solid #bcd2e9!important;border-radius:8px!important;background:#f1f7fd!important;
 color:#1769c2!important;font-size:22px!important;font-weight:800!important;line-height:1!important;
}
.xml-search-btn:hover{background:#e3f0fc!important}
.xml-from-nfe-btn{
 height:36px!important;min-height:36px!important;padding:0 8px!important;border:1px solid #b8d5f1!important;
 border-radius:8px!important;background:#edf6ff!important;color:#1769c2!important;font-weight:800!important;
}
.xml-from-nfe-btn:disabled{opacity:.45!important}
.xml-field-hint{display:block;min-height:14px;margin:3px 0 0 88px;color:#65768c;font-size:10.5px}
.xml-unit-row{align-self:end}
@media(max-width:820px){.xml-commercial-list{grid-template-columns:1fr}}

/* Pesquisa auxiliar acionada pelas lupas */
.xml-catalog-lookup-dialog{width:min(680px,92vw);padding:0;border:0;border-radius:14px;background:transparent}
.xml-catalog-lookup-card{background:#fff;border-radius:14px;overflow:hidden;box-shadow:0 22px 60px rgba(16,31,52,.25)}
.xml-catalog-lookup-card header{display:flex;justify-content:space-between;align-items:center;padding:14px 16px;border-bottom:1px solid #e4ebf3}
.xml-catalog-lookup-card header small{color:#718198;font-size:11px}.xml-catalog-lookup-card header h2{margin:2px 0 0;font-size:20px}
.xml-catalog-lookup-card header button{width:36px;height:36px;border:0;border-radius:8px;background:#eef4fb;font-size:20px}
.xml-catalog-search{display:flex;align-items:center;gap:8px;margin:12px 14px;padding:0 10px;border:1px solid #d6e1ec;border-radius:9px;background:#fff}
.xml-catalog-search input{height:40px;border:0!important;outline:0!important;flex:1}
.xml-catalog-lookup-card .table-wrap{margin:0 14px;max-height:340px;overflow:auto;border:1px solid #e0e8f1;border-radius:9px}
.xml-catalog-lookup-card tr.selected{background:#edf6ff}
.xml-table-select{border:1px solid #bdd5ec;border-radius:7px;background:#f2f8fe;color:#1769c2;font-weight:700;padding:6px 10px}
.xml-catalog-lookup-card footer{display:flex;justify-content:flex-end;gap:8px;padding:12px 14px;border-top:1px solid #e4ebf3;margin-top:12px}
.xml-catalog-lookup-card footer button{height:38px;border-radius:8px;padding:0 14px;font-weight:750}
.xml-catalog-lookup-card footer .primary{background:#1769c2;color:#fff;border:1px solid #1769c2}

.xml-catalog-search .xml-catalog-new{height:38px;border:1px solid #9fd0ad;border-radius:8px;background:#ecf9f0;color:#177638;font-weight:800;padding:0 13px;white-space:nowrap}.xml-catalog-new-dialog{width:min(520px,92vw);padding:0;border:0;border-radius:14px}.xml-catalog-new-card{background:#fff;border-radius:14px;overflow:hidden}.xml-catalog-new-card header,.xml-catalog-new-card footer{display:flex;justify-content:space-between;align-items:center;padding:14px 16px;border-bottom:1px solid #e3ebf4}.xml-catalog-new-body{padding:16px;display:grid;gap:12px}.xml-catalog-new-body input{display:block;width:100%;height:40px;margin-top:5px;border:1px solid #d5dfeb;border-radius:8px;padding:0 10px}.xml-catalog-new-card footer{justify-content:flex-end;gap:8px;border-top:1px solid #e3ebf4;border-bottom:0}.xml-catalog-new-card footer .primary{background:#1769c2;color:#fff;border:1px solid #1769c2}

/* 0.12.40 padrão moderno */.xml-new-fields{display:grid;grid-template-columns:160px 1fr;gap:12px}.xml-catalog-new-card button,.xml-catalog-lookup-card button,#purchaseXmlProductDialog button{appearance:none!important;border-radius:10px!important;min-height:40px;padding:0 15px;font-weight:750!important;cursor:pointer;transition:.12s ease!important}.xml-catalog-new-card button:hover,.xml-catalog-lookup-card button:hover,#purchaseXmlProductDialog button:hover{transform:translateY(-1px);box-shadow:0 5px 14px rgba(24,72,125,.12)}#xmlCatalogNewClose,#xmlCatalogLookupClose,#purchaseXmlProductClose{width:40px!important;padding:0!important;border:1px solid #dce6f1!important;background:#f3f7fb!important;color:#1d2b3e!important;font-size:20px!important}#xmlCatalogNewCancel,#xmlCatalogLookupCancel{border:1px solid #cdd9e6!important;background:#fff!important;color:#26364b!important}#xmlCatalogNewForm footer .primary,#xmlCatalogLookupSelect{border:1px solid #1672d4!important;background:#1672d4!important;color:#fff!important;box-shadow:0 4px 12px rgba(22,114,212,.18)}.xml-catalog-new{display:inline-flex!important;align-items:center!important;justify-content:center!important;border:1px solid #a9d8b6!important;background:#edf9f0!important;color:#14713a!important}.xml-table-select{border:1px solid #b9d4ef!important;background:#f1f7fd!important;color:#126bc4!important}@media(max-width:620px){.xml-new-fields{grid-template-columns:1fr}}

/* 0.12.41 — Cadastro NF-e compacto */
#purchaseXmlProductDialog{width:min(820px,92vw)!important;max-width:820px!important;max-height:88vh!important;border-radius:14px!important}
#purchaseXmlProductDialog .modal-header{padding:9px 13px!important;min-height:58px!important}
#purchaseXmlProductDialog .modal-header small{font-size:10px!important}
#purchaseXmlProductDialog .modal-header h2{font-size:20px!important;line-height:1.15!important;margin:1px 0!important}
#purchaseXmlProductClose{width:34px!important;height:34px!important;min-height:34px!important}
#purchaseXmlProductDialog .xml-product-section{padding:10px 12px!important;margin:7px 10px!important;border-radius:11px!important}
#purchaseXmlProductDialog .xml-product-section h3{font-size:15px!important;margin:0 0 7px!important}
#purchaseXmlProductDialog .purchase-xml-product-grid{gap:6px 8px!important}
#purchaseXmlProductDialog label{font-size:11.5px!important}
#purchaseXmlProductDialog input,#purchaseXmlProductDialog select{height:32px!important;min-height:32px!important;padding:3px 8px!important;font-size:12.5px!important;border-radius:7px!important}
#purchaseXmlProductDialog .xml-commercial-list{gap:6px 10px!important}
#purchaseXmlProductDialog .xml-lookup-row{grid-template-columns:72px minmax(0,1fr) 34px!important;gap:5px!important;margin-top:3px!important}
#purchaseXmlProductDialog .xml-lookup-row:has(#pxpSupplierSelect){grid-template-columns:72px minmax(0,1fr) 34px 52px!important}
#purchaseXmlProductDialog .xml-search-btn{width:34px!important;height:32px!important;min-height:32px!important;font-size:18px!important;padding:0!important}
#purchaseXmlProductDialog .xml-from-nfe-btn{height:32px!important;min-height:32px!important;font-size:11px!important;padding:0 6px!important}
#purchaseXmlProductDialog footer{min-height:50px!important;padding:7px 10px!important}
#purchaseXmlProductDialog footer button{height:36px!important;min-height:36px!important;padding:0 12px!important;font-size:12.5px!important}

/* 0.12.42 — Conferência da NF-e 35–40% menor + botões modernos */
#purchaseXmlDialog{width:min(900px,88vw)!important;max-width:900px!important;max-height:88vh!important;border-radius:14px!important}
#purchaseXmlDialog .modal-header{padding:9px 14px!important;min-height:58px!important}
#purchaseXmlDialog .modal-header h2{font-size:20px!important;line-height:1.1!important;margin:2px 0!important}
#purchaseXmlDialog .modal-header p{font-size:11.5px!important;margin:2px 0!important}
#purchaseXmlDialog .xml-review-body{padding:8px 10px!important;gap:8px!important}
#purchaseXmlDialog .xml-review-upload{padding:8px 10px!important;min-height:44px!important}
#purchaseXmlDialog .xml-review-summary{padding:7px 9px!important;gap:6px!important}
#purchaseXmlDialog .xml-review-summary > *{min-height:58px!important;padding:6px 8px!important}
#purchaseXmlDialog .xml-review-products{padding:7px 9px!important}
#purchaseXmlDialog table{font-size:10.5px!important}
#purchaseXmlDialog th,#purchaseXmlDialog td{padding:5px 6px!important}
#purchaseXmlDialog button{appearance:none!important;-webkit-appearance:none!important;border-radius:9px!important;font-family:inherit!important;font-weight:750!important;cursor:pointer;transition:.12s ease!important}
#purchaseXmlDialog button:hover{transform:translateY(-1px);box-shadow:0 4px 12px rgba(24,72,125,.12)}
#purchaseXmlDialog .xml-product-create{min-height:32px!important;padding:0 10px!important;background:#1672d4!important;color:#fff!important;border:1px solid #1672d4!important}
#purchaseXmlDialog footer{min-height:48px!important;padding:6px 10px!important}
#purchaseXmlDialog footer button{min-height:34px!important;padding:0 12px!important}
@media(max-width:980px){#purchaseXmlDialog{width:94vw!important}}

/* 0.12.43 — Localizar Produto 35–40% menor + padrão moderno */
#purchaseXmlLocateDialog{
 width:min(760px,86vw)!important;
 max-width:760px!important;
 max-height:76vh!important;
 border:0!important;
 border-radius:14px!important;
 box-shadow:0 22px 55px rgba(15,35,60,.28)!important;
}
#purchaseXmlLocateDialog .modal-header{padding:9px 13px!important;min-height:56px!important}
#purchaseXmlLocateDialog .modal-header small{font-size:9.5px!important}
#purchaseXmlLocateDialog .modal-header h2{font-size:19px!important;line-height:1.1!important;margin:2px 0!important}
#purchaseXmlLocateDialog label{font-size:11px!important;font-weight:700!important}
#purchaseXmlLocateDialog input{height:34px!important;min-height:34px!important;padding:4px 9px!important;font-size:12.5px!important;border-radius:8px!important}
#purchaseXmlLocateDialog table{font-size:10.5px!important}
#purchaseXmlLocateDialog th{padding:6px 7px!important;font-size:10px!important}
#purchaseXmlLocateDialog td{padding:6px 7px!important}
#purchaseXmlLocateDialog footer{min-height:48px!important;padding:7px 12px!important}
#purchaseXmlLocateDialog button{
 appearance:none!important;-webkit-appearance:none!important;
 min-height:34px!important;padding:0 12px!important;
 border-radius:9px!important;font-family:inherit!important;font-weight:750!important;
 cursor:pointer;transition:transform .12s ease,box-shadow .12s ease,background .12s ease!important;
}
#purchaseXmlLocateDialog button:hover{transform:translateY(-1px);box-shadow:0 4px 12px rgba(24,72,125,.12)}
#purchaseXmlLocateDialog button.primary{background:#1672d4!important;color:#fff!important;border:1px solid #1672d4!important}
#purchaseXmlLocateDialog button:not(.primary){background:#fff!important;color:#26364b!important;border:1px solid #cbd8e6!important}
@media(max-width:820px){#purchaseXmlLocateDialog{width:94vw!important;max-width:94vw!important}}

/* 0.12.45 — Usuários */
#usuarios .toolbar button,.user-edit-btn,#userDialog .actions button,#userDialog .modal-head button{appearance:none;-webkit-appearance:none;border-radius:9px;font-family:inherit;font-weight:750;cursor:pointer;transition:transform .12s ease,box-shadow .12s ease}
#usuarios .toolbar button{min-height:36px;padding:0 14px}.user-edit-btn{min-height:30px;padding:0 10px;background:#fff;border:1px solid #b9cbe0;color:#245f9f}
#userRefresh{background:#fff;border:1px solid #cbd8e6;color:#26364b}#userInactivate{background:#fff;border:1px solid #e2a6a6;color:#a52727}
#usuarios button:hover,.user-edit-btn:hover,#userDialog button:hover{transform:translateY(-1px);box-shadow:0 4px 12px rgba(24,72,125,.12)}
#usersTable tr{cursor:pointer}#usersTable tr.selected{outline:2px solid rgba(22,114,212,.28);outline-offset:-2px}

/* 0.12.46 — sessão */
#logoutButton{appearance:none;-webkit-appearance:none;margin-left:12px;min-height:34px;padding:0 13px;border-radius:9px;border:1px solid #cbd8e6;background:#fff;color:#26364b;font:inherit;font-weight:750;cursor:pointer;transition:transform .12s ease,box-shadow .12s ease}#logoutButton:hover{transform:translateY(-1px);box-shadow:0 4px 12px rgba(24,72,125,.14)}

/* 0.12.47 — logout sempre visível na barra lateral */

#logoutButton.sidebar-logout{display:flex!important;width:100%;margin-top:12px;min-height:40px;align-items:center;justify-content:center;gap:7px;padding:8px 12px;border-radius:10px;border:1px solid #cbd8e6;background:#fff;color:#26364b;font:inherit;font-weight:750;cursor:pointer;box-sizing:border-box}
#logoutButton.sidebar-logout:hover{transform:translateY(-1px);box-shadow:0 4px 12px rgba(24,72,125,.14)}

/* 0.12.48 - baixa financeira: ações sempre visíveis */
#financeSettleDialog{max-height:calc(100vh - 36px)!important;overflow:auto!important}
#financeSettleDialog .actions{position:sticky;bottom:0;background:#fff;padding-top:12px;z-index:3}
#financeSettleConfirm{display:inline-flex!important;visibility:visible!important;opacity:1!important}

/* 0.12.50 - filtros explícitos e lupa de fornecedor */
.fin-supplier-lookup{display:grid;grid-template-columns:minmax(0,1fr) 42px;gap:6px;align-items:end}.fin-supplier-lookup button{height:39px;margin-top:5px;padding:0;border-radius:9px;font-size:20px}.fin-filter-actions{grid-column:1/-1;display:flex;justify-content:flex-end;gap:8px;align-items:end}.fin-filter-actions button{min-width:135px}.fin-supplier-dialog{width:min(850px,92vw);border:0;border-radius:14px;padding:0;box-shadow:0 20px 60px rgba(0,0,0,.22)}.fin-supplier-dialog form{padding:0}.fin-supplier-dialog header{display:flex;justify-content:space-between;align-items:center;padding:18px 20px;border-bottom:1px solid #e8ecf2}.fin-supplier-dialog header h3{margin:2px 0 0}.fin-supplier-dialog header small{color:#6d7789;font-weight:800}.fin-lookup-close{border:0;background:#f2f4f8;border-radius:9px;width:36px;height:36px;font-size:22px}.fin-supplier-search{display:grid;grid-template-columns:1fr auto;gap:8px;padding:14px 20px}.fin-supplier-search input{height:40px;border:1px solid #d6dce7;border-radius:9px;padding:0 11px}.fin-supplier-dialog .table-wrap{margin:0 20px;max-height:420px}.fin-supplier-dialog tbody tr{cursor:pointer}.fin-supplier-dialog tbody tr.selected{background:#e9f2ff}.fin-supplier-dialog footer{display:flex;justify-content:flex-end;padding:14px 20px 18px}

/* 0.12.53 Transferência de estoque */
.stock-transfer .stock-command-bar button{border-radius:10px;min-height:44px;padding:8px 16px;font-weight:700}.stock-transfer .stock-head-form select{min-height:42px;border:1px solid #cbd8e6;border-radius:9px;background:#fff;padding:0 10px}.transfer-search-results{margin:10px 0;max-height:280px;overflow:auto}.stock-transfer [data-transfer-remove],.stock-transfer [data-transfer-add]{border-radius:8px;padding:7px 11px}.stock-transfer #stockTransferEffective{background:#1769c2;color:#fff;border-color:#1769c2}

/* 0.12.56 - consulta de produto somente leitura */
.product-editor.product-view-only input:disabled,.product-editor.product-view-only select:disabled,.product-editor.product-view-only textarea:disabled{opacity:1;color:inherit;background:#f7f9fc;cursor:default}.product-editor.product-view-only .lookup-button:disabled{opacity:.45}.product-editor.product-view-only [data-product-tab]{cursor:pointer}

/* 0.12.57 — Estoque centralizado + Kardex */
.stock-page-tabs{display:flex;gap:10px;flex-wrap:wrap;margin:0 0 16px}.stock-page-tabs button{border:1px solid #d9e3f0;background:#fff;border-radius:12px;padding:12px 18px;font-weight:750;color:#31445f;cursor:pointer;transition:.18s}.stock-page-tabs button:hover{transform:translateY(-1px);box-shadow:0 5px 14px rgba(32,67,110,.09)}.stock-page-tabs button.active{background:#1769c2;color:#fff;border-color:#1769c2}.kardex-head-actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap}.kardex-head-actions .kardex-action{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-width:0;height:30px;padding:0 10px;border:1px solid #d6deea;border-radius:9px;background:#fff;color:#31445f;font-size:12px;font-weight:750;line-height:1;cursor:pointer;transition:.16s}.kardex-head-actions .kardex-action:hover{transform:translateY(-1px);box-shadow:0 4px 12px rgba(32,67,110,.10);background:#f7faff}.kardex-head-actions .kardex-action.primary{background:#1769c2!important;border-color:#1769c2!important;color:#fff!important}.kardex-head-actions .kardex-action.primary:hover{background:#1259a6!important}.kardex-filter{display:grid;grid-template-columns:150px 150px 220px minmax(260px,1fr) 180px 230px;gap:12px;align-items:end;margin-bottom:12px}.kardex-filter label{font-weight:650;color:#40516a}.kardex-filter input,.kardex-filter select{width:100%;margin-top:6px}.kardex-product-field .lookup-control{margin-top:6px}.kardex-product-field .lookup-control input{margin-top:0}.kardex-grid{padding:0;overflow:hidden}.kardex-grid table{min-width:1500px}.kardex-in{font-weight:800;color:#16764a}.kardex-out{font-weight:800;color:#b83232}@media(max-width:1200px){.kardex-filter{grid-template-columns:repeat(3,1fr)}}@media print{body *{visibility:hidden}#kardexView,#kardexView *{visibility:visible}#kardexView{position:absolute;left:0;top:0;width:100%}.kardex-head-actions,.kardex-filter{display:none!important}.kardex-grid table{min-width:100%;font-size:9px}}

/* 0.12.60 — Estoque / XML compacto / Financeiro bancário */
#stockTransferNew{background:#eef5ff!important;color:#145aa3!important;border:1px solid #b9d4f5!important;font-weight:800!important;box-shadow:0 1px 2px rgba(20,90,163,.08)}
#stockTransferNew:hover{background:#dfeeff!important;border-color:#8ebbea!important}
.stock-consult-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:14px}.stock-consult-head h2{margin:0 0 4px}.stock-consult-head p{margin:0;color:#74839a}.stock-consult-actions{display:flex;gap:8px}.stock-consult-filters{display:grid;grid-template-columns:240px minmax(320px,1fr) auto;gap:12px;align-items:end;margin:12px 0 14px}.stock-consult-filters label{display:flex;flex-direction:column;gap:6px;font-weight:700}.stock-consult-filters input,.stock-consult-filters select{height:42px}.stock-consult-summary{padding:8px 0;color:#617087}.stock-consult-table{max-height:520px}.stock-photo-cell{width:70px;text-align:center}.stock-product-photo{width:54px;height:54px;border:1px solid #dbe4ef;border-radius:8px;background:#fff;display:grid;place-items:center;overflow:hidden;margin:auto}.stock-product-photo img{width:100%;height:100%;object-fit:contain}.stock-product-photo span{font-size:22px;opacity:.45}
#purchaseXmlProductDialog.purchase-xml-product-complete{width:min(952px,94vw)!important;max-width:952px!important;max-height:88vh!important}#purchaseXmlProductDialog.purchase-xml-product-complete form{max-height:88vh!important}#purchaseXmlProductDialog.purchase-xml-product-complete header{padding:13px 17px!important}#purchaseXmlProductDialog .xml-product-section{margin:10px 14px!important;padding:12px!important}#purchaseXmlProductDialog .purchase-xml-product-grid{gap:6px 8px!important}#purchaseXmlProductDialog input,#purchaseXmlProductDialog select{min-height:36px!important;height:36px!important}#purchaseXmlProductDialog footer{padding:10px 14px!important}
#financeSettleConfirm{background:#1769c2!important;color:#fff!important;border:1px solid #1769c2!important;box-shadow:0 2px 6px rgba(23,105,194,.22)!important;font-weight:800!important}#financeSettleConfirm:hover{background:#12579f!important;border-color:#12579f!important}#financeSettleConfirm:disabled{background:#b8c5d6!important;border-color:#b8c5d6!important;color:#f7f9fc!important;cursor:not-allowed!important}
.bank-layout{display:grid;gap:16px}.bank-account-form .inline-check{align-self:end;padding-bottom:10px}.bank-layout table tbody tr{cursor:pointer}.bank-layout table tbody tr:hover{background:#f3f7fd}.bank-layout .fin-search-card{margin:0}.bank-layout .fin-section-head{margin-bottom:12px}
.fin-summary-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:10px;padding:6px 0;border-bottom:1px solid #eef2f6}.fin-summary-row:last-child{border-bottom:0}.fin-summary-row span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.fin-summary-row b{white-space:nowrap}.fin-summary-row small{color:#7a8799;white-space:nowrap}
@media(max-width:900px){.stock-consult-filters{grid-template-columns:1fr}.stock-consult-actions{flex-wrap:wrap}#purchaseXmlProductDialog.purchase-xml-product-complete{width:96vw!important}}

/* 0.12.61 */
.bank-calc-compact{width:auto!important;min-width:130px!important;height:42px!important;padding:0 18px!important;align-self:end}.danger-soft{border-color:#efb4b4!important;color:#a92323!important;background:#fff7f7!important}.plan-account-layout{display:grid;gap:16px}.plan-account-layout table tbody tr{cursor:pointer}.plan-account-layout table tbody tr:hover{background:#f3f7fd}.payable-edit-dialog{max-width:760px}

/* 0.12.63 — compactação visual e padrão moderno */
#financePagar .fin-table-card{padding:8px;margin-top:8px;border-radius:10px}
#financePagar .fin-table-card table{font-size:12px}
#financePagar .fin-table-card th,#financePagar .fin-table-card td{padding:6px 7px;line-height:1.2}
#financePagar .fin-summary-grid{gap:8px;margin-top:8px}
#financePagar .fin-summary-grid section{padding:9px;border-radius:10px;min-height:0}
#financePagar .fin-summary-grid h3{font-size:12px;margin-bottom:7px}
#financePagar .fin-summary-row{gap:6px;padding:4px 0;font-size:11px}
#financePagar .fin-summary-row small{font-size:10px}
#financePagar .fin-table-actions button{height:30px;padding:0 10px;border-radius:8px;font-size:12px}
.payable-edit-dialog{width:min(620px,calc(100vw - 32px))!important;max-width:620px!important;border:0!important;border-radius:18px!important;padding:0!important;box-shadow:0 24px 70px rgba(24,42,70,.28)!important;overflow:hidden!important}
.payable-edit-dialog form{padding:22px!important;background:#fff}
.payable-edit-dialog h3{font-size:22px;margin:0 0 18px;color:#17243a}
.payable-edit-dialog .finance-settle-grid{gap:12px!important}
.payable-edit-dialog input,.payable-edit-dialog select,.payable-edit-dialog textarea{border:1px solid #d6deea!important;border-radius:10px!important;min-height:40px!important;padding:8px 10px!important;background:#fff!important}
.payable-edit-dialog .actions{display:flex!important;justify-content:flex-end!important;gap:10px!important;margin-top:18px!important}
.payable-edit-dialog .actions button{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-width:120px!important;height:40px!important;border-radius:10px!important;border:1px solid #d6deea!important;background:#fff!important;font-weight:750!important;cursor:pointer!important}
.payable-edit-dialog .actions button.primary{background:#1769c2!important;border-color:#1769c2!important;color:#fff!important;box-shadow:0 5px 14px rgba(23,105,194,.18)!important}
.payable-edit-dialog .actions button:hover{transform:translateY(-1px)}
#kardexView .module-head{margin-bottom:8px}
#kardexView .module-head h2{font-size:22px;margin-bottom:4px}
#kardexView .module-head p{font-size:13px}
#kardexView .kardex-head-actions{gap:5px}
#kardexView .kardex-head-actions .kardex-action{height:27px;padding:0 8px;border-radius:8px;font-size:11px}
#kardexView .kardex-filter{grid-template-columns:125px 125px 190px minmax(210px,1fr) 155px 190px;gap:8px;margin-bottom:8px;padding:10px!important}
#kardexView .kardex-filter label{font-size:11px}
#kardexView .kardex-filter input,#kardexView .kardex-filter select{min-height:34px!important;padding:6px 8px!important;font-size:12px!important;margin-top:4px!important}
#kardexView .lookup-button{min-height:34px!important;height:34px!important}
#kardexView .product-context-banner{padding:9px 12px!important;font-size:12px!important;margin-bottom:8px!important}
#kardexView .movement-summary{padding:7px 10px!important;font-size:12px!important}
#kardexView .kardex-grid table{font-size:11px!important}
#kardexView .kardex-grid th,#kardexView .kardex-grid td{padding:5px 7px!important;line-height:1.15!important}
body.locked #loginScreen,body.locked #loginScreen *{pointer-events:auto!important}
body.locked #loginScreen{visibility:visible!important;opacity:1!important;z-index:2147483647!important}
.fiscal-settings-panel{min-width:0}
.fiscal-settings-panel .fiscal-grid{grid-template-columns:minmax(0,1fr) 330px}
.fiscal-operational-placeholder{max-width:900px}
@media(max-width:1100px){.fiscal-settings-panel .fiscal-grid{grid-template-columns:1fr}}

/* 0.12.64 — Contas a Receber / Fechamento do Caixa */
#financeReceber .fin-table-card{padding:9px;margin-top:10px;border-radius:11px}
#financeReceber .finance-main-table{max-height:430px}
#financeReceber .finance-main-table table{min-width:1500px;font-size:12px}
#financeReceber .finance-main-table th,#financeReceber .finance-main-table td{padding:7px 8px;line-height:1.2}
#financeReceber .negative-value{color:#c62828;font-weight:800}
.receive-filter-row{grid-template-columns:1.15fr 1.25fr 1fr 1fr 1fr}
.receive-search-line{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;margin-top:10px}
.receive-search-line input{height:39px;border:1px solid #d6dce7;border-radius:9px;padding:0 11px;background:#fff}
.receive-search-line button{min-width:125px}
.cash-close-card{max-width:980px}
.cash-close-row{grid-template-columns:1.25fr 1fr .8fr auto;align-items:end;margin-top:12px}
.cash-close-action{display:flex;align-items:end}.cash-close-action button{height:39px;white-space:nowrap}
#cashCloseResult{margin-top:12px}
#receiveSettleDialog .actions button,#financeSettleDialog .actions button,.payable-edit-dialog .actions button{border-radius:9px;padding:10px 16px;font-weight:800;border:1px solid #d6dde8;background:#fff}
#receiveSettleDialog .actions button.primary,#financeSettleDialog .actions button.primary,.payable-edit-dialog .actions button.primary{background:#1467d8!important;color:#fff!important;border-color:#1467d8!important}
@media(max-width:900px){.receive-filter-row,.cash-close-row{grid-template-columns:1fr 1fr}.cash-close-action{grid-column:1/-1}.receive-search-line{grid-template-columns:1fr}}
/* 0.12.65 — menu icons, PDV parcelado e Caixa */
.nav-icon-img{width:24px;height:24px;object-fit:contain;flex:0 0 24px}
.pdv-installment-box{display:flex;align-items:end;gap:10px;margin:8px 0 0}.pdv-installment-box label{display:flex;gap:8px;align-items:center;font-weight:700}.pdv-installment-box select{min-width:88px}
.cash-subtabs{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 14px}.cash-panel{display:none}.cash-panel.active{display:block}.cash-close-action{display:flex;gap:8px;align-items:end;flex-wrap:wrap}.cash-analysis-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin:12px 0}.cash-analysis-card{background:#fff;border:1px solid #d8e2ee;border-radius:12px;padding:12px}.cash-analysis-card small{display:block;color:#6c7b8e;margin-bottom:6px}.cash-analysis-card strong{font-size:20px}.cash-print-dialog{max-width:620px;width:min(620px,95vw);border:0;border-radius:16px;padding:18px}.cash-print-receipt{font-family:Arial,sans-serif;color:#111}.cash-print-receipt h2{text-align:center;margin:8px 0}.cash-print-receipt .company{text-align:center}.cash-print-receipt table{width:100%;border-collapse:collapse}.cash-print-receipt td{padding:7px 4px;border-bottom:1px solid #ddd}.cash-print-receipt td:last-child{text-align:right}.cash-signatures{display:grid;grid-template-columns:1fr 1fr;gap:36px;margin-top:54px}.cash-signatures div{border-top:1px solid #111;text-align:center;padding-top:6px}.cash-paper-select{display:flex;align-items:center;gap:7px;font-weight:700}.cash-paper-select select{height:38px;border:1px solid #cfd9e5;border-radius:8px;padding:0 10px;background:#fff}.cash-print-receipt.thermal-80{width:76mm;margin:0 auto;font-size:12px}.cash-print-receipt.thermal-58{width:54mm;margin:0 auto;font-size:10px}.cash-print-receipt.thermal-80 .company img{max-width:52mm!important;max-height:22mm!important}.cash-print-receipt.thermal-58 .company img{max-width:42mm!important;max-height:18mm!important}.cash-print-receipt.thermal-58 h2{font-size:16px}.cash-print-receipt.thermal-58 p{margin:7px 0}.cash-print-receipt.thermal-58 td{padding:5px 2px}.cash-print-receipt.thermal-58 .cash-signatures{gap:14px;margin-top:38px;font-size:9px}
@media print{body *{visibility:hidden!important}.cash-print-dialog[open],.cash-print-dialog[open] *{visibility:visible!important}.cash-print-dialog[open]{position:absolute;left:0;top:0;width:100%;max-width:none;box-shadow:none}.no-print{display:none!important}}

/* 0.12.66 — navegação consistente, loja da sessão e ações compactas */
.cash-search-compact{justify-self:start!important;align-self:end!important;width:auto!important;min-width:116px!important;height:39px!important;padding:0 15px!important;white-space:nowrap}
#pdvStore:disabled,#cashCloseStore:disabled{background:#f3f6fa!important;color:#475569!important;cursor:not-allowed;opacity:1}

/* 0.12.67 — relatórios de estoque: padrão moderno e compacto */
.report-detail-view{padding-bottom:18px}.report-detail-view .module-head{align-items:flex-start;gap:14px;margin-bottom:12px}.report-detail-view .module-head h2{margin:0 0 4px;font-size:22px}.report-detail-view .module-head p{margin:0;color:#728198}.report-actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}.report-actions .btn-modern{min-height:30px;height:30px;padding:0 10px;border-radius:9px;font-size:12px;font-weight:750}.report-filter-row,.report-filter-grid{display:grid;gap:10px;align-items:end;margin-bottom:12px}.report-filter-row{grid-template-columns:minmax(220px,320px) minmax(280px,1fr)}.report-filter-grid{grid-template-columns:repeat(4,minmax(150px,1fr))}.report-filter-row label,.report-filter-grid label{font-size:12px;font-weight:700;color:#45566e}.report-filter-row input,.report-filter-row select,.report-filter-grid input,.report-filter-grid select{width:100%;min-height:34px;margin-top:5px;padding:6px 9px;border:1px solid #d4deeb;border-radius:9px;background:#fff}.report-table-wrap{padding:0;overflow:auto;margin-bottom:12px}.report-table-wrap table{min-width:100%;border-collapse:collapse}.report-table-wrap th{position:sticky;top:0;background:#eaf2f8;z-index:1;font-size:11px;white-space:nowrap}.report-table-wrap td{font-size:11px}.report-table-wrap th,.report-table-wrap td{padding:6px 8px;border-bottom:1px solid #e3e9f1}.report-table-wrap tbody tr:hover{background:#f7fbff}.report-mode-tabs{display:flex;gap:7px;flex-wrap:wrap;margin:0 0 10px}.report-mode-tabs button{height:31px;padding:0 11px;border:1px solid #d3deeb;border-radius:9px;background:#fff;color:#344963;font-size:12px;font-weight:750;cursor:pointer}.report-mode-tabs button.active{background:#1769c2;color:#fff;border-color:#1769c2}.abc-legend{display:flex;gap:14px;margin:4px 0 10px;font-size:13px}.abc-a{color:#1d7a43}.abc-b{color:#1d5fa8}.abc-c{color:#c53f3f}.abc-row.abc-a td:first-child{background:#e6f7ed;color:#16713d}.abc-row.abc-b td:first-child{background:#e8f1ff;color:#245f9b}.abc-row.abc-c td:first-child{background:#fff0f0;color:#a63636}#inventoryRows tr{cursor:default}#inventoryRows tr[data-inventory-id]{cursor:pointer}#inventoryDetailPanel .product-context-banner{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}.report-detail-view h3{font-size:15px;margin:12px 0 7px;color:#26384f}
@media(max-width:1200px){.report-filter-grid{grid-template-columns:repeat(2,minmax(160px,1fr))}.report-filter-row{grid-template-columns:1fr}.report-detail-view .module-head{flex-direction:column}.report-actions{justify-content:flex-start}}
@media print{.report-detail-view[hidden]{display:none!important}.report-actions,.report-filter-row,.report-filter-grid,.report-mode-tabs,[data-report-back]{display:none!important}.report-table-wrap{overflow:visible}.report-table-wrap table{font-size:9px}}

/* 0.12.68 — Caixa / Análise de Vendas compacta (~40%) */
.cash-analysis-compact .fin-search-card{padding:10px 12px;margin-bottom:8px}
.cash-analysis-compact .fin-filter-row{grid-template-columns:1.1fr .9fr .9fr .9fr auto;gap:8px;align-items:end}
.cash-analysis-compact .fin-filter-row label{font-size:11px}
.cash-analysis-compact .fin-filter-row input,.cash-analysis-compact .fin-filter-row select{height:32px;margin-top:3px;padding:0 8px;border-radius:7px;font-size:12px}
.cash-analysis-compact .cash-search-compact{height:32px!important;min-width:96px!important;padding:0 12px!important;font-size:12px!important;border-radius:8px!important}
.cash-analysis-compact .cash-analysis-cards{grid-template-columns:repeat(6,minmax(108px,1fr));gap:8px;margin:8px 0}
.cash-analysis-compact .cash-analysis-card{padding:8px 10px;border-radius:10px;min-height:54px}
.cash-analysis-compact .cash-analysis-card small{font-size:11px;margin-bottom:3px}
.cash-analysis-compact .cash-analysis-card strong{font-size:16px}
.cash-analysis-compact .fin-table-card{padding:10px 12px}
.cash-analysis-compact .fin-table-actions{margin-bottom:7px}
.cash-analysis-compact .cash-analysis-actions{display:flex;gap:6px;align-items:center}
.cash-analysis-compact .cash-analysis-actions .btn-modern{height:30px;padding:0 10px;font-size:12px;border-radius:8px}
.cash-analysis-compact #cashAnalysisTable{font-size:11px}
.cash-analysis-compact #cashAnalysisTable th,.cash-analysis-compact #cashAnalysisTable td{padding:6px 8px;line-height:1.15}
@media(max-width:1150px){.cash-analysis-compact .cash-analysis-cards{grid-template-columns:repeat(3,minmax(110px,1fr))}}

/* 0.12.69 — Curva ABC (Vendedor / Fornecedor / Grupo / Marca) */
.abc-dimension-tabs{margin-bottom:10px}.abc-filter-grid{grid-template-columns:repeat(4,minmax(160px,1fr))}.abc-class-badge{display:inline-flex;align-items:center;justify-content:center;min-width:26px;height:24px;border-radius:8px;font-weight:850}.abc-row.abc-a .abc-class-badge{background:#e6f7ed;color:#16713d}.abc-row.abc-b .abc-class-badge{background:#e8f1ff;color:#245f9b}.abc-row.abc-c .abc-class-badge{background:#fff0f0;color:#a63636}#abcTable tfoot th{background:#f4f7fb;font-weight:800;white-space:nowrap}#abcTable tbody td:nth-child(n+4),#abcTable tfoot th:nth-child(n+4){text-align:right}#abcTable thead th{white-space:nowrap}@media(max-width:1100px){.abc-filter-grid{grid-template-columns:repeat(2,minmax(160px,1fr))}}

/* 0.12.79 — detalhes de erros da importação */
.import-error-details{margin-top:10px;border:1px solid #f0c7c7;border-radius:12px;background:#fff7f7;padding:10px 14px}.import-error-details summary{cursor:pointer;font-weight:700;color:#9f2020}.import-error-list{max-height:180px;overflow:auto;margin-top:10px;font-size:13px;line-height:1.6}.import-error-list>div{padding:4px 0;border-bottom:1px solid #f4dddd}

/* 0.12.83 — Fiscal: estados, rascunho e ações */
.nfce-status{display:inline-flex;align-items:center;padding:4px 9px;border-radius:999px;font-size:11px;font-weight:800;white-space:nowrap}.nfce-status.not-validated{background:#eef2f6;color:#5e6d7f}.nfce-status.validated{background:#e7f3ff;color:#145b9e}.nfce-status.draft{background:#fff3d6;color:#8a5b00}.nfce-status.authorized{background:#def7e7;color:#176b3a}.nfce-status.rejected{background:#ffe2e2;color:#a02626}.nfce-status.canceled{background:#eceff3;color:#626b76}.nfce-actions-cell{white-space:nowrap}.nfce-actions-cell .btn-modern{min-height:31px;height:31px;padding:0 10px;margin:2px}.nfce-draft-dialog{width:min(1080px,94vw);max-width:1080px;border:0;border-radius:16px;padding:0;box-shadow:0 28px 80px rgba(15,23,42,.32)}.nfce-draft-dialog::backdrop{background:rgba(15,23,42,.55)}.nfce-draft-shell{padding:20px}.nfce-draft-shell pre{max-height:55vh;overflow:auto;padding:14px;border:1px solid #d9e2ec;border-radius:10px;background:#0f172a;color:#e2e8f0;font:12px/1.55 Consolas,monospace;white-space:pre-wrap;word-break:break-word}.nfce-draft-rules{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0}.nfce-draft-rules>b{width:100%}.nfce-draft-rules span{padding:5px 8px;border-radius:8px;background:#eef5ff;color:#234e7b;font-size:12px}.nfce-draft-dialog .dialog-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:14px}.fiscal-rule-store[hidden]{display:none!important}

/* 0.12.85 — fluxo fiscal guiado pelo PDV */
.nfce-focus-row{outline:2px solid #2b78c6;outline-offset:-2px;background:#eef6ff!important}.nfce-focus-row td{background:#eef6ff!important}.pdv-consumer-final-quick{display:flex;align-items:center;gap:12px;padding:12px 14px;margin:10px 0;border:1px solid #b9d8f5;border-radius:12px;background:#f3f9ff}.pdv-consumer-final-quick span{color:#5d6f82;font-size:12px}.nfce-summary-dialog{width:min(1280px,96vw);max-width:1280px;border:0;border-radius:16px;padding:0;box-shadow:0 28px 80px rgba(15,23,42,.32)}.nfce-summary-dialog::backdrop{background:rgba(15,23,42,.55)}.nfce-summary-shell{padding:20px}.nfce-summary-meta{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:10px 0 14px}.nfce-summary-meta span{padding:10px 12px;border:1px solid #dce6f0;border-radius:10px;background:#f8fafc}.nfce-summary-section{margin-top:14px}.nfce-summary-section h4{margin:0 0 7px}.nfce-summary-dialog table{font-size:12px}.nfce-summary-payments{display:flex;gap:8px;flex-wrap:wrap}.nfce-summary-payments span{background:#eef5ff;border-radius:8px;padding:7px 10px}.nfce-summary-validation{display:grid;gap:6px}.nfce-summary-validation>div{padding:9px 11px;border-radius:9px}.nfce-summary-validation .issue-error{background:#fff0f0;color:#a32727;border:1px solid #f2caca}.nfce-summary-validation .issue-warning{background:#fff8e8;color:#855b12;border:1px solid #eed9a5}.nfce-summary-validation .issue-ok{background:#edf9f1;color:#237044;border:1px solid #bde3c9}.nfce-summary-dialog .dialog-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:16px}@media(max-width:900px){.nfce-summary-meta{grid-template-columns:1fr 1fr}}

/* 0.12.86 — Configurações compactas (~45% menos espaço vertical) */
#configuracoes .settings-compact{gap:12px;align-items:flex-start}
#configuracoes .settings-compact .settings-nav{padding:8px;width:220px;gap:2px;border-radius:12px}
#configuracoes .settings-compact .settings-nav button{min-height:34px;padding:7px 12px;font-size:14px;border-radius:9px}
#configuracoes .settings-compact>.panel.settings{padding:14px 16px;border-radius:12px}
#configuracoes .settings-compact .panel-head{margin-bottom:10px;gap:10px}
#configuracoes .settings-compact .panel-head h2{font-size:21px;margin:0 0 2px}
#configuracoes .settings-compact .panel-head h3{font-size:17px;margin:0 0 2px}
#configuracoes .settings-compact .panel-head p{font-size:13px;line-height:1.25;margin:0}
#configuracoes .settings-compact .notice,#configuracoes .settings-compact .warning,#configuracoes .settings-compact .fiscal-status-box{padding:10px 12px;margin:8px 0;font-size:13px;line-height:1.3;border-radius:10px}
#configuracoes .settings-compact h3{font-size:15px;margin:12px 0 7px;padding-bottom:6px}
#configuracoes .settings-compact .form-grid,#configuracoes .settings-compact .fiscal-rule-form,#configuracoes .settings-compact .payment-method-form,#configuracoes .settings-compact .fiscal-config-grid{gap:8px 10px}
#configuracoes .settings-compact label{font-size:12px;gap:3px}
#configuracoes .settings-compact input,#configuracoes .settings-compact select,#configuracoes .settings-compact textarea{min-height:34px;padding:6px 9px;font-size:13px;border-radius:8px}
#configuracoes .settings-compact textarea{min-height:64px}
#configuracoes .settings-compact button,#configuracoes .settings-compact .btn-modern{min-height:34px;padding:6px 12px;font-size:13px;border-radius:9px}
#configuracoes .settings-compact .lookup-control{gap:5px}
#configuracoes .settings-compact .lookup-control .lookup-code{max-width:115px}
#configuracoes .settings-compact .lookup-button{width:36px;min-width:36px;padding:0}
#configuracoes .settings-compact .table-wrap{margin-top:8px}
#configuracoes .settings-compact table th,#configuracoes .settings-compact table td{padding:7px 9px;font-size:12px}
#configuracoes .settings-compact .fiscal-rule-tabs{margin:8px 0;gap:6px}
#configuracoes .settings-compact .fiscal-rule-section{padding-top:4px}
#configuracoes .settings-compact .fiscal-config-layout{gap:12px}
#configuracoes .settings-compact .fiscal-status-panel{padding:12px}
#configuracoes .settings-compact .payment-settings-actions,#configuracoes .settings-compact .fiscal-actions{gap:6px}
#configuracoes .settings-compact .inline-check{min-height:34px;padding:5px 8px}
#configuracoes .settings-compact .inline-check input{min-height:auto}
#configuracoes .settings-compact .span-2{grid-column:span 2}
.cep-inline{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px;align-items:center}
.cep-inline .btn-modern{white-space:nowrap}
.settings-inline-actions{display:flex;gap:6px;align-items:end}
@media(max-width:1050px){#configuracoes .settings-compact .settings-nav{width:190px}#configuracoes .settings-compact .span-2{grid-column:auto}.cep-inline{grid-template-columns:1fr}}


/* 0.12.87 — modo compacto agressivo em Configurações e Pré-emissão Fiscal */
#configuracoes .settings-compact{gap:8px}
#configuracoes .settings-compact .settings-nav{width:188px;padding:5px;gap:1px;border-radius:10px}
#configuracoes .settings-compact .settings-nav button{min-height:29px;padding:4px 9px;font-size:12px;line-height:1.15;border-radius:7px}
#configuracoes .settings-compact>.panel.settings{padding:9px 11px;border-radius:10px}
#configuracoes .settings-compact .panel-head{margin-bottom:6px;gap:7px}
#configuracoes .settings-compact .panel-head h2{font-size:18px;line-height:1.15;margin:0}
#configuracoes .settings-compact .panel-head h3{font-size:15px;line-height:1.15;margin:0}
#configuracoes .settings-compact .panel-head p{font-size:11px;line-height:1.2;margin:2px 0 0}
#configuracoes .settings-compact .notice,
#configuracoes .settings-compact .warning,
#configuracoes .settings-compact .fiscal-status-box{padding:6px 9px;margin:5px 0;font-size:11px;line-height:1.25;border-radius:8px}
#configuracoes .settings-compact h3{font-size:13px;margin:7px 0 4px;padding-bottom:4px;letter-spacing:.35px}
#configuracoes .settings-compact .form-grid,
#configuracoes .settings-compact .fiscal-rule-form,
#configuracoes .settings-compact .payment-method-form,
#configuracoes .settings-compact .fiscal-config-grid{gap:4px 8px}
#configuracoes .settings-compact label{font-size:11px;line-height:1.15;margin-top:4px;gap:2px}
#configuracoes .settings-compact input,
#configuracoes .settings-compact select,
#configuracoes .settings-compact textarea{min-height:29px;height:29px;padding:4px 7px;font-size:12px;line-height:1.1;border-radius:7px;margin-top:3px}
#configuracoes .settings-compact textarea{height:auto;min-height:50px}
#configuracoes .settings-compact button,
#configuracoes .settings-compact .btn-modern{min-height:29px;height:29px;padding:4px 9px;font-size:12px;line-height:1;border-radius:7px}
#configuracoes .settings-compact .lookup-control{gap:4px}
#configuracoes .settings-compact .lookup-control .lookup-code{max-width:90px}
#configuracoes .settings-compact .lookup-button{width:30px;min-width:30px;height:29px;padding:0}
#configuracoes .settings-compact .table-wrap{margin-top:5px}
#configuracoes .settings-compact table{font-size:11px}
#configuracoes .settings-compact table th,
#configuracoes .settings-compact table td{padding:4px 6px;font-size:11px;line-height:1.15}
#configuracoes .settings-compact .fiscal-rule-tabs{margin:5px 0;gap:4px}
#configuracoes .settings-compact .fiscal-rule-tabs button{min-height:29px;height:29px;padding:0 9px}
#configuracoes .settings-compact .fiscal-rule-section{padding-top:2px}
#configuracoes .settings-compact .fiscal-config-layout{gap:8px}
#configuracoes .settings-compact .fiscal-status-panel{padding:8px}
#configuracoes .settings-compact .payment-settings-panel{gap:7px}
#configuracoes .settings-compact .payment-settings-actions,
#configuracoes .settings-compact .fiscal-actions{gap:4px}
#configuracoes .settings-compact .inline-check{min-height:29px;padding:3px 6px;margin-top:3px}
#configuracoes .settings-compact .inline-check input{height:auto;min-height:auto;margin:0}
#configuracoes .settings-compact .cep-inline{gap:4px}
#configuracoes .settings-compact .fiscal-homolog-badge{padding:5px 9px;font-size:11px}
#configuracoes .settings-compact .fiscal-rule-table{max-height:260px;margin-top:5px}
#configuracoes .settings-compact .span2{grid-column:1/-1}

/* Pré-emissão NFC-e compacta */
#fiscal.fiscal-page .module-head{margin-bottom:7px;min-height:34px}
#fiscal.fiscal-page .module-head h2{font-size:20px;margin:0 0 2px}
#fiscal.fiscal-page .module-head p{font-size:11px;margin:0}
#fiscal.fiscal-page .fiscal-actions .btn-modern{height:29px;min-height:29px;padding:0 9px;font-size:11px;border-radius:7px}
#fiscal.fiscal-page>.warning{margin:5px 0;padding:7px 10px;font-size:11px;line-height:1.25;border-radius:8px}
#fiscal.fiscal-page>.panel.report-filter-row{padding:7px 9px;margin-bottom:7px;gap:8px;grid-template-columns:minmax(170px,280px) minmax(240px,1fr);border-radius:9px}
#fiscal.fiscal-page>.panel.report-filter-row label{font-size:11px;margin:0}
#fiscal.fiscal-page>.panel.report-filter-row select{min-height:29px;height:29px;margin-top:3px;padding:3px 7px;font-size:11px;border-radius:7px}
#fiscal.fiscal-page>.panel.report-filter-row .fiscal-status-box{margin:0;padding:6px 9px;font-size:11px;line-height:1.2;border-radius:8px;min-height:29px;display:flex;align-items:center}
#fiscalPaneNfe .report-filter-row{grid-template-columns:minmax(150px,220px) minmax(150px,200px) minmax(200px,1fr)}
#fiscal.fiscal-page .fiscal-actions-group{display:flex;gap:10px}
#fiscal.fiscal-page .fiscal-actions-group[hidden]{display:none}
#fiscal.fiscal-page>.panel.report-table-wrap{margin:0;padding:0;border-radius:9px}
#fiscal.fiscal-page #nfceOpsTable{font-size:10px;table-layout:auto}
#fiscal.fiscal-page #nfceOpsTable th{padding:5px 6px;font-size:10px;line-height:1.1}
#fiscal.fiscal-page #nfceOpsTable td{padding:4px 6px;font-size:10px;line-height:1.15;vertical-align:middle}
#fiscal.fiscal-page .nfce-status{padding:3px 6px;font-size:9px}
#fiscal.fiscal-page .nfce-actions-cell{white-space:nowrap}
#fiscal.fiscal-page .nfce-actions-cell .btn-modern{height:27px;min-height:27px;padding:0 7px;margin:1px 2px;font-size:10px;border-radius:7px}
#fiscal.fiscal-page .nfce-focus-row{outline-width:1px}

@media(max-width:1150px){
  #configuracoes .settings-compact .settings-nav{width:165px}
  #fiscal.fiscal-page>.panel.report-filter-row{grid-template-columns:1fr}
}

/* 0.12.88 — padrão tipográfico global do Nolasco System
   Regra visual para telas atuais e futuras: hierarquia previsível e fontes consistentes. */
:root{
  --ns-font-title:20px;
  --ns-font-section:14px;
  --ns-font-label:11px;
  --ns-font-control:12px;
  --ns-font-table:11px;
  --ns-font-button:12px;
  --ns-font-help:11px;
}
.page .module-head h1,.page .module-head h2,.page-title{font-size:var(--ns-font-title)!important;line-height:1.15!important}
.page .module-head p,.page-subtitle,.muted,.helper-text{font-size:var(--ns-font-help);line-height:1.25}
.page h3,.page .section-title,.page .card-title{font-size:var(--ns-font-section);line-height:1.2}
.page label,.page .field-label{font-size:var(--ns-font-label);line-height:1.15}
.page input,.page select,.page textarea{font-size:var(--ns-font-control)}
.page table{font-size:var(--ns-font-table)}
.page button,.page .btn-modern{font-size:var(--ns-font-button)}
.page .notice,.page .warning,.page .fiscal-status-box,.page .product-context-banner{font-size:var(--ns-font-help)}
.page .nfce-status,.page .badge{font-size:10px}

/* Financeiro — Parcelado Loja: destaque visual das parcelas individuais. */
#financeReceber .finance-main-table td:nth-child(5){font-weight:800;color:#315777;text-align:center}

/* 0.12.94 — Fiscal guiado: contexto, etapas, retorno SEFAZ e diagnóstico A1/SVRS */
#fiscal.fiscal-page .nfce-overview-cards{display:grid;grid-template-columns:repeat(5,minmax(120px,1fr));gap:7px;margin:0 0 7px}
#fiscal.fiscal-page .nfce-kpi{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 9px;border:1px solid #dce5ef;border-radius:9px;background:#fff;min-height:42px}
#fiscal.fiscal-page .nfce-kpi span{font-size:10px;color:#64748b;font-weight:700}
#fiscal.fiscal-page .nfce-kpi b{font-size:18px;color:#19324d}
#fiscal.fiscal-page .nfce-kpi.danger{border-color:#f1caca;background:#fff8f8}.nfce-kpi.danger b{color:#a62b2b}
#fiscal.fiscal-page .nfce-kpi.success{border-color:#bde2c9;background:#f5fcf7}.nfce-kpi.success b{color:#217044}
#fiscal.fiscal-page .nfce-selected-panel,#fiscal.fiscal-page .nfce-diag-panel{padding:9px 10px;margin:0 0 7px;border-radius:10px;border:1px solid #d7e2ed;background:#fff}
#fiscal.fiscal-page .nfce-selected-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:7px}
#fiscal.fiscal-page .nfce-selected-head h3{margin:1px 0 0;font-size:15px}
#fiscal.fiscal-page .nfce-eyebrow{display:block;font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.06em;color:#718197}
#fiscal.fiscal-page .nfce-selected-facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px 7px;margin-bottom:8px}
#fiscal.fiscal-page .nfce-selected-facts span{display:flex;flex-direction:column;gap:2px;padding:5px 7px;border:1px solid #e2e8f0;border-radius:7px;background:#f8fafc;font-size:10px;min-width:0;overflow-wrap:anywhere}
#fiscal.fiscal-page .nfce-selected-facts b{font-size:9px;text-transform:uppercase;color:#718197}
#fiscal.fiscal-page .nfce-stage-track{display:grid;grid-template-columns:repeat(4,1fr);gap:5px;margin:6px 0 8px}
#fiscal.fiscal-page .nfce-stage{display:flex;align-items:center;gap:6px;padding:5px 7px;border:1px solid #dce4ed;border-radius:8px;background:#f8fafc;color:#68778a;font-size:10px;font-weight:750}
#fiscal.fiscal-page .nfce-stage i{display:grid;place-items:center;width:19px;height:19px;border-radius:50%;background:#e8edf3;color:#68778a;font-style:normal;font-size:9px;font-weight:900}
#fiscal.fiscal-page .nfce-stage.done{border-color:#b9dfc5;background:#f2faf5;color:#256f45}.nfce-stage.done i{background:#d8f2e1;color:#1f6b3f}
#fiscal.fiscal-page .nfce-stage.current{border-color:#9cc8f2;background:#eef7ff;color:#1d5f9b}.nfce-stage.current i{background:#d8ecff;color:#175790}
#fiscal.fiscal-page .nfce-stage.error{border-color:#efbcbc;background:#fff3f3;color:#9d2929}.nfce-stage.error i{background:#f8dede;color:#982525}
#fiscal.fiscal-page .nfce-selected-bottom{display:grid;grid-template-columns:1.1fr 1fr;gap:7px}
#fiscal.fiscal-page .nfce-selected-bottom>div>b{display:block;margin-bottom:3px;font-size:10px;color:#43556b}
#fiscal.fiscal-page .nfce-return-box,#fiscal.fiscal-page .nfce-next-box{min-height:31px;padding:6px 8px;border-radius:8px;font-size:10px;line-height:1.3}
#fiscal.fiscal-page .nfce-return-box{background:#fff8ee;border:1px solid #efd8ae;color:#704f1a}.nfce-return-box strong{color:#a12d2d}
#fiscal.fiscal-page .nfce-next-box{background:#eef6ff;border:1px solid #c7dcf2;color:#315b82}
#fiscal.fiscal-page .nfce-selected-actions{display:flex;flex-wrap:wrap;gap:4px;margin-top:7px}
#fiscal.fiscal-page .nfce-selected-actions .btn-modern{height:27px;min-height:27px;padding:0 8px;font-size:10px;border-radius:7px}
#fiscal.fiscal-page .nfce-return-cell{max-width:260px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#536579}
#fiscal.fiscal-page #nfceOpsTable tbody tr[data-nfce-sale-row]{cursor:pointer}
#fiscal.fiscal-page #nfceOpsTable tbody tr[data-nfce-sale-row]:hover td{background:#f4f9ff}
#fiscal.fiscal-page .nfce-diag-content{font-size:10px}
#fiscal.fiscal-page .nfce-diag-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-bottom:7px}
#fiscal.fiscal-page .nfce-diag-grid span{display:flex;flex-direction:column;gap:2px;padding:6px 8px;border:1px solid #e2e8f0;border-radius:8px;background:#f8fafc;overflow-wrap:anywhere}
#fiscal.fiscal-page .nfce-diag-grid b{font-size:9px;text-transform:uppercase;color:#718197}
#fiscal.fiscal-page .diag-ok{color:#217044}.diag-error{color:#aa2d2d}
#fiscal.fiscal-page .nfce-diag-panel .issue-ok,#fiscal.fiscal-page .nfce-diag-panel .issue-error,#fiscal.fiscal-page .nfce-diag-panel .issue-warning{padding:7px 9px;border-radius:8px}
#fiscal.fiscal-page .nfce-diag-panel .issue-ok{background:#edf9f1;border:1px solid #bde3c9;color:#237044}
#fiscal.fiscal-page .nfce-diag-panel .issue-error{background:#fff0f0;border:1px solid #f2caca;color:#a32727}
#fiscal.fiscal-page .nfce-diag-panel .issue-warning{background:#fff8e8;border:1px solid #eed9a5;color:#855b12}
#fiscal.fiscal-page #nfceDraftSefazReturn{margin:8px 0}
@media(max-width:1200px){#fiscal.fiscal-page .nfce-overview-cards{grid-template-columns:repeat(3,1fr)}#fiscal.fiscal-page .nfce-selected-facts{grid-template-columns:repeat(2,1fr)}#fiscal.fiscal-page .nfce-diag-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:760px){#fiscal.fiscal-page .nfce-overview-cards{grid-template-columns:1fr 1fr}#fiscal.fiscal-page .nfce-selected-facts,#fiscal.fiscal-page .nfce-selected-bottom,#fiscal.fiscal-page .nfce-diag-grid{grid-template-columns:1fr}#fiscal.fiscal-page .nfce-stage-track{grid-template-columns:1fr 1fr}}


/* 0.13.7 — Vendas e PDV reorganizado em blocos claros e compactos */
#configuracoes .pdv-settings-panel{min-width:0}
#configuracoes .pdv-config-toolbar{
  display:grid;
  grid-template-columns:minmax(260px,420px) minmax(240px,1fr);
  gap:12px;
  align-items:end;
  padding:10px 12px;
  border:1px solid #dce5ef;
  border-radius:11px;
  background:#f8fbff;
}
#configuracoes .pdv-config-toolbar label{margin:0}
#configuracoes .pdv-config-context{
  min-height:48px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:3px;
  padding:6px 10px;
  border-left:3px solid #2d78c8;
  color:#526174;
}
#configuracoes .pdv-config-context b{font-size:12px;color:#24476c}
#configuracoes .pdv-config-context span{font-size:11px;line-height:1.25}

#configuracoes .pdv-settings-block{
  margin-top:10px;
  padding:11px 12px;
  border:1px solid #dce5ef;
  border-radius:11px;
  background:#fff;
}
#configuracoes .pdv-settings-block-title{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-bottom:9px;
  padding-bottom:8px;
  border-bottom:1px solid #edf1f6;
}
#configuracoes .pdv-settings-block-title strong{
  display:block;
  font-size:13px;
  color:#26384f;
}
#configuracoes .pdv-settings-block-title small{
  display:block;
  margin-top:2px;
  font-size:10.5px;
  line-height:1.2;
  color:#7a8798;
}

#configuracoes .pdv-settings-grid{
  display:grid;
  grid-template-columns:minmax(320px,1.35fr) minmax(280px,1fr);
  gap:12px;
  align-items:start;
}
#configuracoes .pdv-fiscal-field{margin:0}
#configuracoes .pdv-toggle-list{display:grid;gap:7px}

#configuracoes .settings-compact label.pdv-toggle{
  display:flex;
  align-items:flex-start;
  gap:10px;
  width:100%;
  margin:0;
  padding:10px 11px;
  border:1px solid #dce5ef;
  border-radius:10px;
  background:#fbfcfe;
  cursor:pointer;
  box-sizing:border-box;
  transition:border-color .15s ease,background .15s ease,box-shadow .15s ease;
}
#configuracoes .settings-compact label.pdv-toggle:hover{
  border-color:#b8cce4;
  background:#f7faff;
}
#configuracoes .settings-compact label.pdv-toggle:has(input:checked){
  border-color:#8bb4df;
  background:#f2f8ff;
  box-shadow:inset 3px 0 #2b78c6;
}
#configuracoes .settings-compact label.pdv-toggle>input[type="checkbox"]{
  appearance:auto;
  -webkit-appearance:auto;
  flex:0 0 18px;
  width:18px!important;
  min-width:18px!important;
  height:18px!important;
  min-height:18px!important;
  margin:1px 0 0!important;
  padding:0!important;
  border-radius:4px;
}
#configuracoes .pdv-toggle-copy{
  display:block;
  min-width:0;
}
#configuracoes .pdv-toggle-copy strong{
  display:block;
  font-size:12px;
  line-height:1.2;
  color:#28394f;
}
#configuracoes .pdv-toggle-copy small{
  display:block;
  margin-top:4px;
  color:#748196;
  font-size:10.5px;
  line-height:1.3;
  font-weight:400;
}

#configuracoes .pdv-logo-config{
  display:grid;
  grid-template-columns:165px minmax(260px,1fr);
  gap:14px;
  align-items:center;
}
#configuracoes .pdv-logo-preview{
  width:165px;
  height:76px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:6px;
  border:1px solid #dce5ef;
  border-radius:10px;
  background:#fff;
  box-sizing:border-box;
}
#configuracoes .pdv-logo-preview img{
  display:block;
  max-width:100%;
  max-height:100%;
  object-fit:contain;
}
#configuracoes .pdv-logo-actions{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:5px;
}
#configuracoes .pdv-logo-actions b{font-size:12px;color:#28394f}
#configuracoes .pdv-logo-actions>span{font-size:10.5px;color:#748196;line-height:1.25}
#configuracoes .pdv-logo-actions button{margin-top:2px}

#configuracoes .pdv-settings-footer{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  margin-top:11px;
  padding-top:10px;
  border-top:1px solid #e7edf4;
}
#configuracoes .pdv-settings-footer #configSavePdv{
  min-width:205px;
  font-weight:750;
}

@media(max-width:1050px){
  #configuracoes .pdv-config-toolbar,
  #configuracoes .pdv-settings-grid{grid-template-columns:1fr}
}
@media(max-width:760px){
  #configuracoes .pdv-logo-config{grid-template-columns:1fr}
}

/* 0.13.8 — Devolução + Vale Cliente */
.pdv-voucher-lookup-dialog{width:min(760px,92vw);max-width:760px;border:0;border-radius:14px;padding:0;box-shadow:0 22px 60px rgba(15,35,55,.26)}
.pdv-voucher-search{display:grid;grid-template-columns:1fr auto;gap:10px;margin:12px 0}
.pdv-return-dialog{width:min(1180px,95vw);max-width:1180px;border:0;border-radius:16px;padding:0;box-shadow:0 24px 70px rgba(15,35,55,.28)}
.pdv-return-shell{padding:18px;background:#f7f9fc;color:#24364b}
.pdv-return-search{display:grid;grid-template-columns:210px auto 1fr;gap:10px;align-items:end;margin:12px 0}
.pdv-return-search label,.pdv-return-bottom label{display:grid;gap:5px;font-size:12px;font-weight:700}
.pdv-return-search input,.pdv-return-bottom input,.pdv-return-bottom select{min-height:38px;border:1px solid #cfd9e5;border-radius:8px;padding:7px 10px;background:#fff}
.pdv-return-items{max-height:44vh;background:#fff;border:1px solid #dde6ef;border-radius:10px}
.pdv-return-items input[type="number"]{width:92px;min-height:32px;border:1px solid #cdd8e4;border-radius:7px;padding:4px 7px}
.pdv-return-items input[type="checkbox"]{width:18px;height:18px}
.pdv-return-items .return-unavailable{opacity:.55}
.pdv-return-bottom{display:grid;grid-template-columns:minmax(220px,1.15fr) minmax(260px,1.5fr) 180px auto;gap:12px;align-items:end;margin-top:12px}
.pdv-return-total{display:grid;gap:4px;padding:8px 12px;border:1px solid #dce5ef;border-radius:9px;background:#fff;font-size:11px;color:#66778b}
.pdv-return-total strong{font-size:20px;color:#173e64}
.pdv-return-actions{display:flex;gap:8px;justify-content:flex-end}
.pdv-return-actions #pdvReturnVoucher{min-width:112px}

.voucher-kpis>div{background:#fff;border:1px solid #e0e7ef;border-radius:11px;padding:12px 14px;box-shadow:0 2px 8px rgba(20,45,70,.04)}
.voucher-kpis small{display:block;color:#728096;font-size:11px;margin-bottom:4px}
.voucher-kpis strong{font-size:18px;color:#183b5d}
.finance-voucher-table{max-height:48vh;background:#fff;border:1px solid #e1e7ef;border-radius:10px}
.finance-voucher-table th{position:sticky;top:0;z-index:1;background:#edf3f8}
.voucher-status{display:inline-flex;align-items:center;justify-content:center;min-width:78px;padding:4px 8px;border-radius:999px;font-size:10.5px;font-weight:800;background:#e8eef5;color:#40546a}
.voucher-status.liberado{background:#e5f6eb;color:#19713c}.voucher-status.parcial{background:#fff4d7;color:#8d6400}.voucher-status.quitado{background:#e8edf4;color:#4d5e72}.voucher-status.vencido,.voucher-status.cancelado{background:#fde7e7;color:#a12d2d}.voucher-status.bloqueado{background:#f0e8ff;color:#6941a5}
.finance-voucher-dialog{width:min(980px,94vw);max-width:980px;border:0;border-radius:15px;padding:0;box-shadow:0 22px 65px rgba(15,35,55,.25)}
.finance-voucher-card{padding:18px;background:#f7f9fc;color:#24364b}
.voucher-detail-grid{display:grid;grid-template-columns:repeat(5,minmax(130px,1fr));gap:10px;margin:12px 0 16px}
.voucher-detail-grid>div{display:grid;gap:4px;background:#fff;border:1px solid #dde6ef;border-radius:9px;padding:10px}
.voucher-detail-grid small{color:#748196;font-size:10.5px}.voucher-detail-grid b{font-size:12px;overflow-wrap:anywhere}
.voucher-manual-grid{display:grid;grid-template-columns:1fr 1.4fr;gap:12px;margin:12px 0}
.voucher-manual-grid label{display:grid;gap:5px;font-size:12px;font-weight:700}
.voucher-manual-grid input,.voucher-manual-grid select,.voucher-manual-grid textarea{width:100%;box-sizing:border-box;border:1px solid #cfd9e5;border-radius:8px;padding:8px 10px;background:#fff}
.voucher-span-2{grid-column:1/-1}.voucher-client-search{display:grid;grid-template-columns:1fr auto;gap:8px}

.payment-method-form .payment-check{align-self:end;min-height:38px;display:flex;align-items:center;gap:8px;padding:7px 9px;border:1px solid #e0e7ef;border-radius:8px;background:#f8fafc}
.payment-method-form .payment-check input{width:18px;height:18px;margin:0}

@media(max-width:980px){.pdv-return-bottom{grid-template-columns:1fr 1fr}.voucher-detail-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:720px){.pdv-return-search,.pdv-return-bottom,.voucher-manual-grid{grid-template-columns:1fr}.voucher-span-2{grid-column:auto}.voucher-detail-grid{grid-template-columns:1fr}}

/* 0.13.9 — duas rotinas de devolução: por venda e por produto */
.pdv-return-mode{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0 4px}
.pdv-return-direct{margin:12px 0}
.pdv-return-direct-search{display:grid;grid-template-columns:minmax(260px,1fr) auto minmax(220px,1fr);gap:10px;align-items:end}
.pdv-return-direct-search label{display:grid;gap:5px;font-size:12px;font-weight:700}
.pdv-return-direct-search input{min-height:38px;border:1px solid #cfd9e5;border-radius:8px;padding:7px 10px;background:#fff}
.pdv-return-product-results{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:10px}
.pdv-return-product-result{display:grid;grid-template-columns:90px minmax(0,1fr);gap:4px 10px;text-align:left;border:1px solid #d8e2ed;border-radius:9px;background:#fff;padding:9px 10px;cursor:pointer;color:#24364b}
.pdv-return-product-result b{grid-row:1/3;align-self:center}.pdv-return-product-result span{font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pdv-return-product-result small{color:#728096}
@media(max-width:780px){.pdv-return-direct-search,.pdv-return-product-results{grid-template-columns:1fr}}
/* 0.13.32: abas escondidas por permissão (o !important das abas ignorava o atributo hidden) */
.finance-tab[hidden],.stock-page-tabs button[hidden],.finance-filters[hidden]{display:none!important}
/* 0.13.33: Fiscal em abas NFC-e / NF-e */
.fiscal-actions[hidden]{display:none!important}
.fiscal-tabs{margin:14px 0}
.status-pill{display:inline-block;padding:2px 10px;border-radius:999px;background:#fff3dc;color:#9a5700;font-weight:700;font-size:12px;white-space:nowrap}


/* 0.13.54 — Documentos Destinados + Contingência */
.purchase-module-tabs{display:flex;gap:6px;margin:0 0 10px;border-bottom:1px solid #dbe4ee;padding-bottom:7px}.purchase-module-tabs button{height:34px;padding:0 14px;border:1px solid #d6e0ea;border-radius:9px;background:#fff;color:#42566e;font-weight:800}.purchase-module-tabs button.active{background:#eaf4ff;border-color:#8ebfeb;color:#155d9d}.destined-filter{display:grid;grid-template-columns:repeat(5,minmax(150px,1fr));gap:10px;align-items:end;margin-bottom:8px}.destined-filter label{display:flex;flex-direction:column;gap:4px}.destined-search{grid-column:span 2}.destined-filter .fiscal-status-box{grid-column:1/-1}.destined-selected{margin-bottom:8px}.destined-action-groups{display:grid;grid-template-columns:1fr 1.35fr;gap:12px;margin-top:8px}.destined-action-groups>div{padding:10px;border:1px solid #dfe7ef;border-radius:10px;background:#f8fafc}.destined-action-groups b{display:block;margin-bottom:7px;color:#42566e}.destined-action-groups>div>div{display:flex;gap:6px;flex-wrap:wrap}.destined-table td{font-size:11px}.contingency-controls{display:grid;gap:10px;margin-bottom:8px}.contingency-controls>div:first-child{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:8px}.contingency-controls label{display:flex;flex-direction:column;gap:4px}.contingency-actions{display:flex;gap:8px}.contingency-controls textarea{resize:vertical}.contingency-controls .fiscal-status-box{min-height:38px}@media(max-width:950px){.destined-filter{grid-template-columns:1fr 1fr}.destined-search{grid-column:1/-1}.destined-action-groups{grid-template-columns:1fr}.contingency-controls>div:first-child{grid-template-columns:1fr 1fr}}@media(max-width:620px){.destined-filter,.contingency-controls>div:first-child{grid-template-columns:1fr}.destined-search{grid-column:auto}}

/* 0.13.54 - detalhamento de NF-e recebida */
.destined-nfe-shell{max-width:980px}
.dest-nfe-tabs{margin:0 0 14px;flex-wrap:wrap}
.dest-nfe-body{min-height:220px}
.dest-nfe-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.dest-nfe-field{border:1px solid var(--border,#d9e2ec);border-radius:10px;padding:10px;min-width:0}
.dest-nfe-field span{display:block;font-size:12px;color:#64748b;margin-bottom:4px}.dest-nfe-field b{display:block;overflow-wrap:anywhere}
.dest-nfe-xml{max-height:520px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere}
@media(max-width:700px){.dest-nfe-grid{grid-template-columns:1fr}}

/* 0.13.57 — organização de Documentos Destinados */
.destined-facts-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin-top:10px}.dest-fact{border:1px solid #dfe7ef;border-radius:10px;background:#fbfdff;padding:9px 11px;min-width:0}.dest-fact.wide{grid-column:span 2}.dest-fact span{display:block;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.03em;color:#64748b;margin-bottom:4px}.dest-fact strong{display:block;color:#172033;overflow-wrap:anywhere;line-height:1.25}.dest-situation{display:inline-flex;padding:3px 8px;border-radius:999px;font-weight:800;white-space:nowrap}.dest-situation.ok{background:#e1f7e8;color:#18743a}.dest-situation.bad{background:#fde8e8;color:#a12828}.dest-situation.pending{background:#fff3d8;color:#8a5a00}.purchase-xml-dialog.from-sefaz .xml-upload-row{display:none}.purchase-xml-dialog.from-sefaz #purchaseXmlFooterHint{color:#9a5700;font-weight:700}@media(max-width:1100px){.destined-filter{grid-template-columns:repeat(3,minmax(150px,1fr))}.destined-search{grid-column:span 2}.destined-facts-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:700px){.destined-filter,.destined-facts-grid{grid-template-columns:1fr}.destined-search,.dest-fact.wide{grid-column:auto}}


/* 0.13.58 — Documentos Destinados: resumo e modais compactos. */
#purchaseDestinedView .destined-selected{padding:8px 10px!important}
#purchaseDestinedView .destined-selected .nfce-selected-head{margin-bottom:4px!important;gap:6px!important;align-items:center}
#purchaseDestinedView .destined-selected .nfce-eyebrow{font-size:10px!important;line-height:1.05}
#purchaseDestinedView .destined-selected .nfce-selected-head h3{font-size:14px!important;line-height:1.1;margin:0!important}
#purchaseDestinedView .destined-selected .nfce-status{font-size:10px!important;padding:3px 7px!important}
#purchaseDestinedView .destined-facts-grid{gap:4px!important;margin-top:4px!important}
#purchaseDestinedView .dest-fact{padding:4px 7px!important;border-radius:7px!important;min-height:0!important}
#purchaseDestinedView .dest-fact span{font-size:9px!important;margin-bottom:1px!important;line-height:1.05!important}
#purchaseDestinedView .dest-fact strong{font-size:12px!important;line-height:1.12!important}
#purchaseDestinedView .destined-action-groups{gap:6px!important;margin-top:5px!important}
#purchaseDestinedView .destined-action-groups>div{padding:6px 8px!important;border-radius:8px!important}
#purchaseDestinedView .destined-action-groups b{font-size:12px!important;margin-bottom:4px!important}
#purchaseDestinedView .destined-action-groups>div>div{gap:4px!important}
#purchaseDestinedView .destined-action-groups button{min-height:30px!important;padding:4px 9px!important;font-size:11px!important}
#destinedNfeDialog .destined-nfe-shell{width:min(980px,calc(100vw - 28px))!important;max-width:980px!important;padding:12px!important}
#destinedNfeDialog .panel-head{margin-bottom:7px!important}
#destinedNfeDialog .panel-head h3{font-size:17px!important;margin:0 0 2px!important}
#destinedNfeDialog .panel-head p{font-size:11px!important;margin:0!important}
#destinedNfeDialog .purchase-module-tabs{margin-bottom:7px!important;padding-bottom:5px!important;gap:4px!important}
#destinedNfeDialog .purchase-module-tabs button{height:30px!important;padding:0 10px!important;font-size:11px!important}
#destinedNfeDialog .dest-nfe-grid{gap:5px!important}
#destinedNfeDialog .dest-nfe-grid>div{padding:6px 8px!important;min-height:0!important}
#destinedNfeDialog .dest-nfe-grid span{font-size:9px!important;margin-bottom:1px!important}
#destinedNfeDialog .dest-nfe-grid strong{font-size:12px!important;line-height:1.15!important}
#destinedNfeDialog .dialog-actions{margin-top:7px!important}
#destinedPurchaseDialog .actions button.primary{background:#1f6fc2!important;color:#fff!important;border-color:#1f6fc2!important}
#destinedPurchaseDialog .actions button.primary:disabled{opacity:.5!important;cursor:not-allowed!important}

/* 0.1.4 - Usuários: botão Salvar sempre visível e azul */
#userDialog .actions{display:flex!important;justify-content:flex-end!important;gap:12px!important;align-items:center!important}
#userDialog #saveUser{
  display:inline-flex!important;visibility:visible!important;opacity:1!important;
  align-items:center!important;justify-content:center!important;
  min-width:150px!important;min-height:46px!important;
  background:#1672d4!important;color:#fff!important;border:1px solid #1672d4!important;
  border-radius:10px!important;font-weight:800!important;
}
#userDialog #saveUser:hover{background:#0f63bd!important;border-color:#0f63bd!important}
#userDialog #saveUser:disabled{opacity:.65!important;cursor:wait!important}
#userDialog #userDialogCancel{min-height:46px!important}

/* Tema por vendedor — somente bordas */
:root{--user-accent:#1685DF;--user-accent-dark:#0B67B5;--user-accent-light:#39A8FF;--user-accent-soft:#CFE8FF}

/* A cor do vendedor não pinta fundos nem botões: apenas contornos/bordas de identificação. */
body[data-user-theme] .erp-topbar{border-bottom:4px solid var(--user-accent)!important}
body[data-user-theme] .sidebar{border-right:4px solid var(--user-accent)!important}
body[data-user-theme] .erp-statusbar{border-top:4px solid var(--user-accent)!important}
body[data-user-theme] .sidebar .nav.active{box-shadow:inset 4px 0 var(--user-accent)!important}
body[data-user-theme] .avatar{box-shadow:0 0 0 3px var(--user-accent)!important}
body[data-user-theme] .page .primary,
body[data-user-theme] .btn-modern.primary{border-color:var(--user-accent)!important}
body[data-user-theme] .pdv-cashier-top{border-top:7px solid var(--user-accent)!important}
body[data-user-theme] #pdvSeller{border:3px solid var(--user-accent)!important;font-weight:900!important}
body[data-user-theme] .pdv-cashier-status{border-top:5px solid var(--user-accent)!important}
body[data-user-theme] .pdv-command-row button:focus,
body[data-user-theme] .pdv-command-row button:hover,
body[data-user-theme] .pdv-side-actions button:hover,
body[data-user-theme] .pdv-total-box,
body[data-user-theme] .pdv-sale-box{border-color:var(--user-accent)!important}

/* 0.1.18 — Balanço de Estoque */
.balance-shell,.balance-editor{padding:16px}
.balance-head{align-items:flex-start}
.balance-actions{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}
.balance-actions button{min-height:34px;padding:0 12px;border:1px solid #cfdbe8;border-radius:9px;background:#fff;color:#2c4059;font-weight:750;cursor:pointer}
.balance-actions button.primary{background:#1769c2;color:#fff;border-color:#1769c2}
.balance-actions button:disabled{opacity:.5;cursor:not-allowed}
.balance-filters{display:grid;grid-template-columns:260px 210px 1fr;gap:10px;align-items:end;margin:12px 0}
.balance-filters label,.balance-summary-grid label,.balance-entry label{display:flex;flex-direction:column;gap:5px;font-size:12px;font-weight:700;color:#45566e}
.balance-filters select,.balance-summary-grid input,.balance-summary-grid select,.balance-entry input{min-height:36px;border:1px solid #d1dce8;border-radius:8px;padding:6px 9px;background:#fff}
.balance-list-wrap{max-height:550px}
.balance-list-wrap th,.balance-list-wrap td{font-size:11px;white-space:nowrap}
.balance-editor{margin-top:10px}
.balance-summary-grid{display:grid;grid-template-columns:120px 135px 120px minmax(180px,1fr) 160px minmax(180px,1fr);gap:9px;margin:12px 0}
.balance-summary-grid .wide{grid-column:span 2}
.balance-kpis{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0 12px}
.balance-kpis span{display:flex;gap:8px;align-items:center;padding:8px 11px;border:1px solid #dae3ed;border-radius:9px;background:#f8fbfe;color:#52647b}
.balance-kpis b{color:#152a44}
.balance-entry{display:grid;grid-template-columns:minmax(300px,1fr) 150px auto;gap:9px;align-items:end;padding:10px;border:1px solid #dce5ef;border-radius:10px;background:#f8fafc}
.balance-entry button{min-height:36px}
.balance-search-results{display:grid;gap:4px;max-height:180px;overflow:auto;margin:7px 0}
.balance-search-results button{text-align:left;padding:7px 9px;border:1px solid #d8e2ec;border-radius:7px;background:#fff;cursor:pointer}
.balance-items-wrap{max-height:520px;margin-top:8px}
.balance-items-wrap table{min-width:1500px}
.balance-items-wrap th,.balance-items-wrap td{font-size:11px;white-space:nowrap}
.balance-items-wrap .balance-item-qty{width:92px;min-height:30px;border:1px solid #cbd8e6;border-radius:6px;padding:3px 6px}
.balance-diff-pos{color:#16764a;font-weight:800}
.balance-diff-neg{color:#b83232;font-weight:800}
@media(max-width:1100px){.balance-summary-grid{grid-template-columns:repeat(3,1fr)}.balance-summary-grid .wide{grid-column:auto}.balance-filters{grid-template-columns:1fr 1fr}.balance-entry{grid-template-columns:1fr 130px}}
@media(max-width:700px){.balance-summary-grid,.balance-filters,.balance-entry{grid-template-columns:1fr}.balance-actions{justify-content:flex-start}}


/* 0.1.28 — dispositivos autorizados e sessão única */
.pending-badge{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:#dc2626;color:#fff;font-size:11px;font-weight:800;vertical-align:middle}
.user-dialog-security form{width:min(620px,92vw)}
.user-security-box{margin:14px 0 4px;padding:14px;border:1px solid #dbe3ee;border-radius:10px;background:#f8fafc}
.user-security-box legend{padding:0 7px;font-weight:800;color:#174c92}
.user-security-box .check{margin:8px 0 2px}
.user-security-box>small{display:block;margin:0 0 9px 26px;color:#64748b;line-height:1.35}
.user-security-box button{margin-top:8px}
.user-devices-dialog{width:min(1120px,94vw);max-width:1120px;border:0;border-radius:12px;padding:0;overflow:hidden;box-shadow:0 24px 70px rgba(15,23,42,.35)}
.user-devices-dialog::backdrop{background:rgba(15,23,42,.55)}
.user-devices-card{background:#fff}
.user-devices-card>.modal-head{margin:0;padding:18px 22px;background:linear-gradient(90deg,#0878cf,#1266ad);color:#fff}
.user-devices-card>.modal-head h2{margin:0;color:#fff}
.user-devices-card>.modal-head p{margin:4px 0 0;color:#dbeafe}
.user-devices-card>.modal-head button{border:0;background:transparent;color:#fff;font-size:28px}
.device-toolbar{display:flex;align-items:end;gap:10px;padding:14px 20px 8px}
.device-toolbar label{min-width:320px}
.device-toolbar select{width:100%;padding:9px 10px;border:1px solid #cbd5e1;border-radius:8px;background:#fff}
.device-toolbar button{padding:9px 13px}
.user-devices-card>.notice{margin:4px 20px 12px}
.device-table-wrap{margin:0 20px 20px;max-height:58vh;border:1px solid #dbe3ee;border-radius:8px;overflow:auto}
.device-table-wrap table{width:100%;margin:0}
.device-table-wrap th{position:sticky;top:0;background:#eef3f8;z-index:1}
.device-table-wrap td:first-child small{display:block;color:#64748b;margin-top:2px}
.device-status{display:inline-flex;padding:4px 8px;border-radius:999px;font-size:11px;font-weight:800}
.device-status.ok{background:#dcfce7;color:#166534}
.device-status.pending{background:#fef3c7;color:#92400e}
.device-status.blocked{background:#fee2e2;color:#991b1b}
.device-actions{display:flex;gap:6px;flex-wrap:wrap}
.device-actions button{padding:6px 9px;border:1px solid #cbd5e1;border-radius:7px;background:#fff;cursor:pointer}
.device-actions .device-approve{background:#e8f7ee;border-color:#bbf7d0;color:#166534}
.device-actions .device-block{background:#fff7ed;border-color:#fed7aa;color:#9a3412}
.device-actions .device-remove{background:#fef2f2;border-color:#fecaca;color:#991b1b}
@media(max-width:760px){.device-toolbar{align-items:stretch;flex-direction:column}.device-toolbar label{min-width:0;width:100%}.device-table-wrap{overflow:auto}}


/* 0.1.29 — modal moderno de usuário */
#userDialog.user-dialog-security{
  width:min(760px,94vw);
  max-width:760px;
  max-height:94vh;
  border:0;
  border-radius:18px;
  padding:0;
  overflow:hidden;
  background:#f4f7fb;
  box-shadow:0 28px 80px rgba(15,23,42,.38);
}
#userDialog.user-dialog-security::backdrop{background:rgba(15,23,42,.58);backdrop-filter:blur(2px)}
#userDialog .user-modern-form{width:100%!important;max-width:none!important;margin:0;background:#f4f7fb}
#userDialog .user-modern-head{
  display:grid;
  grid-template-columns:46px 1fr auto;
  align-items:center;
  gap:14px;
  padding:17px 20px;
  background:linear-gradient(135deg,#0f6fd2,#2588ed);
  color:#fff;
}
#userDialog .user-modern-title-icon{
  display:grid;place-items:center;width:42px;height:42px;border-radius:50%;
  background:rgba(255,255,255,.14);font-size:22px
}
#userDialog .user-modern-head h2{margin:0;color:#fff;font-size:22px;line-height:1.1}
#userDialog .user-modern-head p{margin:4px 0 0;color:#dbeafe;font-size:13px}
#userDialog .user-modern-head>button{
  border:0;background:transparent;color:#fff;font-size:30px;line-height:1;cursor:pointer;
  width:38px;height:38px;border-radius:9px
}
#userDialog .user-modern-head>button:hover{background:rgba(255,255,255,.12)}
#userDialog .user-modern-body{
  display:grid;gap:12px;
  padding:14px 16px 12px;
  max-height:calc(94vh - 138px);
  overflow:auto;
}
#userDialog .user-modern-card{
  padding:14px 16px;
  border:1px solid #dbe5f0;
  border-radius:14px;
  background:#fff;
  box-shadow:0 2px 8px rgba(15,23,42,.025);
}
#userDialog .user-modern-section-head{display:flex;gap:10px;align-items:flex-start;margin-bottom:12px}
#userDialog .user-modern-section-icon{
  display:grid;place-items:center;flex:0 0 30px;width:30px;height:30px;
  border-radius:9px;background:#e9f3ff;color:#1874d1;font-size:15px
}
#userDialog .user-modern-section-head h3{margin:0;color:#174c92;font-size:16px}
#userDialog .user-modern-section-head p{margin:2px 0 0;color:#6b7c93;font-size:12px}
#userDialog .user-modern-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px 12px}
#userDialog .user-modern-grid .span2{grid-column:span 2}
#userDialog .user-modern-grid label,
#userDialog .user-modern-password{
  display:flex;flex-direction:column;gap:5px;margin:0;color:#172033;font-size:12px;font-weight:750
}
#userDialog .user-modern-grid input,
#userDialog .user-modern-grid select,
#userDialog .user-modern-password input{
  width:100%;box-sizing:border-box;
  min-height:39px;padding:8px 10px;
  border:1px solid #cdd8e5;border-radius:9px;
  background:#fff;color:#172033;outline:none
}
#userDialog .user-modern-grid input:focus,
#userDialog .user-modern-grid select:focus,
#userDialog .user-modern-password input:focus{
  border-color:#2982df;box-shadow:0 0 0 3px rgba(41,130,223,.12)
}
#userDialog .user-modern-grid label>small{font-weight:500;color:#718096;font-size:11px}
#userDialog .modern-switch-row{
  display:grid;grid-template-columns:46px 1fr;gap:10px;align-items:start;
  margin:12px 0 0;cursor:pointer
}
#userDialog .modern-switch-row>span:last-child{display:block}
#userDialog .modern-switch-row b{display:block;color:#172033;font-size:13px}
#userDialog .modern-switch-row small{display:block;color:#6b7c93;font-size:11px;line-height:1.35;margin-top:2px}
#userDialog .modern-switch{position:relative;width:44px;height:24px;display:inline-block;margin-top:1px}
#userDialog .modern-switch input{position:absolute;opacity:0;pointer-events:none}
#userDialog .modern-switch i{
  position:absolute;inset:0;border-radius:999px;background:#b9c6d8;transition:.18s ease;
  box-shadow:inset 0 0 0 1px rgba(15,23,42,.06)
}
#userDialog .modern-switch i:after{
  content:"";position:absolute;width:18px;height:18px;left:3px;top:3px;border-radius:50%;
  background:#fff;box-shadow:0 1px 4px rgba(15,23,42,.25);transition:.18s ease
}
#userDialog .modern-switch input:checked+i{background:#1677e8}
#userDialog .modern-switch input:checked+i:after{transform:translateX(20px)}
#userDialog .modern-switch input:focus-visible+i{outline:3px solid rgba(22,119,232,.22);outline-offset:2px}
#userDialog .user-manage-devices{
  width:100%;display:flex;align-items:center;gap:9px;justify-content:flex-start;
  margin-top:12px;padding:10px 12px;border:1px solid #cfdbea;border-radius:9px;
  background:#f9fbfd;color:#1f3b5d;font-weight:750;cursor:pointer
}
#userDialog .user-manage-devices b{margin-left:auto;font-size:20px;color:#66819e}
#userDialog .user-manage-devices:hover{background:#eef6ff;border-color:#9fc7f1}
#userDialog .user-modern-actions{
  display:flex;justify-content:flex-end;gap:10px;
  padding:12px 16px 14px;border-top:1px solid #dce5ef;background:#fff
}
#userDialog .user-modern-actions button{
  min-height:42px;padding:0 18px;border-radius:10px;border:1px solid #cfd9e5;
  background:#fff;color:#172033;font-weight:800;cursor:pointer
}
#userDialog .user-modern-actions #saveUser{
  min-width:170px!important;min-height:42px!important;
  background:#176fe0!important;border-color:#176fe0!important;color:#fff!important;
  box-shadow:0 4px 12px rgba(23,111,224,.2)
}
#userDialog .user-modern-actions #saveUser:hover{background:#0f61cb!important;border-color:#0f61cb!important}
#userDialog .user-modern-actions #saveUser:disabled{opacity:.6!important}
@media(max-width:640px){
  #userDialog.user-dialog-security{width:96vw;max-height:96vh}
  #userDialog .user-modern-grid{grid-template-columns:1fr}
  #userDialog .user-modern-grid .span2{grid-column:auto}
  #userDialog .user-modern-head{grid-template-columns:40px 1fr auto;padding:14px}
  #userDialog .user-modern-body{padding:10px;max-height:calc(96vh - 130px)}
  #userDialog .user-modern-card{padding:12px}
  #userDialog .user-modern-actions{padding:10px;position:sticky;bottom:0}
}

/* 0.1.75 — pagamentos compactos para caixa rápido */
.pdv-payments-list{display:flex!important;flex-wrap:wrap;gap:6px;align-items:center;min-height:32px;margin-top:5px;padding:2px 0;overflow:visible!important}
.pdv-payment-line{display:inline-flex;align-items:center;gap:7px;height:30px;padding:0 8px;border:1px solid #cbd7e4;border-radius:7px;background:#fff;color:#203247;font-size:11px;line-height:1;white-space:nowrap}
.pdv-payment-line.voucher{border-color:#7c3aed;background:#f8f5ff}
.pdv-payment-line strong{font-size:12px}
.pdv-payment-line button{border:0;background:transparent;color:#c62828;font-size:16px;font-weight:800;cursor:pointer;padding:0 1px;line-height:1}
.pdv-payment-panel{overflow:visible!important}
@media(max-width:900px){.pdv-payments-list{max-height:70px;overflow:auto!important}}


/* Consulta de preço no menu Início — layout compacto inspirado no sistema antigo */
.dashboard-price-wrap{display:flex;justify-content:center;margin-top:18px}
.dashboard-price-panel.old-price-layout{width:min(760px,100%);border:1px solid #b8c8d8;background:#fff;border-radius:5px;box-shadow:0 1px 2px #0001;padding:0;overflow:visible}
.dashboard-price-title{font-size:22px;font-weight:700;color:#20344b;padding:10px 14px;border-bottom:1px solid #aebdca;background:linear-gradient(#fff,#f3f6f9)}
.old-price-body{padding:14px 16px 16px}
.old-price-body label{margin:0;font-size:16px;font-weight:700;color:#111}
.old-price-search-row{display:grid;grid-template-columns:minmax(0,1fr) 118px 118px;gap:12px;align-items:center;margin-top:5px}
.old-price-search-row input{height:42px;font-size:20px;padding:6px 10px;border:1px solid #aebdca;border-radius:2px;background:#fff}
.old-price-search-row button{height:42px;border:1px solid #aebdca;border-radius:3px;background:linear-gradient(#fff,#e9eef3);font-size:16px;cursor:pointer;color:#17283a}
.old-price-search-row button:hover{background:#e6f0f9}
.dashboard-price-product{display:block;margin-top:14px!important}
.dashboard-price-product input{height:42px;font-size:20px;font-weight:500;padding:6px 10px;border:1px solid #aebdca;border-radius:2px;background:#f8fafc}
.dashboard-price-values{display:grid;grid-template-columns:1fr 1fr 1fr;gap:12px;margin-top:14px}
.dashboard-price-values input{height:42px;font-size:20px;font-weight:700;padding:6px 10px;border:1px solid #aebdca;border-radius:2px;background:#f8fafc}
.old-price-table input{text-align:right}
.dashboard-price-status{display:block;min-height:18px;margin-top:8px;font-size:12px;font-weight:700}
.dashboard-price-status[data-state="active"]{color:#15803d}
.dashboard-price-status[data-state="inactive"]{color:#b45309}
.dashboard-price-status[data-state="none"]{color:#64748b}
.dashboard-price-results{position:relative;z-index:15;margin-top:8px;border:1px solid #b9c8d5;background:#fff;max-height:240px;overflow:auto}
.dashboard-price-results button{width:100%;display:grid;grid-template-columns:minmax(0,1fr) 150px 100px;gap:10px;align-items:center;padding:9px 10px;border:0;border-bottom:1px solid #edf1f5;background:#fff;text-align:left;cursor:pointer}
.dashboard-price-results button:hover{background:#edf6ff}
.dashboard-price-results button:last-child{border-bottom:0}
.dashboard-price-results b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dashboard-price-results span{font-size:12px;color:#64748b}
.dashboard-price-results strong{text-align:right}
@media(max-width:900px){
  .dashboard-price-wrap{justify-content:stretch}
  .old-price-search-row{grid-template-columns:1fr 92px 92px}
  .dashboard-price-values{grid-template-columns:1fr}
  .old-price-table input{text-align:left}
  .dashboard-price-results button{grid-template-columns:1fr}
  .dashboard-price-results strong{text-align:left}
}

/* 0.1.86 — Consulta de preço como tela própria do menu */
#consulta-preco .dashboard-price-wrap{margin-top:8px;justify-content:flex-start}
#consulta-preco .dashboard-price-panel.old-price-layout{width:min(760px,100%)}

/* 0.1.89 — Consulta de preço ampliada com imagem */
#consulta-preco .dashboard-price-wrap{justify-content:flex-start}
#consulta-preco .price-screen-large{width:min(1180px,100%)!important}
#consulta-preco .old-price-body{padding:20px 22px 24px}
#consulta-preco .old-price-search-row{grid-template-columns:minmax(0,1fr) 145px 145px}
#consulta-preco .old-price-search-row input{height:48px;font-size:22px}
#consulta-preco .old-price-search-row button{height:48px;font-size:18px;font-weight:800}
#consulta-preco .price-product-row{display:grid;grid-template-columns:minmax(0,1fr) 220px;gap:18px;align-items:start;margin-top:18px}
#consulta-preco .dashboard-price-product{margin-top:0!important}
#consulta-preco .dashboard-price-product input{height:50px;font-size:20px}
#consulta-preco .price-product-image-box{display:flex;justify-content:flex-end}
#consulta-preco .price-product-image{width:220px;height:220px;border:1px solid #aebdca;border-radius:5px;background:#fff;display:flex;align-items:center;justify-content:center;overflow:hidden}
#consulta-preco .price-product-image img{display:none;width:100%;height:100%;object-fit:contain}
#consulta-preco .price-product-image span{color:#7b8794;font-size:14px;font-weight:700}
#consulta-preco .dashboard-price-values{grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin-top:18px}
#consulta-preco .dashboard-price-values input{height:50px;font-size:22px}
@media(max-width:950px){
 #consulta-preco .old-price-search-row{grid-template-columns:1fr 120px 120px}
 #consulta-preco .price-product-row{grid-template-columns:1fr}
 #consulta-preco .price-product-image-box{justify-content:flex-start}
 #consulta-preco .price-product-image{width:180px;height:180px}
 #consulta-preco .dashboard-price-values{grid-template-columns:1fr}
}

/* 0.1.90 — Histórico e rastreabilidade de devoluções */
.pdv-return-history-dialog{width:min(1420px,calc(100vw - 32px));max-width:1420px;padding:0;border:0;border-radius:12px}
.pdv-return-history-shell{display:flex;flex-direction:column;max-height:92vh;background:#fff}
.pdv-return-history-shell>header{display:flex;justify-content:space-between;align-items:center;padding:18px 20px;border-bottom:1px solid #d6e0e8}
.pdv-return-history-shell>header h2,.pdv-return-history-shell>header small{margin:0;display:block}
.pdv-return-history-shell>header button{border:0;background:transparent;font-size:28px;cursor:pointer}
.pdv-return-history-search{display:grid;grid-template-columns:1fr auto;gap:10px;padding:14px 20px;border-bottom:1px solid #e4eaf0}
.pdv-return-history-search input{height:42px}
.pdv-return-history-grid{display:grid;grid-template-columns:minmax(620px,1.15fr) minmax(520px,1fr);gap:14px;padding:14px 20px;min-height:520px;overflow:hidden}
.pdv-return-history-list,.pdv-return-history-detail .table-wrap{max-height:60vh;overflow:auto}
.pdv-return-history-list tr{cursor:pointer}
.pdv-return-history-list tr.selected{outline:2px solid #2563eb;outline-offset:-2px;background:#eff6ff}
.pdv-return-history-detail{border:1px solid #d7e1ea;border-radius:9px;overflow:hidden;background:#fff}
.pdv-return-history-meta{padding:14px 16px;background:#f7fafc;border-bottom:1px solid #d7e1ea;line-height:1.55}
.pdv-return-history-shell>footer{display:flex;justify-content:space-between;align-items:center;padding:12px 20px;border-top:1px solid #d7e1ea}
@media(max-width:1050px){.pdv-return-history-grid{grid-template-columns:1fr;overflow:auto}.pdv-return-history-list,.pdv-return-history-detail .table-wrap{max-height:36vh}}

/* 0.1.91 — Devoluções na ficha do produto */
#productSalesRowsInline tr.product-return-row{background:#fff5f5}
#productSalesRowsInline tr.product-return-row td{color:#991b1b}
#productSalesRowsInline tr.product-return-row td:nth-child(4) b{display:inline-block;padding:3px 8px;border-radius:999px;background:#fee2e2;color:#991b1b;font-size:11px}

/* 0.1.93 — Histórico de devoluções como relatório, sem backdrop/modal */
#returnHistoryReportView .return-history-filter{grid-template-columns:minmax(420px,1fr);max-width:100%}
.return-history-report-grid{display:grid;grid-template-columns:minmax(620px,1.15fr) minmax(520px,1fr);gap:12px;align-items:start}
#returnHistoryReportView .pdv-return-history-list{max-height:620px;overflow:auto;margin:0}
#returnHistoryReportView .pdv-return-history-detail{overflow:hidden;margin:0;padding:0}
#returnHistoryReportView .pdv-return-history-detail .report-table-wrap{max-height:520px;margin:0}
#returnHistoryReportView .pdv-return-history-list tr{cursor:pointer}
#returnHistoryReportView .pdv-return-history-list tr.selected{outline:2px solid #2563eb;outline-offset:-2px;background:#eff6ff}
#returnHistoryReportView .pdv-return-history-meta{padding:12px 14px;background:#f7fafc;border-bottom:1px solid #d7e1ea;line-height:1.5}
@media(max-width:1150px){.return-history-report-grid{grid-template-columns:1fr}}

/* 0.1.113 — consulta de preço / filial atual */
#homePriceBackPdv{min-width:120px}.dashboard-price-values{grid-template-columns:repeat(4,minmax(0,1fr))}@media(max-width:1100px){.dashboard-price-values{grid-template-columns:repeat(2,minmax(0,1fr))}}
