.compras-page{padding:2rem}.page-subtitle{color:#6b7280;margin-top:4px}.aduana-ops-card{display:flex;flex-direction:column;gap:14px;border:1px solid #d9e6e1;background:linear-gradient(180deg,#fff,#f7fbf9)}.aduana-ops-card h2{margin:0}.aduana-ops-card p{margin:6px 0 0;color:var(--color-text-muted)}.aduana-ops-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.aduana-ops-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(180px,100%),1fr));gap:12px}.aduana-metrics-inline{display:flex;flex-wrap:wrap;gap:10px;font-size:.88rem;color:#294741;background:#eef6f3;border:1px solid #d3e6de;border-radius:10px;padding:10px 12px}.aduana-actions-row{display:flex;flex-wrap:wrap;gap:10px}.pedidos-table-container{background:#fff;border-radius:var(--radius-sm);box-shadow:0 1px 3px #0000001a;overflow-x:auto}.pedidos-table{width:100%;border-collapse:collapse}.pedidos-table thead{background:#f5f5f5;border-bottom:2px solid #e0e0e0}.pedidos-table th{padding:1rem;text-align:left;font-weight:600;font-size:.9rem;color:#555;text-transform:uppercase;letter-spacing:.5px}.pedidos-table tbody tr{border-bottom:1px solid #f0f0f0;cursor:pointer;transition:background .2s}@media (hover: hover){.pedidos-table tbody tr:hover{background:#f9f9f9}}.pedidos-table td{padding:1rem;font-size:.95rem;color:#333;vertical-align:middle}@media (max-width: 768px){.compras-page{padding:1rem}.aduana-ops-head{flex-direction:column;align-items:stretch}.aduana-ops-grid{grid-template-columns:1fr}.pedidos-table thead{display:none}.pedidos-table tbody,.pedidos-table tr,.pedidos-table td{display:block;width:100%}.pedidos-table tbody tr{background:#fff;border:1px solid #e5e7eb;border-radius:var(--radius-md);padding:16px;box-shadow:0 8px 18px #0f172a14;margin-bottom:14px}.pedidos-table td{padding:6px 0;border-bottom:1px dashed #e5e7eb;display:flex;justify-content:space-between;gap:12px;font-size:15px}.pedidos-table td:last-child{border-bottom:none}.product-cell{align-items:center;min-width:0;max-width:100%}}@media (max-width: 480px){.compras-page{padding:.75rem}.pedidos-table td{font-size:14px}}.company-cell{font-weight:600;color:#111827;white-space:normal;overflow-wrap:anywhere}.product-cell{display:flex;align-items:center;gap:.75rem;min-width:0;max-width:360px}.product-thumb{width:36px;height:36px;border-radius:var(--radius-sm);object-fit:cover;border:1px solid #e5e7eb;background:#f9fafb;flex-shrink:0}.product-thumb.placeholder{background:#f3f4f6}.product-name{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;flex:1;min-width:0;max-width:280px;word-break:break-word;overflow-wrap:anywhere;font-size:.9rem;color:#374151}.status-badge{padding:.3rem .8rem;border-radius:var(--radius-lg);font-size:.85rem;font-weight:600;text-transform:uppercase;letter-spacing:.5px}.status-green{background:#d4f4dd;color:#0d7a3d}.status-orange{background:#ffe8cc;color:#c60}.status-blue{background:#cce5ff;color:#06c}.status-red{background:#ffd6d6;color:#c00}.status-teal{background:#ccf2f2;color:teal}.status-purple{background:#ede9fe;color:#6d28d9}.status-indigo{background:#e0e7ff;color:#3730a3}.status-amber{background:#fef3c7;color:#92400e}.status-cyan{background:#cffafe;color:#0e7490}.status-gray{background:#e0e0e0;color:#666}.marketplace-cell{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.actions{display:flex;gap:8px;flex-wrap:wrap}.compras-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px}.compras-form label{display:flex;flex-direction:column;gap:6px;font-size:.9rem}.compras-form input{padding:8px 10px;border:1px solid #d5d9e0;border-radius:var(--radius-sm);font-size:.95rem}.compras-status{margin-top:12px;color:#2563eb;font-weight:600}.confirm-modal{max-width:420px}.confirm-actions{display:flex;justify-content:flex-end;gap:12px;margin-top:16px}.button.danger{background:#dc2626;color:#fff;border:none}

/* Dispatch barcode station */
.dispatch-page{padding:18px 24px 28px}.dispatch-hero{display:flex;align-items:center;justify-content:space-between;gap:16px;background:linear-gradient(135deg,#fff,#f6f9ff);border:1px solid #dce7f5;border-radius:18px;padding:18px 20px;margin-bottom:14px;box-shadow:0 10px 28px rgba(15,23,42,.06)}.dispatch-hero h1{margin:0;font-size:24px}.dispatch-hero p{margin:4px 0 0;color:#64748b}.dispatch-workstation{display:grid;grid-template-columns:1.25fr .9fr .9fr .95fr;gap:14px;background:#fff;border:1px solid #dce7f5;border-radius:18px;padding:14px;margin-bottom:16px;box-shadow:0 8px 24px rgba(15,23,42,.05)}.dispatch-step{display:flex;gap:12px;align-items:flex-start;border-right:1px solid #edf2f7;min-width:0}.dispatch-step:last-child,.dispatch-flow{border-right:none}.dispatch-step h3,.dispatch-flow h3{margin:0 0 4px;font-size:13px;text-transform:uppercase;letter-spacing:.04em;color:#111827}.dispatch-step p,.dispatch-flow p{margin:0 0 8px;color:#64748b;font-size:12px}.dispatch-step-number{width:26px;height:26px;border-radius:999px;background:#eef2ff;color:#4f46e5;display:inline-flex;align-items:center;justify-content:center;font-weight:800;flex:0 0 auto}.dispatch-scan-input,.dispatch-confirm-box input{width:100%;height:48px;border:2px solid #7c3aed;border-radius:10px;padding:0 14px;font-size:15px;outline:none;background:#fff}.dispatch-scan-input:focus,.dispatch-confirm-box input:focus{box-shadow:0 0 0 4px rgba(124,58,237,.12)}.dispatch-printer{width:58px;height:58px;border-radius:12px;background:#f3e8ff;display:flex;align-items:center;justify-content:center;font-size:30px;color:#6d28d9}.dispatch-flow{background:#f8fbff;border:1px solid #dbeafe;border-radius:12px;padding:10px 12px}.dispatch-flow p{color:#1d4ed8;font-weight:600}.dispatch-alert{border-radius:12px;padding:12px 14px;margin:0 0 14px;font-weight:700}.dispatch-alert.info{background:#eff6ff;color:#1d4ed8;border:1px solid #bfdbfe}.dispatch-alert.success{background:#ecfdf5;color:#047857;border:1px solid #bbf7d0}.dispatch-alert.error{background:#fef2f2;color:#b91c1c;border:1px solid #fecaca}.dispatch-layout{display:grid;grid-template-columns:minmax(460px,1fr) minmax(440px,.95fr);gap:16px;align-items:start}.dispatch-panel{background:#fff;border:1px solid #dce7f5;border-radius:16px;box-shadow:0 10px 28px rgba(15,23,42,.06);overflow:hidden}.dispatch-panel-head,.dispatch-selected-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;border-bottom:1px solid #e5edf6}.dispatch-panel h2,.dispatch-selected h2{margin:0;font-size:17px}.link-button,.dispatch-close{border:none;background:transparent;color:#2563eb;cursor:pointer;font-weight:800}.dispatch-close{font-size:26px;color:#64748b}.dispatch-queue{display:flex;flex-direction:column;max-height:610px;overflow:auto}.dispatch-queue-row{display:grid;grid-template-columns:34px minmax(280px,1fr) 100px 170px 132px;gap:12px;align-items:center;width:100%;border:0;border-bottom:1px solid #eef2f7;background:#fff;padding:12px 14px;text-align:left;cursor:pointer}.dispatch-queue-row.active{outline:2px solid #7c3aed;outline-offset:-2px;background:#fbf7ff}.dispatch-index{width:24px;height:24px;border-radius:7px;background:#ede9fe;color:#6d28d9;display:flex;align-items:center;justify-content:center;font-weight:800}.dispatch-product-cell{display:flex;align-items:center;gap:12px;min-width:0}.dispatch-thumb{width:46px;height:46px;border-radius:10px;object-fit:contain;background:#fff;border:1px solid #dbe3ef;flex:0 0 auto}.dispatch-thumb.placeholder{background:#f1f5f9}.dispatch-product-cell strong{display:block;max-width:100%;overflow:hidden;color:#0f172a;font-size:13px;line-height:1.25;text-overflow:ellipsis;white-space:nowrap}.dispatch-product-meta{margin-top:3px;font-weight:700}.dispatch-product-cell small,.dispatch-client small,.dispatch-product-cell em{display:block;color:#64748b;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:360px}.dispatch-product-cell em{font-style:normal;color:#64748b}.dispatch-client strong{display:block;color:#0f172a;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dispatch-status{justify-self:start;background:#dbeafe;color:#1d4ed8;border-radius:999px;padding:6px 10px;font-size:11px;font-weight:800;text-transform:uppercase}.dispatch-doc-status{display:flex;flex-direction:column;gap:6px;min-width:0}.dispatch-doc-pill{display:inline-flex;align-items:center;justify-content:center;width:fit-content;max-width:100%;padding:5px 9px;border-radius:999px;font-size:11px;font-weight:800;line-height:1;white-space:nowrap}.dispatch-doc-pill.ok{border:1px solid #86efac;background:#dcfce7;color:#166534}.dispatch-doc-pill.pending{border:1px solid #fed7aa;background:#fff7ed;color:#c2410c}.dispatch-action{display:flex;flex-direction:column;gap:6px;justify-self:start;background:#f3e8ff;color:#6d28d9;border-radius:10px;padding:7px 10px;font-size:12px;font-weight:800;text-align:center}.dispatch-action small{display:block;font-size:11px}.dispatch-regress-button{border:1px solid #bfdbfe;border-radius:8px;background:#fff;color:#1d4ed8;cursor:pointer;font-size:11px;font-weight:800;line-height:1;padding:7px 8px;white-space:nowrap}.dispatch-regress-button:disabled{cursor:not-allowed;opacity:.6}.dispatch-empty{min-height:280px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:30px;color:#64748b}.dispatch-selected{padding-bottom:14px}.dispatch-selected>.dispatch-alert{margin:14px 16px}.dispatch-pill{display:inline-flex;margin-top:6px;border-radius:999px;background:#ede9fe;color:#6d28d9;padding:5px 9px;font-size:12px;font-weight:800}.dispatch-selected-grid{display:grid;grid-template-columns:1fr 1.3fr;gap:12px;padding:0 16px 14px}.dispatch-info-card,.dispatch-doc-card{border:1px solid #e5edf6;border-radius:12px;padding:12px;background:#fff}.dispatch-info-card h3,.dispatch-doc-card h3{margin:0 0 10px;font-size:13px}.dispatch-info-card p{margin:7px 0;color:#334155;font-size:13px}.dispatch-doc-buttons{display:grid;grid-template-columns:1fr 1fr;gap:8px}.dispatch-doc-buttons .button{text-align:center;justify-content:center}.dispatch-label-preview{margin-top:12px;border:1px solid #d6d3d1;border-radius:8px;padding:14px;background:#fafafa;text-align:center;min-height:110px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px}.dispatch-label-preview strong{font-size:22px}.dispatch-label-preview span{font-family:monospace;font-size:18px;letter-spacing:.05em}.dispatch-confirm-box{margin:0 16px;padding:14px;border:1px solid #bbf7d0;background:#f0fdf4;border-radius:12px;display:grid;grid-template-columns:1fr auto;gap:12px;align-items:end}.dispatch-confirm-box label{font-weight:800;color:#047857}.button.success{background:#10b981;color:#fff;border:none}.dispatch-muted{padding:24px;text-align:center;color:#64748b}.dispatch-shortcuts{margin-top:14px;background:#fff;border:1px solid #e5edf6;border-radius:12px;padding:10px 14px;color:#64748b}.dispatch-shortcuts b{display:inline-flex;padding:3px 8px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:7px;color:#334155;margin:0 5px}@media(max-width:1180px){.dispatch-workstation{grid-template-columns:1fr 1fr}.dispatch-layout{grid-template-columns:1fr}.dispatch-queue-row{grid-template-columns:34px minmax(260px,1fr) 160px 86px 110px}}@media(max-width:760px){.dispatch-page{padding:12px}.dispatch-hero{align-items:flex-start;flex-direction:column}.dispatch-workstation{grid-template-columns:1fr}.dispatch-step{border-right:0;border-bottom:1px solid #edf2f7;padding-bottom:10px}.dispatch-queue-row{grid-template-columns:28px 1fr;gap:8px}.dispatch-status,.dispatch-doc-status,.dispatch-action{grid-column:2}.dispatch-selected-grid,.dispatch-confirm-box{grid-template-columns:1fr}.dispatch-doc-buttons{grid-template-columns:1fr}}

/* RESTORED_ORDER_FLOW_STAGE_CSS_20260626 */
/* src/pages/Pedidos.css */
.pedidos-container{padding:2rem;width:100%;max-width:100%;margin:0}.pedidos-header{display:flex;margin-bottom:1rem;gap:.75rem}.pedidos-topbar{width:100%;display:flex;flex-direction:column;align-items:stretch;gap:12px;flex-wrap:nowrap}.sales-indicators{display:grid;order:2;width:100%;grid-template-columns:repeat(5,minmax(0,1fr));align-items:stretch;gap:8px;padding:8px;border-radius:var(--radius-sm);background:linear-gradient(180deg,#f8fafc,#eef2f7);border:1px solid #dbe3ee;font-size:.75rem;flex:0 0 auto}.sales-indicator{display:grid;grid-template-rows:auto 1fr auto;align-content:center;line-height:1.2;min-width:0;border:1px solid #e5e7eb;border-radius:10px;background:#fff;padding:8px 10px;min-height:78px;box-shadow:0 2px 8px #0f172a0d}.sales-indicator-total{border-color:#bfdbfe;background:#eff6ff}.sales-label{font-size:.64rem;color:#64748b;text-transform:uppercase;letter-spacing:.5px;font-weight:700}.sales-value{margin-top:3px;font-size:1.06rem;color:#0f172a;font-weight:800;letter-spacing:-.2px}.sales-indicator-total .sales-value{color:#1d4ed8;font-size:1.14rem}.sales-indicator-ml .sales-value{color:#0369a1}.sales-indicator-full .sales-value{color:#0f766e}.sales-indicator-py .sales-value{color:#1e293b}.sales-date{font-size:.72rem;color:#475569;margin-top:4px;font-weight:600}.pedidos-filters-bar{display:none}.pedidos-inline-controls{order:1;width:100%;display:flex;gap:.35rem;align-items:center;justify-content:flex-start;flex:0 0 auto;flex-wrap:nowrap;overflow:hidden;background:#fff;border:1px solid #e5e7eb;border-radius:10px;padding:6px}.pedidos-inline-controls .global-search{flex:1 1 360px;min-width:280px;max-width:none}.pedidos-inline-controls .filter-select{flex:0 1 126px;min-width:96px}.pedidos-inline-controls .refresh-button{flex:0 1 auto;white-space:nowrap}.search-summary{margin-top:.4rem;font-size:.85rem;color:#4b5563;background:#f9fafb;border:1px solid #e5e7eb;padding:.35rem .6rem;border-radius:var(--radius-sm);display:inline-block}.logistics-summary{display:flex;flex-wrap:wrap;gap:1rem;align-items:center;padding:.6rem .9rem;margin-bottom:.9rem;border-radius:var(--radius-sm);border:1px solid #e5e7eb;background:#f9fafb;color:#111827;font-size:.9rem}.search-input{padding:.5rem .8rem;border:1px solid #ddd;border-radius:var(--radius-sm);font-size:14px;min-width:0;flex:1 1 180px;background:#fff;min-height:38px}.search-input:focus{outline:none;border-color:#06f}.filter-select{padding:.42rem .5rem;border:1px solid #ddd;border-radius:var(--radius-sm);font-size:12px;background:#fff;cursor:pointer;min-height:34px}.filter-select:focus{outline:none;border-color:#06f}.refresh-button{padding:.42rem .52rem;background:#06f;color:#fff;border:none;border-radius:var(--radius-sm);cursor:pointer;font-size:12px;min-height:34px;font-weight:700;letter-spacing:0;transition:background .2s}.refresh-button:active{background:#0047b3}.aduana-action-panel{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-bottom:12px;padding:10px 12px;border:1px solid #e5e7eb;border-radius:var(--radius-sm);background:#fff}.aduana-action-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.aduana-action-head strong{color:#1f2937;margin-right:4px}.aduana-action-head label{font-size:13px;color:#4b5563}.aduana-company-select{min-height:34px;border:1px solid #d5d9e0;border-radius:var(--radius-sm);padding:.35rem .5rem;min-width:220px;background:#fff}.aduana-action-buttons{display:flex;flex-wrap:wrap;gap:8px}.aduana-action-status{width:100%;margin:0;font-size:13px;color:#047857}.aduana-action-status.error{color:#b42318}@media (hover: hover){.refresh-button:hover{background:#0052cc}}@media (max-width: 768px){.aduana-action-panel{padding:10px}.aduana-action-head{width:100%}.aduana-company-select{width:100%;min-width:0}.aduana-action-buttons{width:100%}}.primary-button.ghost{background:#e5e7eb;color:#111827}.primary-button.selected{background:#0f766e;border-color:#0f766e;color:#fff}.loading{text-align:center;padding:4rem;font-size:1.2rem;color:#666}.empty-state{text-align:center;padding:4rem;background:#f9f9f9;border-radius:var(--radius-sm);border:1px dashed #ddd}.empty-state p{font-size:1.2rem;color:#666;margin-bottom:.5rem}.empty-state small{color:#999}.pedidos-table-container{background:#fff;border-radius:var(--radius-sm);box-shadow:0 1px 3px #0000001a;overflow:hidden}.pedidos-table-container{overflow-x:auto}.pedidos-pagination{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.75rem 1rem 1rem;border-top:1px solid #f0f0f0;background:#fafafa}.pagination-button{padding:.6rem 1rem;border-radius:var(--radius-sm);border:1px solid #d1d5db;background:#fff;cursor:pointer;font-size:14px;color:#111827;min-height:44px}.pagination-button:active:not(:disabled){background:#f3f4f6}.pagination-button:disabled{cursor:not-allowed;opacity:.6}.pagination-info{font-size:.85rem;color:#6b7280}.pedidos-table{width:100%;border-collapse:collapse}.pedidos-table thead{background:#f5f5f5;border-bottom:2px solid #e0e0e0}.pedidos-table th{padding:1rem;text-align:left;font-weight:600;font-size:.9rem;color:#555;text-transform:uppercase;letter-spacing:.5px}.pedidos-table tbody tr{border-bottom:1px solid #f0f0f0;cursor:pointer;transition:background .2s}@media (hover: hover){.pedidos-table tbody tr:hover{background:#f9f9f9}}.pedidos-table td{padding:1rem;font-size:.95rem;color:#333;vertical-align:middle}.flow-edit-cell{min-width:180px}.source-field{min-width:220px}.flow-input-shell{display:flex;flex-direction:column;gap:6px;background:#f8fafc;border:1px solid #dbe5f0;border-radius:10px;padding:8px 10px;transition:border-color .2s ease,box-shadow .2s ease,background .2s ease}.flow-input-shell:focus-within{background:#fff;border-color:#2563eb;box-shadow:0 0 0 3px #2563eb1f}.flow-input-shell.is-saving{border-color:#0ea5e9;box-shadow:0 0 0 3px #0ea5e91f}.flow-input-label{display:inline-flex;align-items:center;gap:6px;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.35px;color:#5b6b82}.flow-input-shell.is-saving .flow-input-label:after{content:"Salvando...";font-weight:600;text-transform:none;letter-spacing:0;color:#0284c7;margin-left:auto}.flow-input{width:100%;min-height:34px;padding:0;border:0;background:transparent;color:#111827;font-size:.93rem;outline:none}.flow-input::placeholder{color:#94a3b8}.flow-input-currency{font-variant-numeric:tabular-nums}@media (max-width: 768px){.pedidos-container{padding:1rem;flex:1;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch}.pedidos-table thead{display:none}.pedidos-table tbody,.pedidos-table tr,.pedidos-table td{display:block;width:100%}.pedidos-table tbody tr{background:#fff;border:1px solid #e5e7eb;border-radius:var(--radius-md);padding:16px;box-shadow:0 8px 18px #0f172a14;margin-bottom:14px}.pedidos-table td{padding:8px 0;border-bottom:1px dashed #e5e7eb;display:block;font-size:15px}.pedidos-table td:before{content:attr(data-label);display:block;margin-bottom:4px;font-size:12px;font-weight:700;color:#64748b;text-transform:uppercase;letter-spacing:.4px}.pedidos-table td:last-child{border-bottom:none}.product-cell{display:flex;gap:10px;align-items:center;min-width:0;max-width:100%}.status-cell{align-items:flex-start;justify-content:flex-start;text-align:left}.marketplace-cell{justify-content:flex-start}.flow-edit-cell,.source-field{min-width:0}.flow-input-shell{padding:8px}}.company-cell{font-weight:600;color:#111827;white-space:nowrap}.product-cell{display:flex;align-items:center;gap:.75rem;min-width:0;max-width:360px}.product-thumb{width:36px;height:36px;border-radius:var(--radius-sm);object-fit:cover;border:1px solid #e5e7eb;background:#f9fafb;flex-shrink:0}.product-thumb.placeholder{background:#f3f4f6}.product-name{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;flex:1;min-width:0;max-width:280px;word-break:break-word;overflow-wrap:anywhere;font-size:.9rem;color:#374151}.customer-cell{white-space:normal;word-break:break-word;overflow-wrap:anywhere}@media (max-width: 1024px){.pedidos-container{padding:1.5rem}.pedidos-header{flex-direction:column;align-items:flex-start}}@media (max-width: 768px){.pedidos-container{padding:1rem}.pedidos-table-container{overflow-x:hidden}.pedidos-topbar{flex-direction:column;align-items:stretch}.sales-indicators{grid-template-columns:repeat(2,minmax(0,1fr));padding:10px}.pedidos-inline-controls{flex-direction:column;align-items:stretch}.search-input,.filter-select,.refresh-button{width:100%}.pedidos-table th,.pedidos-table td{padding:.5rem 0;font-size:.85rem}.product-name{display:block;-webkit-line-clamp:unset;-webkit-box-orient:initial;max-width:none;white-space:normal;word-break:break-word;overflow-wrap:anywhere}}@media (max-width: 480px){.pedidos-container{padding:.75rem}.sales-indicators{grid-template-columns:1fr}.sales-indicator{min-height:94px}.pagination-button{width:100%}}.code-cell{font-family:Courier New,monospace;font-weight:600;color:#06f}.sku-qty-cell{min-width:132px}.sku-qty-lines{display:flex;flex-direction:column;gap:2px;font-size:.86rem;color:#374151}.sku-qty-lines span{white-space:nowrap}.sku-line,.qty-line{display:inline-flex;align-items:center;gap:6px}.ml-badge{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:18px;padding:0 6px;border-radius:var(--radius-full);border:1px solid #c9ab00;background:#ffe600;color:#1f2937;font-size:.66rem;font-weight:800;letter-spacing:.4px;line-height:1}.qty-line .status-badge{margin-left:2px;padding:.12rem .45rem;font-size:.68rem}.value-cell{font-weight:600;color:#00a86b}.status-badge{padding:.3rem .8rem;border-radius:var(--radius-lg);font-size:.85rem;font-weight:600;text-transform:uppercase;letter-spacing:.5px;display:inline-flex;align-items:center;white-space:nowrap;max-width:100%}.sla-status{margin-top:6px;font-size:.75rem;color:#6b7280}.status-cell{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;text-align:center}.status-main-line{display:inline-flex;align-items:center;justify-content:center;gap:6px;flex-wrap:wrap}.nf-pill{display:inline-flex;align-items:center;justify-content:center;min-width:28px;height:20px;border-radius:999px;font-size:.68rem;font-weight:800;letter-spacing:.3px;border:1px solid transparent}.nf-pill.has-nf{background:#d4f4dd;border-color:#8dd4a8;color:#0d7a3d}.nf-pill.missing-nf{background:#ffd6d6;border-color:#f2aaaa;color:#b91c1c}.tracking-pill{display:inline-flex;align-items:center;justify-content:center;min-width:36px;height:20px;border-radius:999px;font-size:.64rem;font-weight:800;letter-spacing:.35px;border:1px solid transparent}.tracking-pill.ok{background:#dcfce7;border-color:#86efac;color:#166534}.tracking-pill.mismatch{background:#fee2e2;border-color:#fca5a5;color:#b91c1c}.tracking-pill.unknown{background:#e5e7eb;border-color:#d1d5db;color:#374151}.sla-status.ok{color:#10b981;font-weight:600}.sla-status.delay{color:#ef4444;font-weight:600}.status-green{background:#d4f4dd;color:#0d7a3d}.status-orange{background:#ffe8cc;color:#c60}.status-blue{background:#cce5ff;color:#06c}.status-red{background:#ffd6d6;color:#c00}.status-teal{background:#ccf2f2;color:teal}.status-purple{background:#ede9fe;color:#6d28d9}.status-indigo{background:#e0e7ff;color:#3730a3}.status-amber{background:#fef3c7;color:#92400e}.status-cyan{background:#cffafe;color:#0e7490}.status-gray{background:#e0e0e0;color:#666}.channel-badge{padding:.3rem .8rem;background:#f0f0f0;border-radius:var(--radius-sm);font-size:.85rem;font-weight:500;color:#555}.marketplace-cell{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.view-button{padding:.6rem 1rem;background:#06f;color:#fff;border:none;border-radius:var(--radius-sm);cursor:pointer;font-size:14px;transition:background .2s;min-height:44px}@media (hover: hover){.view-button:hover{background:#0052cc}}.tab-bar{display:flex;flex-wrap:wrap;gap:.5rem;margin-bottom:1rem}.tab-button{border:1px solid #e0e0e0;background:#f8f9fb;color:#1a1a1a;padding:.6rem 1rem;border-radius:var(--radius-lg);font-size:14px;cursor:pointer;min-height:44px}.tab-button.active{background:#06f;color:#fff;border-color:#06f}.tab-panel{display:flex;flex-direction:column;gap:.5rem}.frete-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px}.frete-grid label{display:flex;flex-direction:column;gap:6px;font-size:.9rem}.frete-grid input{padding:8px 10px;border:1px solid #d5d9e0;border-radius:var(--radius-sm);font-size:.95rem}.frete-actions{display:flex;align-items:center;flex-wrap:wrap;gap:12px}.frete-summary{background:#f9fafb;border:1px solid #e5e7eb;border-radius:var(--radius-md);padding:12px 14px}.frete-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;margin-bottom:12px}.frete-card{background:#fff;border:1px solid #e5e7eb;border-radius:var(--radius-md);padding:12px;display:flex;flex-direction:column;gap:6px}.frete-card-title{font-size:.75rem;color:#6b7280;text-transform:uppercase;letter-spacing:.4px}.frete-card-value{font-size:1.1rem;color:#111827}.frete-accordion{border:1px solid #e5e7eb;border-radius:var(--radius-md);background:#fff;margin-top:10px;overflow:hidden}.frete-accordion-toggle{width:100%;display:flex;justify-content:space-between;align-items:center;padding:10px 12px;border:none;background:#f9fafb;font-weight:600;cursor:pointer;color:#111827}.frete-accordion-content{padding:12px}.frete-sla{display:inline-flex;align-items:center;gap:6px;padding:4px 8px;border-radius:var(--radius-full);font-size:.75rem;font-weight:600;background:#f3f4f6;color:#4b5563}.frete-sla.sla-good{background:#dcfce7;color:#166534}.frete-sla.sla-warn{background:#fef9c3;color:#854d0e}.frete-sla.sla-bad{background:#fee2e2;color:#991b1b}.frete-badge{margin-left:8px;background:#e0e7ff;color:#3730a3;border-radius:var(--radius-full);font-size:.7rem;padding:2px 6px;font-weight:600}.frete-recommended td{background:#f8fafc}.frete-saved{color:#2563eb;font-weight:600;font-size:.85rem}.frete-error{color:#b42318;font-weight:600}.frete-ai-note{color:#0f766e;font-weight:600;font-size:.85rem}.frete-table-wrapper{overflow-x:auto}.frete-table{width:100%;border-collapse:collapse;font-size:.95rem}.frete-table th,.frete-table td{padding:10px 12px;border-bottom:1px solid #e6e8ef;text-align:left}.frete-table th{background:#f6f7fb;font-weight:600}.etiqueta-frame{width:100%;min-height:600px;border:1px solid #e6e8ef;border-radius:var(--radius-sm);margin-top:12px;background:#fff}.comprar-button{background:#10b981;color:#fff;border:none;border-radius:var(--radius-sm);padding:6px 10px;font-size:.85rem;cursor:pointer}.comprar-button:disabled{opacity:.6;cursor:not-allowed}.json-pre{background:#f5f5f5;padding:1rem;border-radius:var(--radius-sm);overflow-x:auto;font-size:.85rem;line-height:1.5;margin-top:.5rem}.xml-pre{max-height:320px;overflow:auto;white-space:pre;background:#0f172a;color:#e2e8f0;border:1px solid #1e293b}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:#00000080;display:flex;align-items:center;justify-content:center;z-index:1000;padding:24px}.modal-content{background:#fff;border-radius:var(--radius-md);width:100%;max-width:1200px;height:100%;max-height:calc(var(--app-dvh, 100dvh) - 48px);overflow-y:auto;-webkit-overflow-scrolling:touch;box-shadow:0 4px 20px #0000004d}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:.75rem 1rem;border-bottom:none;position:sticky;top:0;background:#fff;z-index:2}.modal-header h2{font-size:1rem;font-weight:600;color:#111827;margin:0}.close-button{background:none;border:none;font-size:1.5rem;cursor:pointer;color:#999;transition:color .2s;padding:0;width:30px;height:30px;display:flex;align-items:center;justify-content:center}@media (hover: hover){.close-button:hover{color:#333}}.link-button{background:none;border:none;padding:0;color:#1f2937;cursor:pointer;text-decoration:underline;font-size:.875rem}.modal-body{padding:1.5rem}.detail-row{display:grid;grid-template-columns:180px 1fr;gap:1rem;padding:.75rem 0;border-bottom:1px solid #f0f0f0}.detail-row:last-child{border-bottom:none}.detail-row strong{color:#666;font-weight:600;font-size:.9rem}.detail-row span{color:#333;font-size:.95rem}.detail-divider{height:1px;background:#e5e7eb;margin:6px 0 2px}.detail-total strong{color:#111827}.date-muted{color:#6b7280;font-size:.85rem}.payload-details{margin-top:1.5rem;padding-top:1.5rem;border-top:1px solid #e0e0e0}.payload-details summary{cursor:pointer;font-weight:600;color:#06f;margin-bottom:1rem}.payload-details pre{background:#f5f5f5;padding:1rem;border-radius:var(--radius-sm);overflow-x:auto;font-size:.85rem;line-height:1.5;color:#333}.product-cell{display:flex;align-items:center;gap:.75rem}.product-thumb{width:50px;height:50px;object-fit:cover;border-radius:var(--radius-sm);border:1px solid #e0e0e0;flex-shrink:0}.product-info{flex:1;min-width:0}.product-name{font-weight:500;font-size:.9rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#333;margin-bottom:.25rem}.product-sku{font-size:.8rem;color:#666}.detail-section{margin-top:1.5rem;padding-top:1.5rem;border-top:1px solid #e0e0e0}.detail-section:first-of-type{margin-top:1rem;padding-top:0;border-top:none}.detail-section h3{margin:0 0 1rem;font-size:1.1rem;font-weight:600;color:#06f}.nf-key{font-family:Courier New,monospace;font-size:.85rem;color:#2c3e50;word-break:break-all;background:#f8f9fa;padding:.25rem .5rem;border-radius:var(--radius-sm)}.tracking-code{font-family:Courier New,monospace;font-weight:700;font-size:1.1rem;color:#06f;letter-spacing:1px}.detail-row a{color:#06f;text-decoration:none;font-weight:500;transition:color .2s}@media (hover: hover){.detail-row a:hover{color:#0052cc;text-decoration:underline}}.product-detail{display:flex;gap:1rem;padding:1rem;background:#f8f9fa;border-radius:var(--radius-sm);margin-bottom:1rem}.product-detail:last-child{margin-bottom:0}.product-image-large{width:120px;height:120px;object-fit:cover;border-radius:var(--radius-sm);border:1px solid #e0e0e0;flex-shrink:0}.product-detail-info{flex:1;min-width:0}.product-detail-info strong{display:block;margin-bottom:.5rem;color:#2c3e50;font-size:1rem}.product-detail-info div{margin:.25rem 0;font-size:.9rem;color:#666}.primary-button.success{background:#10b981;color:#fff;border-color:#10b981}@media (hover: hover){.primary-button.success:hover{background:#059669;border-color:#059669}}.action-button-group{flex-shrink:0}.pedidos-modal-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#0f172a73;display:flex;align-items:center;justify-content:center;z-index:60}.pedidos-modal{background:#fff;border-radius:var(--radius-lg);padding:22px 26px;width:min(90vw,380px);box-shadow:0 20px 45px #0f172a33;text-align:center}.pedidos-modal h3{margin:0 0 8px;font-size:18px;color:#0f172a}.pedidos-modal p{margin:0 0 16px;color:#475569;font-size:14px}.pedidos-modal-actions{display:flex;justify-content:center}.pedidos-modal-actions button{border:none;background:#2563eb;color:#fff;padding:8px 16px;border-radius:var(--radius-md);cursor:pointer;font-weight:600}.pedidos-modal--wide{max-width:620px;width:92vw}.reconcile-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:16px}.reconcile-stat{display:flex;flex-direction:column;align-items:center;background:#f1f5f9;border-radius:var(--radius-sm);padding:8px 4px}.reconcile-stat--clickable{cursor:pointer;transition:transform .15s ease,box-shadow .15s ease}.reconcile-stat--clickable:hover{transform:translateY(-1px);box-shadow:0 2px 10px #0f172a14}.reconcile-stat--highlight{background:#fef3c7}.reconcile-stat--success{background:#dcfce7}.reconcile-label{font-size:11px;color:#64748b;text-transform:uppercase;letter-spacing:.03em}.reconcile-value{font-size:20px;font-weight:700;color:#0f172a}.reconcile-value-button{border:none;background:transparent;color:#0f172a;font-size:20px;font-weight:700;cursor:pointer;padding:0;line-height:1.1}.reconcile-detail-panel{border:1px solid #dbe3ee;background:#f8fafc;border-radius:var(--radius-sm);padding:10px;margin-bottom:14px}.reconcile-detail-header{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}.reconcile-detail-header h4{margin:0;color:#0f172a;font-size:13px}.reconcile-detail-actions{display:flex;align-items:center;gap:6px}.reconcile-detail-copy,.reconcile-detail-close{border:1px solid #cbd5e1;background:#fff;color:#0f172a;border-radius:8px;font-size:12px;font-weight:600;padding:5px 8px;cursor:pointer}.reconcile-detail-copy:hover,.reconcile-detail-close:hover{background:#f1f5f9}.reconcile-copy-feedback{margin:0 0 8px;font-size:12px;color:#2563eb;font-weight:600}.reconcile-detail-empty{margin:0;padding:10px;border-radius:8px;background:#fff;border:1px dashed #cbd5e1;color:#475569;font-size:12px}.reconcile-table-wrap--detail{max-height:220px;margin-bottom:0;background:#fff}.reconcile-table-wrap{max-height:320px;overflow-y:auto;-webkit-overflow-scrolling:touch;margin-bottom:16px;border:1px solid #e2e8f0;border-radius:var(--radius-sm)}.reconcile-table{width:100%;border-collapse:collapse;font-size:13px}.reconcile-table th{position:sticky;top:0;background:#f8fafc;text-align:left;padding:6px 10px;font-weight:600;color:#475569;border-bottom:1px solid #e2e8f0}.reconcile-table td{padding:6px 10px;border-bottom:1px solid #f1f5f9}.reconcile-table .status-local{color:#dc2626}.reconcile-table .status-magalu{color:#16a34a;font-weight:600}.reconcile-nodiverge{text-align:center;color:#16a34a;font-weight:500}@media (max-width: 480px){.reconcile-summary{grid-template-columns:repeat(2,1fr)}.reconcile-detail-header{flex-direction:column;align-items:flex-start}.reconcile-detail-actions{width:100%}}

/* Hotfix: marketplace marker must render as visual icon, not raw text next to order code. */
.code-cell{display:flex;align-items:center;gap:6px;font-family:Courier New,monospace;font-weight:600;color:#06f}.marketplace-logo{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;min-width:22px;border-radius:6px;overflow:hidden;text-indent:-9999px;color:transparent;font-size:0;line-height:1;background:#2563eb;box-shadow:0 1px 2px #0f172a26;position:relative}.marketplace-logo:before{content:"";position:absolute;inset:3px;background-repeat:no-repeat;background-position:center;background-size:contain}.marketplace-logo-magalu{background:#006bff}.marketplace-logo-magalu:before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect width='32' height='32' rx='7' fill='%23006BFF'/%3E%3Ctext x='16' y='22' text-anchor='middle' font-family='Arial,sans-serif' font-size='18' font-weight='900' fill='white'%3EM%3C/text%3E%3C/svg%3E")}.marketplace-logo-mercadolivre{background:#ffe600}.marketplace-logo-mercadolivre:before{inset:1px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 24'%3E%3Crect width='36' height='24' rx='12' fill='%23FFE600'/%3E%3Ctext x='18' y='16' text-anchor='middle' font-family='Arial,sans-serif' font-size='9' font-weight='900' fill='%23222'%3EML%3C/text%3E%3C/svg%3E")}.marketplace-logo-shopee{background:#ee4d2d}.marketplace-logo-shopee:before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect width='32' height='32' rx='7' fill='%23EE4D2D'/%3E%3Cpath d='M10 12h12l-1 12H11L10 12z' fill='white'/%3E%3Cpath d='M13 12c0-5 6-5 6 0' fill='none' stroke='white' stroke-width='2'/%3E%3Ctext x='16' y='21' text-anchor='middle' font-family='Arial,sans-serif' font-size='9' font-weight='900' fill='%23EE4D2D'%3ES%3C/text%3E%3C/svg%3E")}.marketplace-logo-camicado{background:#111827}.marketplace-logo-camicado:before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect width='32' height='32' rx='7' fill='%23111827'/%3E%3Ctext x='16' y='22' text-anchor='middle' font-family='Arial,sans-serif' font-size='18' font-weight='900' fill='white'%3EC%3C/text%3E%3C/svg%3E")}.marketplace-logo-webcontinental{background:#0ea5e9}.marketplace-logo-webcontinental:before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect width='32' height='32' rx='7' fill='%230EA5E9'/%3E%3Ctext x='16' y='22' text-anchor='middle' font-family='Arial,sans-serif' font-size='18' font-weight='900' fill='white'%3EW%3C/text%3E%3C/svg%3E")}.order-code-text{display:inline-block}

/* Ondax pedidos: ícones e densidade visual ajustados em 2026-06-18 */
.marketplace-logo-magalu{background:#0057ff!important}.marketplace-logo-magalu:before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect width='32' height='32' rx='7' fill='%230057FF'/%3E%3Ctext x='16' y='22' text-anchor='middle' font-family='Arial,sans-serif' font-size='18' font-weight='900' fill='white'%3EM%3C/text%3E%3C/svg%3E")!important}.marketplace-logo-webcontinental{background:#00a6a6!important}.marketplace-logo-webcontinental:before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect width='32' height='32' rx='7' fill='%2300A6A6'/%3E%3Cpath d='M7 10h18l-2 12H9L7 10z' fill='white' opacity='.96'/%3E%3Cpath d='M10 13l2.2 6 2.2-6h2.6l2.2 6 2.2-6h2.8l-3.7 9h-2.6l-2.2-5.8-2.2 5.8h-2.6L7.2 13H10z' fill='%2300A6A6'/%3E%3C/svg%3E")!important}
.marketplace-logo-carrefour{background:#0f766e!important}.marketplace-logo-carrefour:before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect width='32' height='32' rx='7' fill='%230F766E'/%3E%3Ctext x='16' y='21' text-anchor='middle' font-family='Arial,sans-serif' font-size='13' font-weight='900' fill='white'%3ECF%3C/text%3E%3C/svg%3E")!important}
.marketplace-logo-carrefour{background:#fff!important;border:1px solid #d5dde8!important;color:transparent!important}.marketplace-logo-carrefour:before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect width='32' height='32' rx='7' fill='white'/%3E%3Cpath d='M15 6 7 16l8 10 3-3-5-7 5-7-3-3z' fill='%230050A4'/%3E%3Cpath d='M17 6 25 16l-8 10-3-3 5-7-5-7 3-3z' fill='%23E30613'/%3E%3Ccircle cx='16' cy='16' r='3.1' fill='white'/%3E%3C/svg%3E")!important}.flow-stage-compras .compras-col-address{width:150px}.flow-stage-compras .compras-address-cell{font-size:.76rem;line-height:1.18;color:#334155;white-space:normal}.flow-stage-compras .compras-address-cell strong{display:block;color:#0f172a;font-size:.78rem;line-height:1.15;max-height:2.3em;overflow:hidden}.flow-stage-compras .compras-address-cell small{display:block;color:#64748b;margin-top:2px;line-height:1.15;max-height:2.3em;overflow:hidden}@media(max-width:768px){.flow-stage-compras .compras-address-cell strong,.flow-stage-compras .compras-address-cell small{max-height:none}}
@media (min-width:769px){.pedidos-container{padding:14px 18px}.pedidos-header{margin-bottom:10px}.pedidos-inline-controls{gap:6px;padding:6px}.pedidos-inline-controls .global-search{min-width:260px}.pedidos-inline-controls .filter-select{min-width:108px;flex-basis:118px}.sales-indicators{gap:7px;padding:7px}.sales-indicator{min-height:58px;padding:7px 10px}.sales-label{font-size:.6rem}.sales-value{font-size:.98rem}.sales-date{font-size:.68rem}.logistics-summary{padding:.45rem .75rem;margin-bottom:.65rem;font-size:.82rem}.pedidos-table{table-layout:fixed}.pedidos-table th{padding:10px 9px;font-size:.74rem;letter-spacing:.28px}.pedidos-table td{padding:9px 9px;font-size:.84rem;line-height:1.25}.pedidos-table th:nth-child(1),.pedidos-table td:nth-child(1){width:7.5%}.pedidos-table th:nth-child(2),.pedidos-table td:nth-child(2){width:9%}.pedidos-table th:nth-child(3),.pedidos-table td:nth-child(3){width:12%}.pedidos-table th:nth-child(4),.pedidos-table td:nth-child(4){width:9%}.pedidos-table th:nth-child(5),.pedidos-table td:nth-child(5){width:21%}.pedidos-table th:nth-child(6),.pedidos-table td:nth-child(6){width:15%}.pedidos-table th:nth-child(7),.pedidos-table td:nth-child(7){width:8.5%}.pedidos-table th:nth-child(8),.pedidos-table td:nth-child(8){width:9%}.pedidos-table th:nth-child(9),.pedidos-table td:nth-child(9){width:6.5%}.pedidos-table th:nth-child(10),.pedidos-table td:nth-child(10){width:8%}.pedidos-table th:nth-child(11),.pedidos-table td:nth-child(11){width:8.5%}.product-cell{max-width:none;gap:8px}.product-thumb{width:30px!important;height:30px!important}.product-name{font-size:.82rem;max-width:none;-webkit-line-clamp:1;white-space:normal}.customer-cell{font-size:.82rem}.sku-qty-lines{font-size:.78rem}.status-badge{padding:.22rem .55rem;font-size:.68rem;letter-spacing:.25px}.nf-pill,.tracking-pill{height:17px;font-size:.58rem;min-width:24px}.marketplace-logo{width:18px;height:18px;min-width:18px;border-radius:5px}.marketplace-logo:before{inset:2px}.code-cell{gap:5px;font-size:.78rem}.order-code-text{white-space:nowrap}.value-cell{white-space:nowrap;font-size:.82rem}.comprar-button{padding:5px 8px;font-size:.72rem}.action-button-group{display:flex;gap:4px;flex-wrap:nowrap}.pedidos-table tbody tr{height:46px}.pedidos-table-container{border:1px solid #e8edf5}}

/* Ondax pedidos: evitar linhas altas em desktop */
@media (min-width:769px){.pedidos-table td[data-label="Ações"],.pedidos-table td:last-child{white-space:nowrap}.pedidos-table td:last-child .comprar-button,.pedidos-table td:last-child button{display:inline-flex;align-items:center;justify-content:center;margin:0 2px 0 0;min-height:26px;line-height:1.05;border-radius:7px}.pedidos-table td:last-child{font-size:0}.pedidos-table td:last-child>*{font-size:.72rem}.pedidos-table .product-cell{min-height:30px}.pedidos-table .customer-cell,.pedidos-table td[data-label="Cliente"]{max-width:100%;white-space:normal;display:table-cell;overflow:hidden;text-overflow:ellipsis}.pedidos-table .company-cell,.pedidos-table .value-cell,.pedidos-table td[data-label="Deadline"]{white-space:nowrap}.pedidos-table tbody tr{height:auto}.pedidos-table td{height:42px}.pedidos-table td[data-label="Produto"] .product-name{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.pedidos-table td[data-label="Cliente"]{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.pedidos-table .status-cell{gap:2px}.pedidos-table .status-main-line{gap:4px}.pedidos-table .sku-qty-lines{line-height:1.15}}

/* Ondax pedidos: correção de corte lateral em 100% */
@media (min-width:769px){.pedidos-table th:nth-child(1),.pedidos-table td:nth-child(1){width:7%}.pedidos-table th:nth-child(2),.pedidos-table td:nth-child(2){width:8.5%}.pedidos-table th:nth-child(3),.pedidos-table td:nth-child(3){width:11.2%}.pedidos-table th:nth-child(4),.pedidos-table td:nth-child(4){width:8.2%}.pedidos-table th:nth-child(5),.pedidos-table td:nth-child(5){width:19%}.pedidos-table th:nth-child(6),.pedidos-table td:nth-child(6){width:13.3%}.pedidos-table th:nth-child(7),.pedidos-table td:nth-child(7){width:8.2%}.pedidos-table th:nth-child(8),.pedidos-table td:nth-child(8){width:7.2%}.pedidos-table th:nth-child(9),.pedidos-table td:nth-child(9){width:5.8%}.pedidos-table th:nth-child(10),.pedidos-table td:nth-child(10){width:7.2%}.pedidos-table th:nth-child(11),.pedidos-table td:nth-child(11){width:9.4%;min-width:122px}.pedidos-table td:last-child{overflow:visible}.pedidos-table td:last-child .comprar-button,.pedidos-table td:last-child button{padding:5px 7px;max-width:58px;white-space:normal;text-align:center}.pedidos-table td:last-child button:last-child{max-width:68px}.pedidos-table td[data-label="Produto"] .product-name{max-width:100%}.pedidos-table td[data-label="Cliente"]{max-width:100%}.pedidos-table-container{overflow-x:hidden}.pedidos-table{min-width:0}}

/* Ondax pedidos: colunas mais juntas para liberar Ações */
@media (min-width:769px){.pedidos-table{table-layout:fixed;width:100%}.pedidos-table th,.pedidos-table td{padding-left:6px!important;padding-right:6px!important}.pedidos-table th:nth-child(1),.pedidos-table td:nth-child(1){width:6.2%!important}.pedidos-table th:nth-child(2),.pedidos-table td:nth-child(2){width:8.3%!important}.pedidos-table th:nth-child(3),.pedidos-table td:nth-child(3){width:10.8%!important}.pedidos-table th:nth-child(4),.pedidos-table td:nth-child(4){width:8.5%!important}.pedidos-table th:nth-child(5),.pedidos-table td:nth-child(5){width:18.5%!important}.pedidos-table th:nth-child(6),.pedidos-table td:nth-child(6){width:12.5%!important}.pedidos-table th:nth-child(7),.pedidos-table td:nth-child(7){width:8%!important}.pedidos-table th:nth-child(8),.pedidos-table td:nth-child(8){width:6.2%!important}.pedidos-table th:nth-child(9),.pedidos-table td:nth-child(9){width:5.8%!important}.pedidos-table th:nth-child(10),.pedidos-table td:nth-child(10){width:6.7%!important}.pedidos-table th:nth-child(11),.pedidos-table td:nth-child(11){width:8.5%!important;min-width:132px!important}.pedidos-table td[data-label="Empresa"],.pedidos-table td[data-label="Cliente"],.pedidos-table td[data-label="Produto"] .product-name{white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}.pedidos-table .product-cell{gap:6px!important}.pedidos-table .product-thumb{width:28px!important;height:28px!important}.pedidos-table td:last-child{padding-right:10px!important}.pedidos-table td:last-child .comprar-button,.pedidos-table td:last-child button{padding:5px 6px!important;margin-right:3px!important;max-width:none!important;white-space:normal!important}.pedidos-table td:last-child button:first-child{width:56px!important}.pedidos-table td:last-child button:last-child{width:72px!important}.pedidos-table-container{padding-right:0!important}}

/* Ondax pedidos: Ações sempre dentro da célula */
@media (min-width:769px){.pedidos-table th:nth-child(1),.pedidos-table td:nth-child(1){width:6%!important}.pedidos-table th:nth-child(2),.pedidos-table td:nth-child(2){width:8%!important}.pedidos-table th:nth-child(3),.pedidos-table td:nth-child(3){width:10.5%!important}.pedidos-table th:nth-child(4),.pedidos-table td:nth-child(4){width:8%!important}.pedidos-table th:nth-child(5),.pedidos-table td:nth-child(5){width:16.5%!important}.pedidos-table th:nth-child(6),.pedidos-table td:nth-child(6){width:11.5%!important}.pedidos-table th:nth-child(7),.pedidos-table td:nth-child(7){width:7.8%!important}.pedidos-table th:nth-child(8),.pedidos-table td:nth-child(8){width:6%!important}.pedidos-table th:nth-child(9),.pedidos-table td:nth-child(9){width:5.5%!important}.pedidos-table th:nth-child(10),.pedidos-table td:nth-child(10){width:6.5%!important}.pedidos-table th:nth-child(11),.pedidos-table td:nth-child(11){width:13.7%!important;min-width:160px!important}.pedidos-table td:last-child{white-space:nowrap!important;overflow:hidden!important}.pedidos-table td:last-child .comprar-button,.pedidos-table td:last-child button{display:inline-flex!important;vertical-align:middle!important}.pedidos-table td:last-child button:first-child{width:54px!important}.pedidos-table td:last-child button:last-child{width:70px!important}.pedidos-table td[data-label="Código"]{letter-spacing:-.2px}.pedidos-table td[data-label="SKU / Qtd"]{letter-spacing:-.1px}}

/* Ondax pedidos: última coluna é Ações em qualquer aba */
@media (min-width:769px){.pedidos-table th:last-child,.pedidos-table td:last-child{width:13.8%!important;min-width:160px!important;max-width:160px!important}.pedidos-table th:nth-child(5),.pedidos-table td:nth-child(5){width:15.8%!important}.pedidos-table th:nth-child(6),.pedidos-table td:nth-child(6){width:10.8%!important}.pedidos-table th:nth-child(9),.pedidos-table td:nth-child(9){width:6.2%!important}.pedidos-table td:last-child{padding-left:5px!important;padding-right:5px!important;overflow:visible!important}.pedidos-table td:last-child button:first-child{width:54px!important}.pedidos-table td:last-child button:last-child{width:72px!important}.pedidos-table td:last-child .comprar-button,.pedidos-table td:last-child button{margin-right:2px!important}}

/* Ondax pedidos: redistribuição equilibrada desktop */
@media (min-width:769px){.pedidos-table{table-layout:fixed!important;width:100%!important}.pedidos-table th,.pedidos-table td{padding-left:7px!important;padding-right:7px!important}.pedidos-table th:nth-child(1),.pedidos-table td:nth-child(1){width:7.2%!important}.pedidos-table th:nth-child(2),.pedidos-table td:nth-child(2){width:9%!important}.pedidos-table th:nth-child(3),.pedidos-table td:nth-child(3){width:11.2%!important}.pedidos-table th:nth-child(4),.pedidos-table td:nth-child(4){width:8.8%!important}.pedidos-table th:nth-child(5),.pedidos-table td:nth-child(5){width:20%!important}.pedidos-table th:nth-child(6),.pedidos-table td:nth-child(6){width:14%!important}.pedidos-table th:nth-child(7),.pedidos-table td:nth-child(7){width:8.3%!important}.pedidos-table th:nth-child(8),.pedidos-table td:nth-child(8){width:5.6%!important}.pedidos-table th:nth-child(9),.pedidos-table td:nth-child(9){width:6.4%!important}.pedidos-table th:last-child,.pedidos-table td:last-child{width:9.5%!important;min-width:136px!important;max-width:none!important}.pedidos-table td[data-label="Ações"],.pedidos-table td:last-child{padding-left:6px!important;padding-right:8px!important;white-space:nowrap!important;overflow:visible!important}.pedidos-table td:last-child button:first-child{width:54px!important}.pedidos-table td:last-child button:last-child{width:70px!important}.pedidos-table td:last-child .comprar-button,.pedidos-table td:last-child button{padding:5px 5px!important;margin-right:3px!important}.pedidos-table td[data-label="Produto"] .product-name{font-size:.84rem!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}.pedidos-table td[data-label="Cliente"]{font-size:.83rem!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}.pedidos-table td[data-label="Empresa"]{font-size:.83rem!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}.pedidos-table td[data-label="Data/Hora"]{font-size:.82rem!important}.pedidos-table td[data-label="Código"]{font-size:.77rem!important}.pedidos-table .sku-qty-lines{font-size:.78rem!important}.pedidos-table .status-badge{font-size:.67rem!important}.pedidos-table .product-thumb{width:30px!important;height:30px!important}.pedidos-table .product-cell{gap:7px!important}.pedidos-table tbody tr{height:54px!important}.pedidos-table td{height:54px!important;vertical-align:middle!important}.pedidos-table-container{overflow-x:hidden!important}}

/* Ondax pedidos: ações em uma linha e espaçamento final */
@media (min-width:769px){.pedidos-table th:nth-child(5),.pedidos-table td:nth-child(5){width:18.8%!important}.pedidos-table th:nth-child(6),.pedidos-table td:nth-child(6){width:13.2%!important}.pedidos-table th:nth-child(9),.pedidos-table td:nth-child(9){width:6%!important}.pedidos-table th:last-child,.pedidos-table td:last-child{width:11.5%!important;min-width:158px!important}.pedidos-table td:last-child button:first-child{width:54px!important}.pedidos-table td:last-child button:last-child{width:88px!important;white-space:nowrap!important}.pedidos-table td:last-child .comprar-button,.pedidos-table td:last-child button{font-size:.68rem!important;line-height:1!important;height:26px!important;min-height:26px!important;padding:0 5px!important}.pedidos-table tbody tr{height:56px!important}.pedidos-table td{height:56px!important}.pedidos-table td[data-label="Produto"] .product-name{max-width:100%!important}.pedidos-table td[data-label="Cliente"]{max-width:100%!important}}

/* Ondax pedidos: altura real das linhas mais econômica */
@media (min-width:769px){.pedidos-table,.pedidos-table *{box-sizing:border-box}.pedidos-table th{padding-top:8px!important;padding-bottom:8px!important}.pedidos-table td{padding-top:5px!important;padding-bottom:5px!important;height:auto!important}.pedidos-table tbody tr{height:auto!important}.pedidos-table .status-cell{gap:2px!important}.pedidos-table .status-main-line{line-height:1!important}.pedidos-table .status-badge{padding-top:3px!important;padding-bottom:3px!important;line-height:1!important}.pedidos-table .nf-pill,.pedidos-table .tracking-pill{height:16px!important;line-height:1!important}.pedidos-table .product-thumb{width:28px!important;height:28px!important}.pedidos-table .sku-qty-lines{gap:1px!important;line-height:1.1!important}.pedidos-table td:last-child .comprar-button,.pedidos-table td:last-child button{height:24px!important;min-height:24px!important}}

/* Ondax pedidos: garantir leitura do produto na aba Todos em 100% */
@media (min-width:769px){
  .pedidos-container .pedidos-table{table-layout:fixed!important;width:100%!important;min-width:0!important}
  .pedidos-container .pedidos-table th,
  .pedidos-container .pedidos-table td{padding-left:6px!important;padding-right:6px!important;vertical-align:middle!important}
  .pedidos-container .pedidos-table th:nth-child(1),.pedidos-container .pedidos-table td:nth-child(1){width:7%!important}
  .pedidos-container .pedidos-table th:nth-child(2),.pedidos-container .pedidos-table td:nth-child(2){width:8%!important}
  .pedidos-container .pedidos-table th:nth-child(3),.pedidos-container .pedidos-table td:nth-child(3){width:10%!important}
  .pedidos-container .pedidos-table th:nth-child(4),.pedidos-container .pedidos-table td:nth-child(4){width:8%!important}
  .pedidos-container .pedidos-table th:nth-child(5),.pedidos-container .pedidos-table td:nth-child(5){width:24%!important}
  .pedidos-container .pedidos-table th:nth-child(6),.pedidos-container .pedidos-table td:nth-child(6){width:11%!important}
  .pedidos-container .pedidos-table th:nth-child(7),.pedidos-container .pedidos-table td:nth-child(7){width:9%!important}
  .pedidos-container .pedidos-table th:nth-child(8),.pedidos-container .pedidos-table td:nth-child(8){width:6%!important}
  .pedidos-container .pedidos-table th:nth-child(9),.pedidos-container .pedidos-table td:nth-child(9){width:5%!important}
  .pedidos-container .pedidos-table th:nth-child(10),.pedidos-container .pedidos-table td:nth-child(10){width:7%!important}
  .pedidos-container .pedidos-table th:nth-child(11),.pedidos-container .pedidos-table td:nth-child(11){width:5%!important;min-width:76px!important;max-width:92px!important}
  .pedidos-container .pedidos-table .product-cell{display:flex!important;align-items:center!important;gap:8px!important;min-width:0!important;max-width:none!important;overflow:visible!important}
  .pedidos-container .pedidos-table .product-thumb{width:34px!important;height:34px!important;flex:0 0 34px!important;object-fit:contain!important;background:#fff!important}
  .pedidos-container .pedidos-table td[data-label="Produto"] .product-name{display:block!important;max-width:none!important;min-width:0!important;white-space:normal!important;overflow:hidden!important;text-overflow:clip!important;line-height:1.25!important;font-size:.86rem!important;color:#0f172a!important;font-weight:650!important}
  .pedidos-container .pedidos-table td[data-label="Código"]{font-size:.75rem!important;letter-spacing:-.45px!important}
  .pedidos-container .pedidos-table td[data-label="SKU / Qtd"]{font-size:.75rem!important}
  .pedidos-container .pedidos-table td[data-label="Comprar"] .comprar-button{width:64px!important;max-width:64px!important;height:28px!important;min-height:28px!important;padding:0 6px!important;font-size:.68rem!important;white-space:nowrap!important}
}

/* Ondax pedidos: tabela não pode usar flex no próprio TD, senão as colunas colapsam */
@media (min-width:769px){
  .pedidos-container .pedidos-table td.code-cell,
  .pedidos-container .pedidos-table td.product-cell,
  .pedidos-container .pedidos-table td.status-cell{display:table-cell!important}
  .pedidos-container .pedidos-table td.code-cell{width:10%!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  .pedidos-container .pedidos-table td.product-cell{width:24%!important;white-space:nowrap!important;overflow:hidden!important}
  .pedidos-container .pedidos-table td.product-cell .product-thumb{display:inline-block!important;vertical-align:middle!important;margin-right:8px!important}
  .pedidos-container .pedidos-table td.product-cell .product-name{display:inline-block!important;width:calc(100% - 46px)!important;vertical-align:middle!important;white-space:normal!important;overflow:hidden!important;line-height:1.25!important;max-height:2.55em!important;text-overflow:clip!important}
  .pedidos-container .pedidos-table td.status-cell{text-align:left!important;white-space:normal!important;overflow:visible!important}
  .pedidos-container .pedidos-table td.status-cell .status-main-line{display:inline-flex!important;max-width:100%!important;vertical-align:middle!important}
}
.magalu-delivery-panel{background:#fff;border:1px solid #dbe3ee;border-radius:14px;padding:16px}.magalu-delivery-help{margin:0 0 12px;color:#475569;font-size:.92rem}.magalu-delivery-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:end}.magalu-delivery-field{display:flex;flex-direction:column;gap:6px;min-width:0}.magalu-delivery-field--wide{grid-column:span 2}.magalu-delivery-field span{font-size:.78rem;font-weight:700;color:#334155;text-transform:uppercase;letter-spacing:.35px}.magalu-delivery-field input{width:100%;min-height:42px;border:1px solid #cbd5e1;border-radius:10px;padding:9px 11px;font-size:.95rem;color:#0f172a;background:#fff}.magalu-delivery-field input:focus{outline:none;border-color:#2563eb;box-shadow:0 0 0 3px #2563eb1f}.magalu-delivery-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:12px}.magalu-delivery-actions--inline{margin-top:0;align-self:end}.magalu-delivery-message{border-radius:10px;padding:10px 12px;margin:10px 0 12px;font-weight:700}.magalu-delivery-message.success{background:#dcfce7;color:#166534;border:1px solid #86efac}.magalu-delivery-message.error{background:#fee2e2;color:#991b1b;border:1px solid #fca5a5}@media (max-width:768px){.magalu-delivery-grid{grid-template-columns:1fr}.magalu-delivery-field--wide{grid-column:auto}.magalu-delivery-actions--inline{align-self:stretch}.magalu-delivery-actions button{width:100%}}

/* src/pages/Compras.css */
.compras-page{padding:2rem}.page-subtitle{color:#6b7280;margin-top:4px}.aduana-ops-card{display:flex;flex-direction:column;gap:14px;border:1px solid #d9e6e1;background:linear-gradient(180deg,#fff,#f7fbf9)}.aduana-ops-card h2{margin:0}.aduana-ops-card p{margin:6px 0 0;color:var(--color-text-muted)}.aduana-ops-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.aduana-ops-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(180px,100%),1fr));gap:12px}.aduana-metrics-inline{display:flex;flex-wrap:wrap;gap:10px;font-size:.88rem;color:#294741;background:#eef6f3;border:1px solid #d3e6de;border-radius:10px;padding:10px 12px}.aduana-actions-row{display:flex;flex-wrap:wrap;gap:10px}.pedidos-table-container{background:#fff;border-radius:var(--radius-sm);box-shadow:0 1px 3px #0000001a;overflow-x:auto}.pedidos-table{width:100%;border-collapse:collapse}.pedidos-table thead{background:#f5f5f5;border-bottom:2px solid #e0e0e0}.pedidos-table th{padding:1rem;text-align:left;font-weight:600;font-size:.9rem;color:#555;text-transform:uppercase;letter-spacing:.5px}.pedidos-table tbody tr{border-bottom:1px solid #f0f0f0;cursor:pointer;transition:background .2s}@media (hover: hover){.pedidos-table tbody tr:hover{background:#f9f9f9}}.pedidos-table td{padding:1rem;font-size:.95rem;color:#333;vertical-align:middle}@media (max-width: 768px){.compras-page{padding:1rem}.aduana-ops-head{flex-direction:column;align-items:stretch}.aduana-ops-grid{grid-template-columns:1fr}.pedidos-table thead{display:none}.pedidos-table tbody,.pedidos-table tr,.pedidos-table td{display:block;width:100%}.pedidos-table tbody tr{background:#fff;border:1px solid #e5e7eb;border-radius:var(--radius-md);padding:16px;box-shadow:0 8px 18px #0f172a14;margin-bottom:14px}.pedidos-table td{padding:6px 0;border-bottom:1px dashed #e5e7eb;display:flex;justify-content:space-between;gap:12px;font-size:15px}.pedidos-table td:last-child{border-bottom:none}.product-cell{align-items:center;min-width:0;max-width:100%}}@media (max-width: 480px){.compras-page{padding:.75rem}.pedidos-table td{font-size:14px}}.company-cell{font-weight:600;color:#111827;white-space:normal;overflow-wrap:anywhere}.product-cell{display:flex;align-items:center;gap:.75rem;min-width:0;max-width:360px}.product-thumb{width:36px;height:36px;border-radius:var(--radius-sm);object-fit:cover;border:1px solid #e5e7eb;background:#f9fafb;flex-shrink:0}.product-thumb.placeholder{background:#f3f4f6}.product-name{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;flex:1;min-width:0;max-width:280px;word-break:break-word;overflow-wrap:anywhere;font-size:.9rem;color:#374151}.status-badge{padding:.3rem .8rem;border-radius:var(--radius-lg);font-size:.85rem;font-weight:600;text-transform:uppercase;letter-spacing:.5px}.status-green{background:#d4f4dd;color:#0d7a3d}.status-orange{background:#ffe8cc;color:#c60}.status-blue{background:#cce5ff;color:#06c}.status-red{background:#ffd6d6;color:#c00}.status-teal{background:#ccf2f2;color:teal}.status-purple{background:#ede9fe;color:#6d28d9}.status-indigo{background:#e0e7ff;color:#3730a3}.status-amber{background:#fef3c7;color:#92400e}.status-cyan{background:#cffafe;color:#0e7490}.status-gray{background:#e0e0e0;color:#666}.marketplace-cell{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.actions{display:flex;gap:8px;flex-wrap:wrap}.compras-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px}.compras-form label{display:flex;flex-direction:column;gap:6px;font-size:.9rem}.compras-form input{padding:8px 10px;border:1px solid #d5d9e0;border-radius:var(--radius-sm);font-size:.95rem}.compras-status{margin-top:12px;color:#2563eb;font-weight:600}.confirm-modal{max-width:420px}.confirm-actions{display:flex;justify-content:flex-end;gap:12px;margin-top:16px}.button.danger{background:#dc2626;color:#fff;border:none}
/* Ajustes compactos do fluxo de pedidos */
.compras-page{padding:16px 18px 40px}.compras-page .pedidos-header{margin-bottom:12px;padding:18px 20px}.flow-step-badge{display:inline-flex;align-items:center;border-radius:8px;background:#6d4cff;color:#fff;font-weight:800;font-size:12px;padding:5px 8px;margin-bottom:8px}.flow-toast{position:fixed;right:22px;bottom:22px;z-index:1200;display:flex;align-items:center;gap:12px;max-width:min(520px,calc(100vw - 44px));padding:14px 16px;border-radius:14px;box-shadow:0 18px 45px #102a4326;border:1px solid #d7e2ef;background:#fff;color:#1f2937;font-weight:700}.flow-toast.error{background:#fff1f2;border-color:#fecdd3;color:#9f1239}.flow-toast.success{background:#ecfdf5;border-color:#bbf7d0;color:#065f46}.flow-toast button{border:0;background:transparent;color:inherit;font-weight:800;cursor:pointer}.flow-order-cell{display:flex;flex-direction:column;gap:5px;min-width:130px}.flow-order-cell strong{font-size:13px;color:#0057d8}.flow-order-cell small{width:max-content;max-width:135px;border-radius:999px;background:#eef4ff;color:#24435f;font-weight:800;font-size:11px;padding:4px 7px;white-space:normal}.value-cell{font-weight:800;color:#132238;white-space:nowrap}.flow-edit-cell{min-width:92px}.flow-input-shell{display:flex;flex-direction:column;gap:4px;border:1px solid #cfe0f4;background:#f8fbff;border-radius:10px;padding:7px 8px}.flow-input-label{font-size:10px;text-transform:uppercase;letter-spacing:.04em;color:#466180;font-weight:800}.flow-input{border:0;background:transparent;outline:0;min-width:0;width:100%;font-size:13px;color:#0f172a}.source-field{min-width:112px}.aduana-action-panel{border:1px solid #d8e6f0;border-radius:14px;background:#fff;margin:0 0 14px;padding:14px;box-shadow:0 8px 20px #0f172a0a}.aduana-action-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.aduana-action-head strong{font-size:15px;color:#0f172a}.aduana-total-pill{border-radius:999px;background:#eef8f3;color:#075f44;padding:7px 11px;font-size:12px;font-weight:800}.aduana-settings-grid{display:grid;grid-template-columns:minmax(220px,1.6fr) repeat(5,minmax(115px,1fr)) minmax(130px,.8fr);gap:10px;align-items:end}.aduana-field{display:flex;flex-direction:column;gap:5px}.aduana-field span{font-size:11px;font-weight:800;color:#34495e;text-transform:uppercase}.aduana-field input,.aduana-field select{height:38px;border:1px solid #cfe0f4;border-radius:10px;background:#f8fbff;padding:0 10px;font-size:13px;color:#0f172a}.aduana-save-button{height:38px}.aduana-action-buttons{display:grid;grid-template-columns:repeat(7,minmax(120px,1fr));gap:8px;margin-top:12px}.aduana-action-buttons .button{width:100%;min-height:38px;padding:8px 10px}.aduana-action-status{margin:10px 0 0;color:#047857;font-weight:700}.aduana-action-status.error{color:#b42318}.pedidos-table{table-layout:auto}.pedidos-table th{padding:10px 12px;font-size:11px;white-space:nowrap}.pedidos-table td{padding:10px 12px;font-size:13px}.compras-page .product-cell{max-width:300px}.compras-page .product-name{max-width:220px;font-size:13px}.compras-page .product-thumb{width:34px;height:34px}.compras-page .actions{gap:6px}.compras-page .actions .button{padding:8px 12px;min-width:74px;white-space:nowrap}@media (max-width:1400px){.aduana-settings-grid{grid-template-columns:minmax(220px,1.4fr) repeat(3,minmax(120px,1fr))}.aduana-action-buttons{grid-template-columns:repeat(4,minmax(120px,1fr))}.pedidos-table th,.pedidos-table td{padding:9px 8px;font-size:12px}.source-field{min-width:96px}.flow-input-shell{padding:6px}.compras-page .product-name{max-width:180px}}

/* Correções finais da esteira: relatório, badges e edição de título */
.flow-header-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap}
.flow-header-actions .report-button{background:#0f766e;box-shadow:0 8px 20px #0f766e24}
.flow-header-actions .report-button:hover{background:#0b5f58}
.compras-page .status-cell{min-width:116px;align-items:flex-start}
.compras-page .status-badge{display:inline-flex;align-items:center;justify-content:center;width:max-content;max-width:none;min-width:max-content;min-height:28px;line-height:1.1;padding:7px 12px;border-radius:999px;white-space:nowrap;text-align:center}
.compras-page .aduana-title-cell{min-width:300px;max-width:420px;align-items:stretch}
.compras-page .flow-title-textarea{min-height:46px;line-height:1.25;resize:vertical;white-space:normal;overflow:auto}
.compras-page .flow-title-textarea:focus{min-height:112px;min-width:min(520px,46vw);position:relative;z-index:25;background:#fff}
.compras-page .flow-input-shell select.flow-input{min-height:26px;cursor:pointer}
.compras-page .pedidos-table td[data-label="NF Entrada"]{min-width:120px}
.compras-page .pedidos-table td[data-label="EAN"]{min-width:130px}
.compras-page .pedidos-table td[data-label="Peso"]{min-width:100px}
.compras-page .pedidos-table td[data-label="Preco"]{min-width:110px}
@media (max-width:1400px){.compras-page .aduana-title-cell{min-width:260px}.compras-page .flow-title-textarea:focus{min-width:min(460px,48vw)}.flow-header-actions{justify-content:flex-start}}

/* Compras: data do pedido como primeira coluna e sem deadline */
.flow-date-cell{white-space:nowrap;font-weight:700;color:#1f2937;line-height:1.25;min-width:116px}
.flow-stage-compras .pedidos-table th:first-child,.flow-stage-compras .pedidos-table td:first-child{width:128px}
.flow-stage-compras .pedidos-table th,.flow-stage-compras .pedidos-table td{vertical-align:middle}

/* Faturar: layout mais limpo para emissão de NF e envio Magalu */
.flow-stage-faturar .pedidos-table{table-layout:fixed;min-width:1180px}
.flow-stage-faturar .pedidos-table th,.flow-stage-faturar .pedidos-table td{padding:12px 10px;vertical-align:middle}
.flow-stage-faturar .pedidos-table th:nth-child(1),.flow-stage-faturar .pedidos-table td:nth-child(1){width:120px}
.flow-stage-faturar .pedidos-table th:nth-child(3),.flow-stage-faturar .pedidos-table td:nth-child(3){width:150px}
.flow-stage-faturar .pedidos-table th:nth-child(4),.flow-stage-faturar .pedidos-table td:nth-child(4){width:285px}
.flow-stage-faturar .pedidos-table th:nth-child(5),.flow-stage-faturar .pedidos-table td:nth-child(5){width:280px}
.flow-stage-faturar .pedidos-table th:nth-child(6),.flow-stage-faturar .pedidos-table td:nth-child(6){width:180px}
.flow-stage-faturar .pedidos-table th:nth-child(7),.flow-stage-faturar .pedidos-table td:nth-child(7){width:120px}
.flow-stage-faturar .pedidos-table th:nth-child(8),.flow-stage-faturar .pedidos-table td:nth-child(8){width:120px}
.flow-stage-faturar .pedidos-table th:nth-child(9),.flow-stage-faturar .pedidos-table td:nth-child(9){width:112px}
.flow-stage-faturar .pedidos-table th:nth-child(10),.flow-stage-faturar .pedidos-table td:nth-child(10){width:112px}
.flow-stage-faturar .product-cell{max-width:none;align-items:center;gap:12px}
.flow-stage-faturar .product-thumb{width:44px;height:44px}
.flow-stage-faturar .product-name{max-width:210px;white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;line-height:1.25;font-weight:700;color:#111827}
.flow-stage-faturar .faturar-nf-cell{display:flex;align-items:center;gap:10px;flex-wrap:wrap;min-width:0}
.flow-stage-faturar .faturar-nf-cell .button{min-width:92px;height:38px;padding:8px 12px;box-shadow:0 8px 18px #0f766e20}
.faturar-nf-fields{display:grid;grid-template-columns:1fr 1fr;gap:8px;flex:1 1 160px;min-width:160px}
.faturar-mini-field{display:flex;flex-direction:column;gap:4px;border:1px solid #cfe0f4;background:#f8fbff;border-radius:10px;padding:6px 8px;min-width:0}
.faturar-mini-field span{font-size:10px;text-transform:uppercase;letter-spacing:.04em;color:#466180;font-weight:800;white-space:nowrap}
.faturar-status-readonly{display:inline-flex;align-items:center;justify-content:center;width:max-content;max-width:100%;min-height:24px;border-radius:999px;padding:4px 10px;font-size:12px;font-weight:900;line-height:1.1;white-space:nowrap}
.faturar-status-readonly.pending{background:#eef2ff;color:#3730a3}
.faturar-status-readonly.ok{background:#dcfce7;color:#166534}
.faturar-status-readonly.error{background:#fee2e2;color:#991b1b}
.faturar-mini-field.is-saving{border-color:#0ea5e9;box-shadow:0 0 0 3px #0ea5e91f}
.flow-stage-faturar .status-cell{align-items:flex-start;min-width:0}
.flow-stage-faturar .marketplace-cell{font-size:12px;line-height:1.25}
@media (max-width:1400px){.flow-stage-faturar .pedidos-table{min-width:1120px}.flow-stage-faturar .pedidos-table th,.flow-stage-faturar .pedidos-table td{padding:10px 8px}.flow-stage-faturar .pedidos-table th:nth-child(4),.flow-stage-faturar .pedidos-table td:nth-child(4){width:250px}.flow-stage-faturar .pedidos-table th:nth-child(5),.flow-stage-faturar .pedidos-table td:nth-child(5){width:250px}.faturar-nf-fields{grid-template-columns:1fr}}

/* Layout final por etapa: evita sobreposição e usa scroll horizontal apenas quando necessário */
.compras-page{padding:14px 16px 36px}
.compras-page .pedidos-header{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;min-height:0;margin:0 0 12px;padding:16px 18px}
.compras-page .pedidos-header h1{margin:0;font-size:28px;line-height:1.12}
.compras-page .page-subtitle{margin:5px 0 0;font-size:14px}
.compras-page .pedidos-table-container{border:1px solid #dfe7f1;border-radius:14px;overflow:auto;background:#fff}
.compras-page .pedidos-table{border-collapse:separate;border-spacing:0;table-layout:fixed;width:100%}
.compras-page .pedidos-table th{height:38px;padding:8px 9px;background:#f8fafc;color:#26364c;font-size:11px;line-height:1.15;letter-spacing:.03em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.compras-page .pedidos-table td{padding:9px 9px;font-size:13px;line-height:1.25;vertical-align:middle;overflow:hidden}
.compras-page .pedidos-table tbody tr{height:74px}
.compras-page .flow-order-cell{min-width:0}
.compras-page .flow-order-cell strong{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.compras-page .flow-order-cell small{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.compras-page .product-cell{display:flex;align-items:center;gap:9px;max-width:none;min-width:0}
.compras-page .product-thumb{width:38px;height:38px}
.compras-page .product-name{display:-webkit-box;max-width:none;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;color:#111827;font-weight:700;line-height:1.22}
.compras-page .flow-input-shell{min-height:50px;padding:7px 8px;border-radius:10px;background:#f9fcff}
.compras-page .flow-input-label{font-size:9px;line-height:1.1}
.compras-page .flow-input{font-size:13px;line-height:1.2}
.compras-page .actions{display:flex;flex-direction:column;align-items:stretch;gap:5px;min-width:0}
.compras-page .actions .button{width:100%;min-width:0;padding:7px 10px;font-size:12px;line-height:1.15;white-space:normal}
.compras-page .status-badge{max-width:100%;min-width:0;overflow:hidden;text-overflow:ellipsis}

.flow-stage-compras .pedidos-table{min-width:1460px}
.flow-stage-compras .pedidos-table th:nth-child(1),.flow-stage-compras .pedidos-table td:nth-child(1){width:120px}
.flow-stage-compras .pedidos-table th:nth-child(2),.flow-stage-compras .pedidos-table td:nth-child(2){width:150px}
.flow-stage-compras .pedidos-table th:nth-child(3),.flow-stage-compras .pedidos-table td:nth-child(3){width:220px}
.flow-stage-compras .pedidos-table th:nth-child(4),.flow-stage-compras .pedidos-table td:nth-child(4){width:105px}
.flow-stage-compras .pedidos-table th:nth-child(5),.flow-stage-compras .pedidos-table td:nth-child(5){width:132px}
.flow-stage-compras .pedidos-table th:nth-child(6),.flow-stage-compras .pedidos-table td:nth-child(6){width:140px}
.flow-stage-compras .pedidos-table th:nth-child(7),.flow-stage-compras .pedidos-table td:nth-child(7){width:105px}
.flow-stage-compras .pedidos-table th:nth-child(8),.flow-stage-compras .pedidos-table td:nth-child(8){width:105px}
.flow-stage-compras .pedidos-table th:nth-child(9),.flow-stage-compras .pedidos-table td:nth-child(9){width:110px}
.flow-stage-compras .pedidos-table th:nth-child(10),.flow-stage-compras .pedidos-table td:nth-child(10){width:130px}
.flow-stage-compras .pedidos-table th:nth-child(11),.flow-stage-compras .pedidos-table td:nth-child(11){width:118px}
.flow-stage-compras .pedidos-table th:nth-child(12),.flow-stage-compras .pedidos-table td:nth-child(12){width:110px}
.flow-stage-compras .pedidos-table th:nth-child(13),.flow-stage-compras .pedidos-table td:nth-child(13){width:90px}
.flow-stage-compras .pedidos-table th:nth-child(14),.flow-stage-compras .pedidos-table td:nth-child(14){width:96px}
.flow-stage-compras .flow-date-cell{font-size:12px;white-space:normal}
.flow-stage-compras td[data-label="Cliente"],.flow-stage-compras td[data-label="Marketplace"]{white-space:normal}

.flow-stage-aduana .pedidos-table{min-width:1360px}
.flow-stage-aduana .pedidos-table th:nth-child(1),.flow-stage-aduana .pedidos-table td:nth-child(1){width:150px}
.flow-stage-aduana .pedidos-table th:nth-child(2),.flow-stage-aduana .pedidos-table td:nth-child(2){width:290px}
.flow-stage-aduana .pedidos-table th:nth-child(3),.flow-stage-aduana .pedidos-table td:nth-child(3){width:145px}
.flow-stage-aduana .pedidos-table th:nth-child(4),.flow-stage-aduana .pedidos-table td:nth-child(4){width:118px}
.flow-stage-aduana .pedidos-table th:nth-child(5),.flow-stage-aduana .pedidos-table td:nth-child(5){width:135px}
.flow-stage-aduana .pedidos-table th:nth-child(6),.flow-stage-aduana .pedidos-table td:nth-child(6){width:112px}
.flow-stage-aduana .pedidos-table th:nth-child(7),.flow-stage-aduana .pedidos-table td:nth-child(7){width:120px}
.flow-stage-aduana .pedidos-table th:nth-child(8),.flow-stage-aduana .pedidos-table td:nth-child(8){width:122px}
.flow-stage-aduana .pedidos-table th:nth-child(9),.flow-stage-aduana .pedidos-table td:nth-child(9){width:118px}
.flow-stage-aduana .pedidos-table th:nth-child(10),.flow-stage-aduana .pedidos-table td:nth-child(10){width:92px}
.flow-stage-aduana .aduana-title-cell{min-width:0;max-width:none;align-items:stretch}
.flow-stage-aduana .flow-title-textarea{min-height:58px;resize:vertical}
.flow-stage-aduana .flow-title-textarea:focus{min-height:130px;min-width:520px}
.flow-stage-aduana .aduana-action-panel{margin-top:0;padding:14px 14px 12px}
.flow-stage-aduana .aduana-settings-grid{grid-template-columns:minmax(240px,1.35fr) repeat(5,minmax(125px,1fr)) minmax(135px,.8fr)}
.flow-stage-aduana .aduana-action-buttons{grid-template-columns:repeat(7,minmax(120px,1fr))}
.compras-page.flow-stage-aduana .aduana-field input[type="date"]{font-size:12px;padding-left:8px;padding-right:6px}

.flow-stage-faturar .pedidos-table{min-width:1180px}
.flow-stage-faturar .pedidos-table th:nth-child(1),.flow-stage-faturar .pedidos-table td:nth-child(1){width:150px}
.flow-stage-faturar .pedidos-table th:nth-child(3),.flow-stage-faturar .pedidos-table td:nth-child(3){width:300px}
.flow-stage-faturar .pedidos-table th:nth-child(4),.flow-stage-faturar .pedidos-table td:nth-child(4){width:275px}
.flow-stage-faturar .pedidos-table th:nth-child(5),.flow-stage-faturar .pedidos-table td:nth-child(5){width:190px}
.flow-stage-faturar .pedidos-table th:nth-child(6),.flow-stage-faturar .pedidos-table td:nth-child(6){width:125px}
.flow-stage-faturar .pedidos-table th:nth-child(7),.flow-stage-faturar .pedidos-table td:nth-child(7){width:125px}
.flow-stage-faturar .pedidos-table th:nth-child(8),.flow-stage-faturar .pedidos-table td:nth-child(8){width:100px}
.flow-stage-faturar .pedidos-table th:nth-child(9),.flow-stage-faturar .pedidos-table td:nth-child(9){width:100px}
.flow-stage-faturar .faturar-nf-cell{display:grid;grid-template-columns:92px 1fr;align-items:center;gap:8px;min-width:0}
.flow-stage-faturar .faturar-nf-fields{grid-template-columns:1fr 1fr;gap:6px;min-width:0}
.flow-stage-faturar .faturar-mini-field{padding:6px 7px}

.compras-report-modal{width:min(1080px,calc(100vw - 80px));height:min(78vh,720px);max-height:min(78vh,720px);display:flex!important;flex-direction:column!important;overflow:hidden!important;padding:0!important}
.compras-report-modal .modal-header{align-items:flex-start;flex:0 0 auto;padding:18px 22px 12px;border-bottom:1px solid #e7edf6}
.compras-report-modal .modal-header p{margin:4px 0 0;color:#64748b;font-size:13px}
.compras-report-body{display:flex!important;flex-direction:column!important;gap:12px;flex:1 1 auto;min-height:0;overflow-y:auto!important;overflow-x:hidden!important;padding:14px 20px 20px!important}
.compras-report-body::-webkit-scrollbar{width:12px}
.compras-report-body::-webkit-scrollbar-thumb{background:#b8c7d9;border-radius:999px;border:3px solid #fff}
.compras-report-body::-webkit-scrollbar-track{background:#eef4fb;border-radius:999px}
.compras-report-group{border:1px solid #dbe6f3;border-radius:14px;background:#fff;overflow:hidden;flex:0 0 auto}
.compras-report-group header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;background:#f8fbff;border-bottom:1px solid #e6eef8}
.compras-report-group header div{display:flex;flex-direction:column;gap:3px}
.compras-report-group header strong{font-size:15px;color:#0f172a}
.compras-report-group header span{font-size:12px;color:#64748b;font-weight:700}
.compras-report-items{display:flex;flex-direction:column}
.compras-report-greeting{padding:10px 14px;font-weight:900;color:#0f172a;border-top:1px solid #edf2f7;background:#fbfdff}
.compras-report-item{display:grid;grid-template-columns:70px minmax(0,1fr) 180px;gap:12px;align-items:start;padding:10px 14px;border-top:1px solid #edf2f7;font-size:13px}
.compras-report-qty{font-weight:900;color:#0f172a;white-space:nowrap}
.compras-report-title{color:#253247;line-height:1.28;white-space:normal;overflow-wrap:anywhere}
.compras-report-sku{font-family:Courier New,monospace;color:#475569;white-space:normal;overflow-wrap:anywhere}

/* Esteira */
.esteira-page{padding:18px 20px 44px}
.esteira-shell{background:#fff;border:1px solid #dfe7f1;border-radius:18px;padding:18px;box-shadow:0 10px 26px #0f172a0d}
.esteira-header{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:18px}
.esteira-eyebrow{display:block;text-transform:uppercase;color:#4f35d5;font-weight:900;font-size:12px;letter-spacing:.04em;margin-bottom:10px}
.esteira-header h1{margin:0;color:#0f172a;font-size:22px;line-height:1.15}
.esteira-header p{margin:4px 0 0;color:#64748b;font-size:13px}
.esteira-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.esteira-actions input{min-height:38px;padding:8px 10px;border:1px solid #d8e2ef;border-radius:10px;background:#fff}
.esteira-grid{display:grid;grid-template-columns:repeat(5,minmax(150px,1fr));gap:12px}
.esteira-card,.esteira-critical{border:1px solid #dbe5f0;border-radius:14px;background:#fff;padding:14px;min-height:150px;display:flex;flex-direction:column;gap:4px}
.esteira-card span{font-weight:900;color:#3150db;font-size:13px}
.esteira-card strong{font-size:28px;line-height:1;color:#020617}
.esteira-card small{font-size:13px;color:#475569}
.esteira-card-lines{display:flex;flex-direction:column;gap:7px;margin:10px 0 auto}
.esteira-card-lines em{display:inline-flex;width:max-content;max-width:100%;border-radius:999px;padding:4px 8px;font-style:normal;font-size:11px;font-weight:900;line-height:1.1}
.esteira-card-lines .warn{background:#ffedd5;color:#c2410c}
.esteira-card-lines .info{background:#dbeafe;color:#1d4ed8}
.esteira-card-lines .danger{background:#fee2e2;color:#b91c1c}
.esteira-card-lines .success{background:#dcfce7;color:#166534}
.esteira-card button,.esteira-view-all{margin-top:auto;border:1px solid #d8e2ef;background:#fff;color:#4f35d5;border-radius:9px;min-height:32px;font-weight:900;cursor:pointer}
.esteira-card-purple span{color:#6d35f3}.esteira-card-orange span{color:#ea580c}.esteira-card-green span{color:#047857}.esteira-card-indigo span{color:#4338ca}
.esteira-critical{grid-column:span 2;min-height:150px}
.esteira-critical h2{font-size:14px;margin:0 0 10px;color:#0f172a}
.esteira-critical div{display:flex;flex-direction:column;gap:8px}
.esteira-critical button:not(.esteira-view-all){display:grid;grid-template-columns:18px 30px minmax(0,1fr);align-items:center;gap:8px;border:0;background:transparent;color:#334155;text-align:left;cursor:pointer;padding:0;font-size:13px}
.esteira-critical button span{display:grid;place-items:center;width:16px;height:16px;border-radius:999px;border:1px solid #fb923c;color:#f97316;font-size:10px;font-weight:900}
.esteira-critical button strong{font-size:13px;color:#0f172a}
.esteira-critical button em{font-style:normal;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.esteira-view-all{align-self:flex-end;padding:0 12px}
@media (max-width:1200px){.esteira-grid{grid-template-columns:repeat(3,minmax(150px,1fr))}.esteira-critical{grid-column:span 2}}
@media (max-width:760px){.esteira-header{flex-direction:column}.esteira-grid{grid-template-columns:1fr}.esteira-critical{grid-column:auto}.compras-report-modal{width:calc(100vw - 28px);height:calc(100vh - 64px)}.compras-report-item{grid-template-columns:1fr}.compras-report-sku{font-size:12px}}

/* Compras: alinhamento final da linha em tabela real */
.flow-stage-compras .pedidos-table-container{overflow-x:auto}
.flow-stage-compras .pedidos-table{width:100%;min-width:0;table-layout:fixed;border-collapse:separate;border-spacing:0}
.flow-stage-compras .compras-col-date{width:86px}
.flow-stage-compras .compras-col-code{width:106px}
.flow-stage-compras .compras-col-term{width:76px}
.flow-stage-compras .compras-col-product{width:210px}
.flow-stage-compras .compras-col-qty{width:46px}
.flow-stage-compras .compras-col-value{width:78px}
.flow-stage-compras .compras-col-source{width:106px}
.flow-stage-compras .compras-col-ref{width:82px}
.flow-stage-compras .compras-col-cost{width:74px}
.flow-stage-compras .compras-col-ncm{width:60px}
.flow-stage-compras .compras-col-ean{width:60px}
.flow-stage-compras .compras-col-address{width:58px}
.flow-stage-compras .compras-col-status{width:84px}
.flow-stage-compras .compras-col-marketplace{width:76px}
.flow-stage-compras .compras-col-regress{width:76px}
.flow-stage-compras .compras-col-actions{width:96px}
.flow-stage-compras .pedidos-table th,.flow-stage-compras .pedidos-table td{box-sizing:border-box;display:table-cell;padding:8px 7px;vertical-align:middle;overflow:hidden}
.flow-stage-compras .pedidos-table tbody tr{height:78px}
.flow-stage-compras .pedidos-table th:nth-child(1),.flow-stage-compras .pedidos-table td:nth-child(1){width:86px}
.flow-stage-compras .pedidos-table th:nth-child(2),.flow-stage-compras .pedidos-table td:nth-child(2){width:106px}
.flow-stage-compras .pedidos-table th:nth-child(3),.flow-stage-compras .pedidos-table td:nth-child(3){width:76px}
.flow-stage-compras .pedidos-table th:nth-child(4),.flow-stage-compras .pedidos-table td:nth-child(4){width:210px}
.flow-stage-compras .pedidos-table th:nth-child(5),.flow-stage-compras .pedidos-table td:nth-child(5){width:46px}
.flow-stage-compras .pedidos-table th:nth-child(6),.flow-stage-compras .pedidos-table td:nth-child(6){width:78px}
.flow-stage-compras .pedidos-table th:nth-child(7),.flow-stage-compras .pedidos-table td:nth-child(7){width:106px}
.flow-stage-compras .pedidos-table th:nth-child(8),.flow-stage-compras .pedidos-table td:nth-child(8){width:82px}
.flow-stage-compras .pedidos-table th:nth-child(9),.flow-stage-compras .pedidos-table td:nth-child(9){width:74px}
.flow-stage-compras .pedidos-table th:nth-child(10),.flow-stage-compras .pedidos-table td:nth-child(10){width:60px}
.flow-stage-compras .pedidos-table th:nth-child(11),.flow-stage-compras .pedidos-table td:nth-child(11){width:60px}
.flow-stage-compras .pedidos-table th:nth-child(12),.flow-stage-compras .pedidos-table td:nth-child(12){width:58px}
.flow-stage-compras .pedidos-table th:nth-child(13),.flow-stage-compras .pedidos-table td:nth-child(13){width:84px}
.flow-stage-compras .pedidos-table th:nth-child(14),.flow-stage-compras .pedidos-table td:nth-child(14){width:76px}
.flow-stage-compras .pedidos-table th:nth-child(15),.flow-stage-compras .pedidos-table td:nth-child(15){width:76px}
.flow-stage-compras .pedidos-table th:nth-child(16),.flow-stage-compras .pedidos-table td:nth-child(16){width:96px;position:sticky;right:0;z-index:4;background:#fff;box-shadow:-10px 0 16px -14px #0f172a73;overflow:visible}
.flow-stage-compras .pedidos-table th:nth-child(16){z-index:6;background:#f8fafc}
.flow-stage-compras .flow-date-cell{font-size:11px;line-height:1.18;white-space:normal;font-weight:800;color:#0f172a}
.flow-stage-compras .flow-order-cell{font-family:inherit;color:#0f172a}
.flow-stage-compras .flow-order-cell strong{display:block;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:11px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#0057d8}
.flow-stage-compras .flow-order-cell small{display:inline-flex;max-width:100%;margin-top:5px;border-radius:999px;background:#eef4ff;color:#24435f;font-size:10px;line-height:1.1;padding:3px 6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.flow-stage-compras .product-cell{display:table-cell;max-width:none;min-width:0}
.flow-stage-compras .flow-product-wrap{display:grid;grid-template-columns:42px minmax(0,1fr);align-items:center;gap:9px;min-width:0}
.flow-stage-compras .flow-product-thumb-wrap{position:relative;display:inline-flex;width:42px;height:42px;align-items:center;justify-content:center;overflow:visible}
.flow-stage-compras .product-thumb{width:38px;height:38px;border-radius:9px}
.flow-stage-compras .sku-origin-badge{display:inline-flex;align-items:center;justify-content:center;background:#ffe600;color:#1f2937;border:1px solid #c9ab00;font-size:8.5px;font-weight:950;letter-spacing:.02em;line-height:1}
.flow-stage-compras .flow-product-sku-origin{position:absolute;right:-5px;bottom:-5px;width:22px;height:18px;min-width:22px;border-radius:6px;box-shadow:0 2px 7px #0f172a33}
.flow-stage-compras .product-name{display:-webkit-box;max-width:none;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;white-space:normal;font-size:12px;font-weight:800;line-height:1.2;color:#0f172a}
.flow-stage-compras .product-name-link{color:#0057d8;text-decoration:none}
.flow-stage-compras .product-name-link:hover{text-decoration:underline}.flow-stage-compras .product-name-copy{border:0;background:transparent;padding:0;text-align:left;font:inherit;cursor:copy;color:#0057d8!important;-webkit-text-fill-color:#0057d8!important;appearance:none}.flow-stage-compras .product-name-copy:hover{text-decoration:underline!important}
.flow-stage-compras .quantity-cell{text-align:center}
.flow-stage-compras .quantity-badge{display:inline-flex;align-items:center;justify-content:center;min-width:34px;height:28px;padding:0 8px;border-radius:999px;background:#eef4ff;color:#24435f;border:1px solid #d7e5fb;font-size:12px;font-weight:900;line-height:1}
.flow-stage-compras .quantity-cell.is-multiple .quantity-badge{background:#fff3d6;color:#b45309;border-color:#f59e0b;box-shadow:0 0 0 2px #fbbf2426}
.flow-stage-compras .value-cell{font-size:12px;font-weight:900;color:#132238;white-space:nowrap}
.flow-stage-compras .term-field .flow-input-shell,.flow-stage-faturar .term-field .flow-input-shell{min-height:42px}
.flow-stage-compras .flow-input-shell{min-height:48px;padding:6px 7px;border-radius:9px}
.flow-stage-compras .flow-input-label{font-size:8.5px;line-height:1;letter-spacing:.03em}
.flow-stage-compras .flow-input{font-size:11.5px;line-height:1.15}
.flow-stage-compras .status-cell{display:table-cell;text-align:center}
.flow-stage-compras .status-badge{display:inline-flex;max-width:100%;min-width:0;min-height:26px;padding:6px 10px;border-radius:999px;font-size:11px;line-height:1.05;white-space:nowrap}
.flow-stage-compras .marketplace-cell{display:flex;align-items:center;justify-content:center;gap:5px;min-width:0;font-size:10.5px;line-height:1.1;text-align:center;color:#334155}
.flow-stage-compras .marketplace-logo{width:20px;height:20px;min-width:20px;border-radius:6px;flex:0 0 20px}
.flow-stage-compras .marketplace-logo:before{inset:2px}
.flow-stage-compras .marketplace-logo-mercadolivre:before{inset:1px}
.flow-stage-compras .marketplace-label{display:block;min-width:0;max-width:62px;overflow:hidden;text-overflow:ellipsis;white-space:normal;font-weight:700}
.flow-stage-compras .actions{display:grid;grid-template-columns:1fr;gap:5px;min-width:0}
.flow-stage-compras .actions .button{width:100%;min-width:0;min-height:28px;padding:6px 7px;border-radius:9px;font-size:11px;line-height:1.05;white-space:normal}
.flow-stage-compras .actions .compras-remove-button{background:#dc2626;color:#fff;border:1px solid #dc2626}
.flow-stage-compras .actions .compras-remove-button:disabled{opacity:.55;cursor:not-allowed}
@media (max-width:1280px){
  .flow-stage-compras .pedidos-table-container{overflow-x:auto}
  .flow-stage-compras .pedidos-table{min-width:1340px}
}

/* Esteira: alinhamento final por colgroup para etapas depois de Compras */
.compras-page.flow-stage-aduana .pedidos-table-container,
.compras-page.flow-stage-faturar .pedidos-table-container,
.compras-page.flow-stage-despachar .pedidos-table-container,
.compras-page.flow-stage-em_transito .pedidos-table-container,
.compras-page.flow-stage-finalizados .pedidos-table-container{
  overflow-x:hidden;
}
.compras-page.flow-stage-aduana .pedidos-table,
.compras-page.flow-stage-faturar .pedidos-table,
.compras-page.flow-stage-despachar .pedidos-table,
.compras-page.flow-stage-em_transito .pedidos-table,
.compras-page.flow-stage-finalizados .pedidos-table{
  width:100%;
  min-width:0!important;
  table-layout:fixed;
  border-collapse:separate;
  border-spacing:0;
}
.compras-page.flow-stage-aduana .pedidos-table th,
.compras-page.flow-stage-aduana .pedidos-table td,
.compras-page.flow-stage-faturar .pedidos-table th,
.compras-page.flow-stage-faturar .pedidos-table td,
.compras-page.flow-stage-despachar .pedidos-table th,
.compras-page.flow-stage-despachar .pedidos-table td,
.compras-page.flow-stage-em_transito .pedidos-table th,
.compras-page.flow-stage-em_transito .pedidos-table td,
.compras-page.flow-stage-finalizados .pedidos-table th,
.compras-page.flow-stage-finalizados .pedidos-table td{
  display:table-cell;
  box-sizing:border-box;
  vertical-align:middle;
  overflow:hidden;
  text-overflow:ellipsis;
}
.compras-page.flow-stage-aduana .pedidos-table tbody tr,
.compras-page.flow-stage-faturar .pedidos-table tbody tr,
.compras-page.flow-stage-despachar .pedidos-table tbody tr,
.compras-page.flow-stage-em_transito .pedidos-table tbody tr,
.compras-page.flow-stage-finalizados .pedidos-table tbody tr{
  height:78px;
}
.compras-page.flow-stage-aduana .flow-order-cell,
.compras-page.flow-stage-faturar .flow-order-cell,
.compras-page.flow-stage-despachar .flow-order-cell,
.compras-page.flow-stage-em_transito .flow-order-cell,
.compras-page.flow-stage-finalizados .flow-order-cell{
  min-width:0!important;
}
.compras-page.flow-stage-aduana .flow-order-cell strong,
.compras-page.flow-stage-faturar .flow-order-cell strong,
.compras-page.flow-stage-despachar .flow-order-cell strong,
.compras-page.flow-stage-em_transito .flow-order-cell strong,
.compras-page.flow-stage-finalizados .flow-order-cell strong,
.compras-page.flow-stage-aduana .flow-order-cell small,
.compras-page.flow-stage-faturar .flow-order-cell small,
.compras-page.flow-stage-despachar .flow-order-cell small,
.compras-page.flow-stage-em_transito .flow-order-cell small,
.compras-page.flow-stage-finalizados .flow-order-cell small{
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.compras-page.flow-stage-faturar .flow-product-wrap,
.compras-page.flow-stage-despachar .flow-product-wrap,
.compras-page.flow-stage-em_transito .flow-product-wrap,
.compras-page.flow-stage-finalizados .flow-product-wrap{
  display:grid;
  grid-template-columns:42px minmax(0,1fr);
  align-items:center;
  gap:10px;
  min-width:0;
}
.compras-page.flow-stage-faturar .product-name,
.compras-page.flow-stage-despachar .product-name,
.compras-page.flow-stage-em_transito .product-name,
.compras-page.flow-stage-finalizados .product-name{
  display:-webkit-box;
  max-width:100%;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
  white-space:normal;
  line-height:1.22;
}
.compras-page.flow-stage-aduana .flow-input-shell,
.compras-page.flow-stage-faturar .faturar-mini-field{
  width:100%;
  min-width:0!important;
  box-sizing:border-box;
}
.compras-page.flow-stage-aduana .flow-title-textarea{
  width:100%;
  min-width:0!important;
  min-height:58px;
  resize:vertical;
}
.compras-page.flow-stage-aduana .flow-title-textarea:focus{
  min-width:0!important;
  min-height:118px;
}
.compras-page.flow-stage-faturar .faturar-nf-cell{
  display:grid;
  grid-template-columns:92px minmax(0,1fr);
  align-items:center;
  gap:8px;
  width:100%;
  min-width:0;
}
.compras-page.flow-stage-faturar .faturar-nf-fields{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:6px;
  min-width:0;
}
.compras-page.flow-stage-faturar .faturar-mini-field span,
.compras-page.flow-stage-faturar .faturar-status-readonly{
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
}
.compras-page.flow-stage-aduana .actions,
.compras-page.flow-stage-faturar .actions,
.compras-page.flow-stage-despachar .actions,
.compras-page.flow-stage-em_transito .actions,
.compras-page.flow-stage-finalizados .actions{
  display:flex;
  flex-direction:column;
  gap:6px;
  align-items:stretch;
}
.compras-page.flow-stage-aduana .actions .button,
.compras-page.flow-stage-faturar .actions .button,
.compras-page.flow-stage-despachar .actions .button,
.compras-page.flow-stage-em_transito .actions .button,
.compras-page.flow-stage-finalizados .actions .button{
  width:100%;
  min-width:0;
  white-space:normal;
}
.aduana-col-code{width:120px}.aduana-col-title{width:238px}.aduana-col-ref{width:118px}.aduana-col-qty{width:70px}.aduana-col-source{width:122px}.aduana-col-ncm{width:90px}.aduana-col-ean{width:108px}.aduana-col-weight{width:88px}.aduana-col-price{width:98px}.aduana-col-nf{width:104px}.aduana-col-status{width:100px}.aduana-col-regress{width:116px}
.faturar-col-code{width:135px}.faturar-col-term{width:92px}.faturar-col-product{width:235px}.faturar-col-ncm{width:108px}.faturar-col-ean{width:122px}.faturar-col-nf{width:270px}.faturar-col-client{width:150px}.faturar-col-status{width:105px}.faturar-col-marketplace{width:95px}.faturar-col-regress{width:86px}.faturar-col-action{width:95px}
.despachar-col-code{width:145px}.despachar-col-product{width:255px}.despachar-col-ean{width:118px}.despachar-col-ect{width:250px}.despachar-col-client{width:165px}.despachar-col-status{width:112px}.despachar-col-deadline{width:86px}.despachar-col-marketplace{width:105px}.despachar-col-regress{width:95px}.despachar-col-action{width:105px}
.flow-ean-readonly-cell{font-weight:700;color:#0f172a;white-space:normal;word-break:break-word}.flow-readonly-code{display:inline-flex;align-items:center;min-height:32px;padding:6px 8px;border-radius:10px;background:#f8fafc;border:1px solid #d8e4f7;color:#0f172a}
.flow-col-code{width:145px}.flow-col-product{width:330px}.flow-col-client{width:190px}.flow-col-status{width:110px}.flow-col-tracking-status{width:210px}.flow-col-deadline{width:95px}.flow-col-marketplace{width:110px}.flow-col-regress{width:100px}
.tracking-status-cell{min-width:190px}
.tracking-status-button{width:100%;display:flex;flex-direction:column;align-items:flex-start;gap:3px;border:1px solid #bfdbfe;background:#eff6ff;color:#1e3a8a;border-radius:12px;padding:8px 10px;cursor:pointer;text-align:left;line-height:1.15}
.tracking-status-button:disabled{cursor:not-allowed;opacity:.65}
.tracking-status-button strong{font-size:12px;font-weight:900;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tracking-status-button small{font-size:10px;color:#475569;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tracking-history-modal{max-width:820px;max-height:min(720px,calc(var(--app-dvh, 100dvh) - 48px))}
.tracking-history-modal .modal-header p{margin:4px 0 0;color:#64748b;font-size:13px}
.tracking-history-body{padding-top:10px}
.tracking-history-list{display:grid;gap:8px}
.tracking-history-event{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(160px,.7fr);gap:14px;align-items:center;padding:10px 12px;border:1px solid #e2e8f0;border-radius:12px;background:#f8fafc}
.tracking-history-event strong,.tracking-history-event span{display:block;color:#0f172a;font-size:13px;font-weight:800}
.tracking-history-event small{display:block;margin-top:3px;color:#64748b;font-size:11px}
@media (max-width:768px){.tracking-history-event{grid-template-columns:1fr}.tracking-status-cell{min-width:0}.tracking-status-button strong{white-space:normal}}

/* Esteira: cabeçalho compacto das etapas de pedidos */
.compras-page[class*="flow-stage-"] .pedidos-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-height:0!important;
  margin:0 0 10px!important;
  padding:10px 14px!important;
  border-radius:14px;
}
.compras-page[class*="flow-stage-"] .pedidos-header > div:first-child{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
  flex:1 1 auto;
  flex-wrap:wrap;
}
.compras-page[class*="flow-stage-"] .flow-step-badge{
  margin:0!important;
  flex:0 0 auto;
  padding:5px 8px;
  line-height:1;
}
.compras-page[class*="flow-stage-"] .pedidos-header h1{
  margin:0!important;
  font-size:22px!important;
  line-height:1.05!important;
  white-space:nowrap;
}
.compras-page[class*="flow-stage-"] .page-subtitle{
  margin:0!important;
  font-size:12px!important;
  line-height:1.2;
  color:#64748b;
  min-width:0;
  max-width:520px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.compras-page[class*="flow-stage-"] .flow-header-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex:0 0 auto;
}
.compras-page[class*="flow-stage-"] .flow-header-actions .refresh-button{
  min-height:34px;
  padding:7px 12px;
  font-size:12px;
}
@media (max-width:1100px){
  .compras-page[class*="flow-stage-"] .page-subtitle{display:none}
}
.aduana-manual-panel{
  margin-top:12px;
  padding:12px;
  border:1px dashed #b7c9dc;
  border-radius:12px;
  background:#f8fbff;
}
.aduana-manual-title{
  display:flex;
  align-items:baseline;
  gap:10px;
  margin-bottom:10px;
  flex-wrap:wrap;
}
.aduana-manual-title strong{
  color:#0f172a;
  font-size:14px;
}
.aduana-manual-title span{
  color:#64748b;
  font-size:12px;
}
.aduana-manual-grid{
  display:grid;
  grid-template-columns:minmax(190px,1fr) minmax(280px,2fr) minmax(130px,.8fr) 86px 150px;
  gap:10px;
  align-items:end;
}
.aduana-manual-grid .button{
  min-height:38px;
  width:100%;
}
@media (max-width:1200px){
  .aduana-manual-grid{
    grid-template-columns:repeat(2,minmax(180px,1fr));
  }
}

.flow-stage-aduana-arquivados .compras-table-shell {
  overflow-x: auto;
}

/* Ondax UX 2026-06-26: ajustes apenas visuais nas etapas de pedidos */
@media (min-width:769px){
  .compras-page[class*="flow-stage-"]{
    padding-top:10px!important;
  }
  .compras-page[class*="flow-stage-"] .pedidos-header{
    min-height:0!important;
    padding:8px 12px!important;
    margin-bottom:8px!important;
    align-items:center!important;
  }
  .compras-page[class*="flow-stage-"] .pedidos-header h1{
    font-size:20px!important;
  }
  .compras-page[class*="flow-stage-"] .page-subtitle{
    max-width:720px!important;
  }
  .compras-page[class*="flow-stage-"] .pedidos-table-container{
    border-radius:14px!important;
    overflow-x:hidden!important;
  }
  .compras-page[class*="flow-stage-"] .pedidos-table th{
    height:34px!important;
    padding:7px 7px!important;
    font-size:10px!important;
  }
  .compras-page[class*="flow-stage-"] .pedidos-table td{
    padding:7px 7px!important;
    font-size:12px!important;
  }
  .compras-page[class*="flow-stage-"] .pedidos-table tbody tr{
    height:70px!important;
  }
  .compras-page[class*="flow-stage-"] .flow-input-shell,
  .compras-page[class*="flow-stage-"] .faturar-mini-field{
    min-height:44px!important;
    padding:5px 7px!important;
    border-radius:9px!important;
  }
  .compras-page[class*="flow-stage-"] .flow-input,
  .compras-page[class*="flow-stage-"] input,
  .compras-page[class*="flow-stage-"] select,
  .compras-page[class*="flow-stage-"] textarea{
    font-size:12px!important;
  }
  .compras-page[class*="flow-stage-"] .flow-input-label{
    font-size:9px!important;
  }
  .compras-page[class*="flow-stage-"] .actions{
    gap:5px!important;
  }
  .compras-page[class*="flow-stage-"] .actions .button{
    min-height:28px!important;
    padding:5px 8px!important;
    font-size:11px!important;
    line-height:1.05!important;
  }
  .compras-page[class*="flow-stage-"] .status-badge{
    width:max-content!important;
    max-width:100%!important;
    padding:5px 10px!important;
    line-height:1!important;
  }
  .compras-page.flow-stage-faturar .pedidos-table{
    min-width:0!important;
    table-layout:fixed!important;
  }
  .faturar-col-code{width:116px!important}
  .faturar-col-product{width:230px!important}
  .faturar-col-ncm{width:96px!important}
  .faturar-col-ean{width:112px!important}
  .faturar-col-nf{width:238px!important}
  .faturar-col-client{width:136px!important}
  .faturar-col-status{width:104px!important}
  .faturar-col-marketplace{width:88px!important}
  .faturar-col-regress{width:82px!important}
  .faturar-col-action{width:88px!important}
  .compras-page.flow-stage-faturar .faturar-nf-cell{
    grid-template-columns:78px minmax(0,1fr)!important;
    gap:6px!important;
  }
  .compras-page.flow-stage-faturar .faturar-nf-cell .button{
    min-width:0!important;
    width:78px!important;
    height:32px!important;
    padding:5px 6px!important;
    font-size:11px!important;
  }
  .compras-page.flow-stage-faturar .faturar-nf-fields{
    gap:5px!important;
  }
  .compras-page.flow-stage-faturar .product-name{
    -webkit-line-clamp:2!important;
    font-size:12px!important;
  }
  .compras-page.flow-stage-faturar .flow-product-wrap{
    grid-template-columns:36px minmax(0,1fr)!important;
    gap:8px!important;
  }
  .compras-page.flow-stage-faturar .product-thumb{
    width:36px!important;
    height:36px!important;
  }
  .compras-page.flow-stage-aduana .aduana-action-panel{
    padding:10px 12px!important;
    margin-bottom:10px!important;
    background:linear-gradient(180deg,#fff,#f8fbff)!important;
  }
  .compras-page.flow-stage-aduana .aduana-settings-grid{
    gap:8px!important;
  }
  .compras-page.flow-stage-aduana .aduana-action-buttons{
    gap:7px!important;
  }
  .compras-page.flow-stage-aduana .flow-title-textarea{
    min-height:52px!important;
  }
  .compras-page.flow-stage-aduana .flow-title-textarea:focus{
    min-height:96px!important;
    position:relative;
    z-index:3;
  }
}

.aduana-archive-table th,
.aduana-archive-table td {
  vertical-align: middle;
  white-space: nowrap;
}

.aduana-archive-table td small {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
}

.aduana-archive-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 360px;
}

.aduana-archive-actions .button {
  min-height: 34px;
  padding: 8px 12px;
}

.button.disabled,
.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  pointer-events: none;
}

/* Aduana: famílias visuais de ações sem alterar lógica dos botões */
.compras-page.flow-stage-aduana .aduana-action-buttons .button{
  border:1px solid transparent!important;
  transition:filter .15s ease,opacity .15s ease,transform .15s ease,box-shadow .15s ease!important;
}

.compras-page.flow-stage-aduana .aduana-action-buttons .button:nth-child(1){
  background:#7c2d12!important;
  border-color:#7c2d12!important;
  color:#fff!important;
  box-shadow:0 10px 22px rgba(124,45,18,.18)!important;
}

.compras-page.flow-stage-aduana .aduana-action-buttons .button:nth-child(2){
  background:#ffedd5!important;
  border-color:#fdba74!important;
  color:#9a3412!important;
  box-shadow:0 8px 18px rgba(251,146,60,.12)!important;
}

.compras-page.flow-stage-aduana .aduana-action-buttons .button:nth-child(3){
  background:#1d4ed8!important;
  border-color:#1d4ed8!important;
  color:#fff!important;
  box-shadow:0 10px 22px rgba(29,78,216,.18)!important;
}

.compras-page.flow-stage-aduana .aduana-action-buttons .button:nth-child(4){
  background:#166534!important;
  border-color:#166534!important;
  color:#fff!important;
  box-shadow:0 10px 22px rgba(22,101,52,.18)!important;
}

.compras-page.flow-stage-aduana .aduana-action-buttons .button:nth-child(5){
  background:#dcfce7!important;
  border-color:#86efac!important;
  color:#166534!important;
  box-shadow:0 8px 18px rgba(34,197,94,.12)!important;
}

.compras-page.flow-stage-aduana .aduana-action-buttons .button:nth-child(6){
  background:#6d28d9!important;
  border-color:#6d28d9!important;
  color:#fff!important;
  box-shadow:0 10px 22px rgba(109,40,217,.18)!important;
}

.compras-page.flow-stage-aduana .aduana-action-buttons .button:nth-child(7),
.compras-page.flow-stage-aduana .aduana-action-buttons .button:nth-child(8){
  background:#ede9fe!important;
  border-color:#c4b5fd!important;
  color:#5b21b6!important;
  box-shadow:0 8px 18px rgba(124,58,237,.12)!important;
}

.compras-page.flow-stage-aduana .aduana-action-buttons .button:nth-child(9){
  background:#0f766e!important;
  border-color:#0f766e!important;
  color:#fff!important;
  box-shadow:0 10px 22px rgba(15,118,110,.18)!important;
}

.compras-page.flow-stage-aduana .aduana-action-buttons .button:nth-child(10){
  background:#334155!important;
  border-color:#334155!important;
  color:#fff!important;
  box-shadow:0 10px 22px rgba(51,65,85,.18)!important;
}

.compras-page.flow-stage-aduana .aduana-action-buttons .button:disabled,
.compras-page.flow-stage-aduana .aduana-action-buttons .button.disabled{
  opacity:.44!important;
  filter:saturate(.65) brightness(1.08)!important;
}

@media (hover:hover){
  .compras-page.flow-stage-aduana .aduana-action-buttons .button:not(:disabled):not(.disabled):hover{
    filter:brightness(.96)!important;
    transform:translateY(-1px)!important;
  }
}

/* Aduana Arquivados: layout remodelado sem tocar nos fluxos operacionais */
.archive-page{
  padding:14px 18px 26px;
  color:#0f172a;
}

.archive-hero{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:14px;
  padding:14px 18px;
  box-shadow:0 8px 24px rgba(15,23,42,.05);
}

.archive-hero-title{
  display:flex;
  align-items:center;
  gap:12px;
}

.archive-hero-icon{
  display:grid;
  place-items:center;
  width:42px;
  height:42px;
  border-radius:12px;
  background:#f3e8ff;
  color:#6d28d9;
  font-size:24px;
  font-weight:900;
}

.archive-hero h1{
  margin:0;
  font-size:22px;
  line-height:1.1;
}

.archive-hero p{
  margin:4px 0 0;
  color:#64748b;
  font-size:13px;
}

.archive-refresh{
  border:0;
  border-radius:10px;
  background:#0f766e;
  color:#fff;
  min-height:38px;
  padding:0 18px;
  font-weight:800;
  box-shadow:0 10px 20px rgba(15,118,110,.16);
}

.archive-refresh:disabled{
  opacity:.55;
  cursor:not-allowed;
}

.archive-filters{
  display:grid;
  grid-template-columns:minmax(150px,1fr) minmax(190px,1.1fr) minmax(160px,1fr) minmax(260px,1.8fr) auto;
  gap:12px;
  align-items:end;
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:14px;
  margin-top:14px;
  padding:14px;
  box-shadow:0 8px 24px rgba(15,23,42,.04);
}

.archive-filters label{
  display:grid;
  gap:6px;
  margin:0;
}

.archive-filters span{
  color:#475569;
  font-size:11px;
  font-weight:800;
}

.archive-filters input,
.archive-filters select{
  height:38px;
  border:1px solid #dbe4f0;
  border-radius:10px;
  background:#fff;
  padding:0 12px;
  color:#0f172a;
  font-size:13px;
  outline:none;
}

.archive-filters input:focus,
.archive-filters select:focus{
  border-color:#8b5cf6;
  box-shadow:0 0 0 3px rgba(139,92,246,.12);
}

.archive-filter-button{
  height:38px;
  border:1px solid #c4b5fd;
  border-radius:10px;
  background:#fff;
  color:#6d28d9;
  padding:0 18px;
  font-weight:900;
}

.archive-table-card{
  margin-top:14px;
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:14px;
  overflow:visible;
  box-shadow:0 12px 28px rgba(15,23,42,.06);
}

.archive-table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  table-layout:fixed;
  font-size:12px;
}

.archive-table th{
  height:42px;
  background:#f8fafc;
  color:#475569;
  font-size:11px;
  font-weight:900;
  text-align:left;
  border-bottom:1px solid #e5e7eb;
  padding:0 10px;
  white-space:nowrap;
}

.archive-table th:nth-child(1){width:14%}
.archive-table th:nth-child(2){width:12%}
.archive-table th:nth-child(3){width:10%}
.archive-table th:nth-child(4){width:8%}
.archive-table th:nth-child(5){width:8%}
.archive-table th:nth-child(6){width:8%}
.archive-table th:nth-child(7){width:9%}
.archive-table th:nth-child(8){width:9%}
.archive-table th:nth-child(9){width:12%}
.archive-table th:nth-child(10){width:16%}
.archive-table th:nth-child(11){width:8%}

.archive-table td{
  height:54px;
  border-bottom:1px solid #eef2f7;
  padding:8px 10px;
  vertical-align:middle;
  overflow:visible;
  white-space:nowrap;
  text-overflow:ellipsis;
}

.archive-table tbody tr:hover{
  background:#fafcff;
}

.archive-clickable-row{
  cursor:pointer;
}

.archive-clickable-row.is-expanded{
  background:#f8fbff;
  box-shadow:inset 3px 0 0 #6d28d9;
}

.archive-row-hint{
  display:block;
  margin-top:3px;
  color:#64748b;
  font-size:10px;
  font-weight:700;
}

.archive-table strong{
  font-weight:900;
}

.archive-cambio-cell{
  overflow:visible;
}

.archive-cambio-edit{
  display:flex;
  align-items:center;
  gap:6px;
  min-width:96px;
}

.archive-cambio-input{
  width:88px;
  height:30px;
  border:1px solid #cbd5e1;
  border-radius:8px;
  background:#fff;
  color:#0f172a;
  font-size:12px;
  font-weight:800;
  padding:0 8px;
  outline:none;
}

.archive-cambio-input:focus{
  border-color:#2563eb;
  box-shadow:0 0 0 3px rgba(37,99,235,.12);
}

.archive-cambio-input:disabled{
  background:#f8fafc;
  color:#64748b;
}

.archive-cambio-edit small{
  color:#64748b;
  font-size:10px;
  font-weight:800;
}

.archive-doc-pills{
  display:flex;
  align-items:center;
  gap:5px;
  flex-wrap:wrap;
  min-width:160px;
}

.archive-doc-pill{
  border:1px solid #dbeafe;
  border-radius:999px;
  background:#eff6ff;
  color:#2563eb;
  padding:4px 7px;
  font-size:10px;
  font-weight:800;
  line-height:1;
  cursor:pointer;
}

.archive-doc-pill.declaracao{
  background:#dcfce7;
  border-color:#bbf7d0;
  color:#15803d;
}

.archive-doc-pill.nf_entrada,
.archive-doc-pill.nf_cancelada{
  background:#fef3c7;
  border-color:#fde68a;
  color:#92400e;
}

.archive-doc-pill.nf_py{
  background:#ede9fe;
  border-color:#ddd6fe;
  color:#6d28d9;
}

.archive-actions-menu-wrap{
  position:relative;
  display:inline-flex;
  justify-content:flex-end;
}

.archive-actions-trigger{
  height:32px;
  border:1px solid #dbe4f0;
  border-radius:8px;
  background:#fff;
  color:#334155;
  padding:0 10px;
  font-size:11px;
  font-weight:800;
}

.archive-actions-menu{
  position:absolute;
  top:38px;
  right:0;
  z-index:80;
  min-width:170px;
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:12px;
  padding:6px;
  box-shadow:0 18px 42px rgba(15,23,42,.18);
}

.archive-actions-menu button{
  display:block;
  width:100%;
  border:0;
  border-radius:8px;
  background:transparent;
  color:#dc2626;
  padding:9px 10px;
  text-align:left;
  font-size:12px;
  font-weight:800;
}

.archive-actions-menu button:last-child{
  color:#334155;
}

.archive-actions-menu button:hover{
  background:#f8fafc;
}

.archive-actions-menu hr{
  border:0;
  border-top:1px solid #eef2f7;
  margin:4px 0;
}

.archive-linked-row,
.archive-linked-row:hover,
.archive-search-match-row,
.archive-search-match-row:hover{
  background:#f8fbff!important;
}

.archive-linked-cell{
  height:auto!important;
  padding:0!important;
  white-space:normal!important;
  overflow:visible!important;
  border-bottom:1px solid #dbeafe!important;
}

.archive-search-match-row td{
  height:auto!important;
  padding:0 10px 10px!important;
  white-space:normal!important;
  overflow:visible!important;
  border-bottom:1px solid #dbeafe!important;
}

.archive-search-matches{
  display:grid;
  gap:10px;
  border:1px solid #dbeafe;
  border-radius:12px;
  background:#f8fbff;
  padding:12px;
}

.archive-search-matches-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.archive-search-matches-head strong{
  color:#0f172a;
  font-size:13px;
}

.archive-search-matches-head span{
  color:#64748b;
  font-size:11px;
  font-weight:800;
}

.archive-search-match-list{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:8px;
}

.archive-search-match-card{
  display:grid;
  gap:4px;
  border:1px solid #e2e8f0;
  border-radius:10px;
  background:#fff;
  padding:9px 10px;
  min-width:0;
}

.archive-search-match-card strong{
  display:block;
  color:#0f172a;
  font-size:12px;
  line-height:1.25;
  white-space:normal;
  overflow-wrap:anywhere;
}

.archive-search-match-card small,
.archive-search-match-card span{
  display:block;
  color:#64748b;
  font-size:11px;
  font-weight:700;
  line-height:1.25;
  white-space:normal;
  overflow-wrap:anywhere;
}

.archive-linked-panel{
  margin:0;
  padding:14px;
  border-top:1px solid #dbeafe;
  background:linear-gradient(180deg,#f8fbff,#ffffff);
}

.archive-linked-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:12px;
}

.archive-linked-head strong{
  display:block;
  font-size:14px;
  color:#0f172a;
}

.archive-linked-head span{
  display:block;
  margin-top:3px;
  color:#64748b;
  font-size:12px;
  font-weight:700;
}

.archive-linked-close{
  border:1px solid #dbe4f0;
  border-radius:9px;
  background:#fff;
  color:#334155;
  padding:7px 12px;
  font-size:12px;
  font-weight:900;
  cursor:pointer;
}

.archive-linked-empty,
.archive-linked-error{
  border:1px dashed #cbd5e1;
  border-radius:12px;
  background:#fff;
  padding:18px;
  color:#64748b;
  text-align:center;
  font-weight:700;
}

.archive-linked-error{
  border-color:#fecaca;
  background:#fef2f2;
  color:#b91c1c;
}

.archive-linked-table-wrap{
  border:1px solid #dbe4f0;
  border-radius:12px;
  overflow:auto;
  background:#fff;
}

.archive-linked-table{
  width:100%;
  min-width:980px;
  border-collapse:collapse;
  table-layout:fixed;
}

.archive-linked-table th{
  height:34px;
  background:#eef6ff;
  color:#334155;
  font-size:10px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.03em;
  padding:7px 9px;
}

.archive-linked-table td{
  height:auto;
  border-bottom:1px solid #edf2f7;
  padding:8px 9px;
  white-space:normal;
  overflow:hidden;
  vertical-align:middle;
}

.archive-linked-table tr:last-child td{
  border-bottom:0;
}

.archive-linked-table td strong{
  display:block;
  color:#0f172a;
  font-size:12px;
  line-height:1.25;
}

.archive-linked-table td small{
  display:block;
  margin-top:3px;
  color:#64748b;
  font-size:11px;
  line-height:1.25;
}

.archive-linked-product{
  display:flex;
  align-items:center;
  gap:9px;
  min-width:0;
}

.archive-linked-product img,
.archive-linked-thumb{
  width:42px;
  height:42px;
  border:1px solid #dbe4f0;
  border-radius:10px;
  background:#fff;
  object-fit:contain;
  flex:0 0 auto;
}

.archive-linked-thumb{
  display:grid;
  place-items:center;
  color:#94a3b8;
  background:#f8fafc;
}

.archive-linked-pill{
  display:inline-flex;
  align-items:center;
  width:max-content;
  max-width:100%;
  border-radius:999px;
  background:#dcfce7;
  color:#166534;
  padding:4px 8px;
  font-size:10px;
  font-weight:900;
  line-height:1;
}

.archive-linked-pill.transport{
  background:#e0f2fe;
  color:#0369a1;
}

.archive-linked-total{
  border-top:1px solid #edf2f7;
  padding:8px 10px;
  color:#475569;
  font-size:12px;
  font-weight:800;
  text-align:right;
}

.archive-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 4px 0;
  color:#64748b;
  font-size:12px;
}

.archive-pagination{
  display:flex;
  align-items:center;
  gap:8px;
}

.archive-pagination button,
.archive-pagination strong{
  display:grid;
  place-items:center;
  width:30px;
  height:30px;
  border-radius:8px;
}

.archive-pagination button{
  border:1px solid #e2e8f0;
  background:#fff;
  color:#64748b;
}

.archive-pagination strong{
  background:#6d28d9;
  color:#fff;
}

@media (max-width:1200px){
  .archive-filters{
    grid-template-columns:1fr 1fr;
  }
  .archive-search{
    grid-column:1/-1;
  }
  .archive-table{
    min-width:1180px;
  }
  .archive-table-card{
    overflow-x:auto;
  }
}

/* Faturar v2: linha-card compacta, sem alterar handlers/fluxo de emissão */
.compras-page.flow-stage-faturar .pedidos-table-container{
  overflow-x:hidden!important;
  padding:0 0 8px;
  background:transparent;
}
.compras-page.flow-stage-faturar .pedidos-table{
  display:block;
  width:100%;
  min-width:0!important;
  border-collapse:separate;
  border-spacing:0 10px;
  table-layout:auto;
}
.compras-page.flow-stage-faturar .pedidos-table colgroup{display:none}
.compras-page.flow-stage-faturar .pedidos-table thead,
.compras-page.flow-stage-faturar .pedidos-table tbody{display:block;width:100%}
.compras-page.flow-stage-faturar .pedidos-table thead tr,
.compras-page.flow-stage-faturar .pedidos-table tbody tr{
  display:grid;
  grid-template-columns:minmax(122px,.82fr) minmax(260px,1.55fr) minmax(118px,.72fr) minmax(108px,.64fr) minmax(150px,.9fr) minmax(224px,1.25fr) minmax(112px,.68fr) minmax(92px,.55fr) minmax(108px,.62fr);
  align-items:center;
  gap:12px;
  width:100%;
}
.compras-page.flow-stage-faturar .pedidos-table thead tr{
  min-height:48px;
  padding:0 18px;
  border:1px solid #e6ebf3;
  border-radius:14px 14px 0 0;
  background:#fff;
  box-shadow:0 8px 22px rgba(31,41,55,.05);
}
.compras-page.flow-stage-faturar .pedidos-table tbody tr{
  min-height:92px;
  height:auto!important;
  padding:12px 18px;
  border:1px solid #dfe6f2;
  border-left:2px solid #8b5cf6;
  border-radius:12px;
  background:#fff;
  box-shadow:0 12px 28px rgba(15,23,42,.06);
}
.compras-page.flow-stage-faturar .pedidos-table tbody tr:hover{
  border-color:#c4b5fd;
  box-shadow:0 14px 34px rgba(91,58,214,.12);
}
.compras-page.flow-stage-faturar .pedidos-table th,
.compras-page.flow-stage-faturar .pedidos-table td{
  display:block!important;
  width:auto!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  overflow:visible!important;
  text-overflow:clip!important;
  vertical-align:middle;
}
.compras-page.flow-stage-faturar .pedidos-table th{
  color:#172033;
  font-size:12px;
  font-weight:800;
  letter-spacing:.01em;
  white-space:nowrap;
}
.compras-page.flow-stage-faturar .pedidos-table th:nth-child(1){font-size:0;order:1}
.compras-page.flow-stage-faturar .pedidos-table th:nth-child(1)::after{content:"Pedido";font-size:12px}
.compras-page.flow-stage-faturar .pedidos-table th:nth-child(3){order:2}
.compras-page.flow-stage-faturar .pedidos-table th:nth-child(4){order:4}
.compras-page.flow-stage-faturar .pedidos-table th:nth-child(5){order:3}
.compras-page.flow-stage-faturar .pedidos-table th:nth-child(6){font-size:0;order:6}
.compras-page.flow-stage-faturar .pedidos-table th:nth-child(6)::after{content:"Nota fiscal / Transporte";font-size:12px}
.compras-page.flow-stage-faturar .pedidos-table th:nth-child(7){order:5}
.compras-page.flow-stage-faturar .pedidos-table th:nth-child(8){order:7}
.compras-page.flow-stage-faturar .pedidos-table th:nth-child(9){display:none!important}
.compras-page.flow-stage-faturar .pedidos-table th:nth-child(10){font-size:0;order:8}
.compras-page.flow-stage-faturar .pedidos-table th:nth-child(10)::after{content:"Voltar";font-size:12px}
.compras-page.flow-stage-faturar .pedidos-table th:nth-child(11){font-size:0;order:9}
.compras-page.flow-stage-faturar .pedidos-table th:nth-child(11)::after{content:"Ações";font-size:12px}
.compras-page.flow-stage-faturar .pedidos-table td:nth-child(1){order:1}
.compras-page.flow-stage-faturar .pedidos-table td:nth-child(3){order:2}
.compras-page.flow-stage-faturar .pedidos-table td:nth-child(4){order:4}
.compras-page.flow-stage-faturar .pedidos-table td:nth-child(5){order:3}
.compras-page.flow-stage-faturar .pedidos-table td:nth-child(6){order:6}
.compras-page.flow-stage-faturar .pedidos-table td:nth-child(7){order:5}
.compras-page.flow-stage-faturar .pedidos-table td:nth-child(8){order:7}
.compras-page.flow-stage-faturar .pedidos-table td:nth-child(9){display:none!important}
.compras-page.flow-stage-faturar .pedidos-table td:nth-child(10){order:8}
.compras-page.flow-stage-faturar .pedidos-table td:nth-child(11){order:9}
.compras-page.flow-stage-faturar .flow-order-cell{
  display:flex!important;
  flex-direction:column;
  gap:5px;
  min-width:0!important;
}
.compras-page.flow-stage-faturar .flow-order-cell strong{
  color:#075ed8;
  font-size:13px;
  line-height:1.15;
  white-space:normal!important;
  overflow-wrap:anywhere;
}
.compras-page.flow-stage-faturar .flow-order-cell small{
  display:inline-flex;
  align-self:flex-start;
  max-width:100%;
  padding:4px 8px;
  border-radius:999px;
  background:#eef4ff;
  color:#183b63;
  font-size:11px;
  font-weight:800;
  line-height:1.05;
  white-space:normal!important;
}
.compras-page.flow-stage-faturar .flow-product-wrap{
  display:grid;
  grid-template-columns:48px minmax(0,1fr);
  align-items:center;
  gap:12px;
}
.compras-page.flow-stage-faturar .flow-product-thumb-wrap{width:48px;height:48px}
.compras-page.flow-stage-faturar .product-thumb{
  width:48px!important;
  height:48px!important;
  border-radius:10px;
  object-fit:contain;
  background:#fff;
  border:1px solid #dfe7f4;
}
.compras-page.flow-stage-faturar .product-name{
  max-width:100%;
  color:#111827;
  font-size:14px;
  font-weight:800;
  line-height:1.22;
  -webkit-line-clamp:2;
}
.compras-page.flow-stage-faturar .flow-product-sku-origin{right:-8px;bottom:-8px}
.compras-page.flow-stage-faturar .flow-input-shell{
  min-height:50px;
  padding:8px 10px;
  border-radius:9px;
  background:#fff;
  border:1px solid #dbe7f7;
}
.compras-page.flow-stage-faturar .flow-input-label{
  margin-bottom:4px;
  color:#395475;
  font-size:9px;
  font-weight:900;
  letter-spacing:.04em;
}
.compras-page.flow-stage-faturar .flow-input{
  min-height:22px;
  padding:0;
  font-size:13px;
  font-weight:700;
}
.compras-page.flow-stage-faturar .faturar-nf-cell{
  display:grid!important;
  grid-template-columns:minmax(92px,.7fr) minmax(120px,1fr);
  gap:8px;
  align-items:center;
}
.compras-page.flow-stage-faturar .faturar-nf-cell>.button{
  min-width:0!important;
  width:100%;
  min-height:34px;
  padding:7px 10px;
  border-radius:9px;
  font-size:11px;
}
.compras-page.flow-stage-faturar .faturar-nf-fields{
  display:grid!important;
  grid-template-columns:1fr;
  gap:5px;
}
.compras-page.flow-stage-faturar .faturar-mini-field{
  min-height:28px;
  padding:5px 8px;
  border-radius:9px;
  border-color:#dbe7f7;
  background:#f8fbff;
}
.compras-page.flow-stage-faturar .faturar-mini-field span{
  display:none;
}
.compras-page.flow-stage-faturar .faturar-status-readonly{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:100%;
  min-height:23px;
  padding:4px 7px;
  border-radius:8px;
  font-size:11px;
  line-height:1.05;
  white-space:normal;
}
.compras-page.flow-stage-faturar .faturar-status-readonly.ok{background:#dcfce7;color:#166534}
.compras-page.flow-stage-faturar .faturar-status-readonly.pending{background:#edf2ff;color:#283593}
.compras-page.flow-stage-faturar .faturar-status-readonly.error{background:#fee2e2;color:#991b1b}
.compras-page.flow-stage-faturar .faturar-nf-cell a{
  grid-column:1/-1;
  display:inline-flex;
  align-items:center;
  color:#5b35e6;
  font-size:11px;
  font-weight:800;
}
.compras-page.flow-stage-faturar td[data-label="Cliente"]{
  color:#172033;
  font-size:13px;
  font-weight:700;
  line-height:1.22;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.compras-page.flow-stage-faturar .status-cell .status-badge{
  display:inline-flex;
  min-width:88px;
  justify-content:center;
  padding:7px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:900;
  line-height:1.1;
}
.compras-page.flow-stage-faturar .actions{
  display:grid!important;
  grid-template-columns:1fr;
  gap:8px;
  min-width:0;
}
.compras-page.flow-stage-faturar .actions .button{
  width:100%;
  min-width:0;
  min-height:34px;
  padding:7px 9px;
  border-radius:9px;
  font-size:11px;
  font-weight:900;
  line-height:1.1;
  white-space:normal;
}
@media (max-width:1450px){
  .compras-page.flow-stage-faturar .pedidos-table thead tr,
  .compras-page.flow-stage-faturar .pedidos-table tbody tr{
    grid-template-columns:124px minmax(220px,1.35fr) 118px 106px 142px minmax(206px,1.1fr) 104px 82px 98px;
    gap:9px;
    padding-left:12px;
    padding-right:12px;
  }
  .compras-page.flow-stage-faturar .product-name{font-size:13px}
  .compras-page.flow-stage-faturar .faturar-nf-cell{grid-template-columns:82px minmax(104px,1fr)}
}
@media (max-width:1180px){
  .compras-page.flow-stage-faturar .pedidos-table-container{overflow-x:auto!important}
  .compras-page.flow-stage-faturar .pedidos-table{min-width:1080px!important}
}

/* Faturar v2: corrigir rótulos substituídos no cabeçalho */
.compras-page.flow-stage-faturar .pedidos-table th:nth-child(1),
.compras-page.flow-stage-faturar .pedidos-table th:nth-child(6),
.compras-page.flow-stage-faturar .pedidos-table th:nth-child(10),
.compras-page.flow-stage-faturar .pedidos-table th:nth-child(11){
  position:relative;
  color:transparent!important;
  overflow:hidden!important;
  white-space:nowrap;
}
.compras-page.flow-stage-faturar .pedidos-table th:nth-child(1)::after,
.compras-page.flow-stage-faturar .pedidos-table th:nth-child(6)::after,
.compras-page.flow-stage-faturar .pedidos-table th:nth-child(10)::after,
.compras-page.flow-stage-faturar .pedidos-table th:nth-child(11)::after{
  position:absolute;
  left:0;
  top:50%;
  transform:translateY(-50%);
  color:#172033!important;
  font-size:12px!important;
  font-weight:800;
  text-indent:0;
  white-space:nowrap;
}
.compras-page.flow-stage-faturar .pedidos-table th:nth-child(1)::after{content:"Pedido"}
.compras-page.flow-stage-faturar .pedidos-table th:nth-child(6)::after{content:"Nota fiscal / Transporte"}
.compras-page.flow-stage-faturar .pedidos-table th:nth-child(10)::after{content:"Voltar"}
.compras-page.flow-stage-faturar .pedidos-table th:nth-child(11)::after{content:"Ações"}

/* Faturar v2: compactação visual após validação por print */
.compras-page.flow-stage-faturar .pedidos-table thead tr,
.compras-page.flow-stage-faturar .pedidos-table tbody tr{
  grid-template-columns:minmax(130px,.78fr) minmax(270px,1.35fr) minmax(118px,.6fr) minmax(106px,.55fr) minmax(150px,.78fr) minmax(330px,1.55fr) minmax(108px,.56fr) minmax(78px,.42fr) minmax(92px,.48fr);
}
.compras-page.flow-stage-faturar .pedidos-table tbody tr{
  min-height:112px;
  padding-top:10px;
  padding-bottom:10px;
}
.compras-page.flow-stage-faturar .flow-product-wrap{overflow:hidden!important}
.compras-page.flow-stage-faturar .product-name{
  white-space:normal!important;
  overflow:hidden!important;
  text-overflow:clip!important;
  word-break:normal;
  overflow-wrap:anywhere;
}
.compras-page.flow-stage-faturar .faturar-nf-cell{
  grid-template-columns:minmax(76px,.7fr) minmax(96px,1fr) minmax(92px,.8fr) minmax(96px,1fr)!important;
  gap:6px!important;
}
.compras-page.flow-stage-faturar .faturar-nf-cell>.button{
  min-height:34px;
  padding:6px 8px;
}
.compras-page.flow-stage-faturar .faturar-nf-fields{
  grid-template-columns:1fr!important;
  gap:4px!important;
}
.compras-page.flow-stage-faturar .faturar-mini-field{
  min-height:28px;
  padding:4px 7px;
}
.compras-page.flow-stage-faturar .faturar-status-readonly{
  min-height:22px;
  padding:3px 6px;
}
.compras-page.flow-stage-faturar .faturar-nf-cell small,
.compras-page.flow-stage-faturar .faturar-nf-cell a{
  grid-column:1/-1;
}
@media (max-width:1450px){
  .compras-page.flow-stage-faturar .pedidos-table thead tr,
  .compras-page.flow-stage-faturar .pedidos-table tbody tr{
    grid-template-columns:124px minmax(230px,1.2fr) 112px 100px 135px minmax(310px,1.45fr) 100px 76px 88px;
  }
}

/* Faturar v3: desenho igual ao modelo enviado, NF e transporte separados visualmente */
.compras-page.flow-stage-faturar .pedidos-table thead tr,
.compras-page.flow-stage-faturar .pedidos-table tbody tr{
  grid-template-columns:minmax(132px,.72fr) minmax(245px,1.28fr) minmax(118px,.62fr) minmax(108px,.56fr) minmax(150px,.72fr) minmax(132px,.68fr) minmax(132px,.68fr) minmax(112px,.58fr) minmax(92px,.48fr) minmax(104px,.52fr)!important;
  gap:10px!important;
  align-items:center!important;
}
.compras-page.flow-stage-faturar .pedidos-table th:nth-child(1){order:1!important}
.compras-page.flow-stage-faturar .pedidos-table th:nth-child(3){order:2!important}
.compras-page.flow-stage-faturar .pedidos-table th:nth-child(5){order:3!important}
.compras-page.flow-stage-faturar .pedidos-table th:nth-child(4){order:4!important}
.compras-page.flow-stage-faturar .pedidos-table th:nth-child(7){order:5!important}
.compras-page.flow-stage-faturar .pedidos-table th:nth-child(6){order:6!important;grid-column:span 2!important;display:grid!important;grid-template-columns:1fr 1fr!important;gap:10px!important;color:transparent!important;position:relative!important}
.compras-page.flow-stage-faturar .pedidos-table th:nth-child(6)::after{content:"Nota fiscal"!important;position:static!important;transform:none!important;color:#172033!important;font-size:12px!important}
.compras-page.flow-stage-faturar .pedidos-table th:nth-child(6)::before{content:"Transporte"!important;order:2;color:#172033!important;font-size:12px!important;font-weight:800!important;letter-spacing:.01em!important}
.compras-page.flow-stage-faturar .pedidos-table th:nth-child(8){order:8!important}
.compras-page.flow-stage-faturar .pedidos-table th:nth-child(9){display:none!important}
.compras-page.flow-stage-faturar .pedidos-table th:nth-child(10){order:9!important;color:transparent!important}
.compras-page.flow-stage-faturar .pedidos-table th:nth-child(10)::after{content:""!important}
.compras-page.flow-stage-faturar .pedidos-table th:nth-child(11){order:10!important}
.compras-page.flow-stage-faturar .pedidos-table th:nth-child(11)::after{content:"Ações"!important}
.compras-page.flow-stage-faturar .pedidos-table td:nth-child(1){order:1!important}
.compras-page.flow-stage-faturar .pedidos-table td:nth-child(3){order:2!important}
.compras-page.flow-stage-faturar .pedidos-table td:nth-child(5){order:3!important}
.compras-page.flow-stage-faturar .pedidos-table td:nth-child(4){order:4!important}
.compras-page.flow-stage-faturar .pedidos-table td:nth-child(7){order:5!important}
.compras-page.flow-stage-faturar .pedidos-table td:nth-child(6){order:6!important;grid-column:span 2!important}
.compras-page.flow-stage-faturar .pedidos-table td:nth-child(8){order:8!important}
.compras-page.flow-stage-faturar .pedidos-table td:nth-child(9){display:none!important}
.compras-page.flow-stage-faturar .pedidos-table td:nth-child(10){order:9!important}
.compras-page.flow-stage-faturar .pedidos-table td:nth-child(11){order:10!important}
.compras-page.flow-stage-faturar .faturar-nf-cell{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
  gap:10px!important;
  align-items:stretch!important;
}
.compras-page.flow-stage-faturar .faturar-nf-cell>.button:nth-of-type(1){grid-column:1!important;grid-row:1!important}
.compras-page.flow-stage-faturar .faturar-nf-cell>.faturar-nf-fields:nth-of-type(1){grid-column:1!important;grid-row:2!important}
.compras-page.flow-stage-faturar .faturar-nf-cell>small:nth-of-type(1),
.compras-page.flow-stage-faturar .faturar-nf-cell>small:nth-of-type(2){grid-column:1!important}
.compras-page.flow-stage-faturar .faturar-nf-cell>a:nth-of-type(1),
.compras-page.flow-stage-faturar .faturar-nf-cell>a:nth-of-type(2){grid-column:1!important}
.compras-page.flow-stage-faturar .faturar-nf-cell>.button:nth-of-type(2){grid-column:2!important;grid-row:1!important}
.compras-page.flow-stage-faturar .faturar-nf-cell>.faturar-nf-fields:nth-of-type(2){grid-column:2!important;grid-row:2!important}
.compras-page.flow-stage-faturar .faturar-nf-cell>a:nth-of-type(3),
.compras-page.flow-stage-faturar .faturar-nf-cell>a:nth-of-type(4){grid-column:2!important}
.compras-page.flow-stage-faturar .faturar-nf-cell>.button{
  min-height:38px!important;
  border-radius:12px!important;
  font-size:12px!important;
  font-weight:800!important;
}
.compras-page.flow-stage-faturar .faturar-nf-fields{gap:6px!important}
.compras-page.flow-stage-faturar .faturar-mini-field{
  min-height:32px!important;
  border-radius:11px!important;
  background:#f8fbff!important;
}
.compras-page.flow-stage-faturar .faturar-status-readonly{
  border-radius:999px!important;
  min-height:24px!important;
  white-space:nowrap!important;
}
.compras-page.flow-stage-faturar .faturar-nf-cell a{
  justify-self:start!important;
  display:inline-flex!important;
  align-items:center!important;
  gap:5px!important;
  width:auto!important;
  max-width:100%!important;
  padding:3px 7px!important;
  border-radius:999px!important;
  background:#eef4ff!important;
  color:#5b35e6!important;
  font-size:11px!important;
  font-weight:900!important;
  text-decoration:none!important;
}
.compras-page.flow-stage-faturar .faturar-nf-cell a::after{content:"↗";font-size:12px;line-height:1}
.compras-page.flow-stage-faturar .actions .button,
.compras-page.flow-stage-faturar td:nth-child(10) .button{
  border-radius:12px!important;
  min-height:38px!important;
}
.compras-page.flow-stage-faturar td:nth-child(10) .button{background:#eefaf6!important;color:#0f513f!important;border:1px solid #bfe3d6!important}
.compras-page.flow-stage-faturar td:nth-child(11) .button{background:#5b35e6!important;color:#fff!important;border-color:#5b35e6!important;box-shadow:0 10px 22px rgba(91,53,230,.18)!important}
@media (max-width:1450px){
  .compras-page.flow-stage-faturar .pedidos-table thead tr,
  .compras-page.flow-stage-faturar .pedidos-table tbody tr{
    grid-template-columns:124px minmax(215px,1.18fr) 108px 100px 132px minmax(118px,.62fr) minmax(118px,.62fr) 104px 84px 92px!important;
    gap:8px!important;
  }
  .compras-page.flow-stage-faturar .pedidos-table tbody tr{padding-left:10px!important;padding-right:10px!important}
  .compras-page.flow-stage-faturar .faturar-nf-cell{gap:8px!important}
  .compras-page.flow-stage-faturar .product-name{font-size:13px!important}
}

/* Faturar v3.1: cabeçalho alinhado e ações no padrão visual do mock */
.compras-page.flow-stage-faturar .pedidos-table th:nth-child(6){
  align-items:center!important;
  padding-top:0!important;
}
.compras-page.flow-stage-faturar .pedidos-table th:nth-child(6)::before{
  content:"Nota fiscal"!important;
  order:1!important;
  color:#172033!important;
  font-size:12px!important;
  font-weight:800!important;
  letter-spacing:.01em!important;
  line-height:1!important;
}
.compras-page.flow-stage-faturar .pedidos-table th:nth-child(6)::after{
  content:"Transporte"!important;
  order:2!important;
  position:static!important;
  transform:none!important;
  color:#172033!important;
  font-size:12px!important;
  font-weight:800!important;
  letter-spacing:.01em!important;
  line-height:1!important;
}
.compras-page.flow-stage-faturar .pedidos-table tbody tr{min-height:104px!important}
.compras-page.flow-stage-faturar .flow-product-wrap{
  grid-template-columns:50px minmax(0,1fr)!important;
  min-width:0!important;
}
.compras-page.flow-stage-faturar .product-name{
  display:block!important;
  max-height:42px!important;
  line-height:1.25!important;
  overflow:hidden!important;
}
.compras-page.flow-stage-faturar .pedidos-table td:nth-child(10),
.compras-page.flow-stage-faturar .pedidos-table td:nth-child(11){
  align-self:center!important;
}
.compras-page.flow-stage-faturar .pedidos-table td:nth-child(11)::before{
  content:"Ações";
  display:none;
}
.compras-page.flow-stage-faturar td:nth-child(10) .button,
.compras-page.flow-stage-faturar td:nth-child(11) .button{
  font-size:12px!important;
  font-weight:900!important;
  white-space:nowrap!important;
}

/* Faturar v3.2: ordem correta dos rótulos do cabeçalho composto */
.compras-page.flow-stage-faturar .pedidos-table th:nth-child(6)::after{content:"Nota fiscal"!important}
.compras-page.flow-stage-faturar .pedidos-table th:nth-child(6)::before{content:"Transporte"!important}

/* Faturar v3.3: rótulos Nota fiscal/Transporte na mesma linha */
.compras-page.flow-stage-faturar .pedidos-table th:nth-child(6){
  display:block!important;
  position:relative!important;
  height:18px!important;
  min-height:18px!important;
  align-self:center!important;
}
.compras-page.flow-stage-faturar .pedidos-table th:nth-child(6)::before,
.compras-page.flow-stage-faturar .pedidos-table th:nth-child(6)::after{
  position:absolute!important;
  top:50%!important;
  transform:translateY(-50%)!important;
  width:calc(50% - 5px)!important;
  color:#172033!important;
  font-size:12px!important;
  font-weight:800!important;
  line-height:1!important;
  letter-spacing:.01em!important;
  text-align:left!important;
  white-space:nowrap!important;
}
.compras-page.flow-stage-faturar .pedidos-table th:nth-child(6)::before{content:"Nota fiscal"!important;left:0!important}
.compras-page.flow-stage-faturar .pedidos-table th:nth-child(6)::after{content:"Transporte"!important;left:calc(50% + 5px)!important}

/* Faturar v4: ações reais em dropdown, NF/Transporte somente status e links */
.compras-page.flow-stage-faturar .faturar-nf-cell>.button{
  display:none!important;
}
.compras-page.flow-stage-faturar .faturar-actions-spacer{
  visibility:hidden!important;
  pointer-events:none!important;
}
.compras-page.flow-stage-faturar .flow-actions-menu{
  position:relative;
  display:block;
  width:100%;
  min-width:104px;
  z-index:20;
}
.compras-page.flow-stage-faturar .flow-actions-menu summary{
  list-style:none;
  cursor:pointer;
  user-select:none;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:42px;
  padding:0 14px;
  border:1px solid #7c3aed;
  border-radius:12px;
  background:#fff;
  color:#5b21b6;
  font-size:13px;
  font-weight:900;
  box-shadow:0 10px 24px rgba(91,53,230,.12);
}
.compras-page.flow-stage-faturar .flow-actions-menu summary::-webkit-details-marker{display:none}
.compras-page.flow-stage-faturar .flow-actions-menu summary::after{content:"⌄";font-size:14px;line-height:1}
.compras-page.flow-stage-faturar .flow-actions-menu[open] summary{
  background:#5b35e6;
  color:#fff;
}
.compras-page.flow-stage-faturar .flow-actions-menu-list{
  position:absolute;
  right:0;
  top:calc(100% + 8px);
  display:grid;
  gap:6px;
  width:230px;
  padding:10px;
  border:1px solid #e5defe;
  border-radius:14px;
  background:#fff;
  box-shadow:0 18px 36px rgba(15,23,42,.16);
}
.compras-page.flow-stage-faturar .flow-actions-menu-list button{
  display:flex;
  align-items:center;
  gap:9px;
  width:100%;
  min-height:38px;
  padding:8px 10px;
  border:0;
  border-radius:10px;
  background:#fff;
  color:#172033;
  font-size:13px;
  font-weight:800;
  text-align:left;
  cursor:pointer;
}
.compras-page.flow-stage-faturar .flow-actions-menu-list button:hover:not(:disabled){background:#f3efff;color:#4c1d95}
.compras-page.flow-stage-faturar .flow-actions-menu-list button.primary{
  justify-content:center;
  background:#5b35e6;
  color:#fff;
  box-shadow:0 10px 22px rgba(91,53,230,.18);
}
.compras-page.flow-stage-faturar .flow-actions-menu-list button:disabled{
  cursor:not-allowed;
  opacity:.45;
}

/* Faturar v4.1: remover coluna fantasma e manter Ações dentro do card */
.compras-page.flow-stage-faturar .pedidos-table thead tr,
.compras-page.flow-stage-faturar .pedidos-table tbody tr{
  grid-template-columns:minmax(132px,.75fr) minmax(92px,.48fr) minmax(230px,1.25fr) minmax(128px,.62fr) minmax(116px,.56fr) minmax(150px,.76fr) minmax(126px,.64fr) minmax(126px,.64fr) minmax(112px,.56fr) minmax(118px,.58fr)!important;
  gap:10px!important;
}
.compras-page.flow-stage-faturar .pedidos-table th:nth-child(2),
.compras-page.flow-stage-faturar .pedidos-table td:nth-child(2){order:2!important}
.compras-page.flow-stage-faturar .pedidos-table th:nth-child(10),
.compras-page.flow-stage-faturar .pedidos-table td:nth-child(10){display:none!important}
.compras-page.flow-stage-faturar .pedidos-table th:nth-child(11){order:9!important}
.compras-page.flow-stage-faturar .pedidos-table td:nth-child(11){order:9!important;justify-self:stretch!important}
.compras-page.flow-stage-faturar .flow-actions-menu{min-width:0!important;width:100%!important}
.compras-page.flow-stage-faturar .flow-actions-menu summary{padding-left:10px!important;padding-right:10px!important}
.compras-page.flow-stage-faturar .flow-actions-menu-list{right:0!important;width:225px!important}
@media (max-width:1450px){
  .compras-page.flow-stage-faturar .pedidos-table thead tr,
  .compras-page.flow-stage-faturar .pedidos-table tbody tr{
    grid-template-columns:118px 84px minmax(205px,1.18fr) 116px 104px 132px 118px 118px 104px 106px!important;
    gap:8px!important;
  }
}

/* Faturar v4.2: dropdown legível em uma linha */
.compras-page.flow-stage-faturar .flow-actions-menu-list{
  width:270px!important;
  right:0!important;
  z-index:999!important;
}
.compras-page.flow-stage-faturar .flow-actions-menu-list button{
  white-space:nowrap!important;
  overflow:visible!important;
  line-height:1.2!important;
  justify-content:flex-start!important;
}
.compras-page.flow-stage-faturar .flow-actions-menu-list button.primary{justify-content:flex-start!important}

/* Faturar v4.3: impedir truncamento dos itens do menu */
.compras-page.flow-stage-faturar .flow-actions-menu-list{
  width:max-content!important;
  min-width:285px!important;
  max-width:none!important;
  overflow:visible!important;
}
.compras-page.flow-stage-faturar .flow-actions-menu-list button{
  width:100%!important;
  min-width:255px!important;
  max-width:none!important;
  overflow:visible!important;
  text-overflow:clip!important;
  white-space:nowrap!important;
}

/* Faturar v4.4: menu aberto sempre acima das linhas seguintes */
.compras-page.flow-stage-faturar .pedidos-table tbody tr:has(.flow-actions-menu[open]){
  position:relative!important;
  z-index:1000!important;
}
.compras-page.flow-stage-faturar .flow-actions-menu[open]{z-index:2000!important}
.compras-page.flow-stage-faturar .flow-actions-menu[open] .flow-actions-menu-list{z-index:3000!important}

/* Faturar v4.5: menu de ações expande a linha, sem ficar por trás da próxima */
.compras-page.flow-stage-faturar .pedidos-table tbody tr:has(.flow-actions-menu[open]){
  min-height:210px!important;
  align-items:start!important;
  padding-bottom:16px!important;
}
.compras-page.flow-stage-faturar .pedidos-table tbody tr:has(.flow-actions-menu[open]) td{
  align-self:start!important;
}
.compras-page.flow-stage-faturar .flow-actions-menu[open]{
  display:grid!important;
  gap:8px!important;
}
.compras-page.flow-stage-faturar .flow-actions-menu[open] .flow-actions-menu-list{
  position:static!important;
  right:auto!important;
  top:auto!important;
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  box-sizing:border-box!important;
}
.compras-page.flow-stage-faturar .flow-actions-menu[open] .flow-actions-menu-list button{
  min-width:0!important;
}

/* Faturar v4.6: pedidos já faturados/etiquetados usam o mesmo layout compacto */
.compras-page.flow-stage-faturar .faturar-nf-cell{
  align-content:center!important;
}
.compras-page.flow-stage-faturar .faturar-nf-cell>small:not([style]){
  display:none!important;
}
.compras-page.flow-stage-faturar .faturar-nf-cell .faturar-nf-fields{
  gap:4px!important;
}
.compras-page.flow-stage-faturar .faturar-nf-cell .faturar-mini-field{
  min-height:30px!important;
  padding:4px 8px!important;
  border-radius:10px!important;
}
.compras-page.flow-stage-faturar .faturar-nf-cell .faturar-mini-field span{
  font-size:9px!important;
  line-height:1!important;
}
.compras-page.flow-stage-faturar .faturar-nf-cell .faturar-status-readonly{
  min-height:20px!important;
  padding:3px 8px!important;
  font-size:11px!important;
  line-height:1.1!important;
}
.compras-page.flow-stage-faturar .faturar-nf-cell a{
  min-height:18px!important;
  padding:3px 7px!important;
  border-radius:9px!important;
  font-size:10px!important;
  line-height:1!important;
  width:max-content!important;
}
.compras-page.flow-stage-faturar .faturar-nf-cell>.faturar-nf-fields:nth-of-type(1){
  grid-column:1!important;
  grid-row:1!important;
}
.compras-page.flow-stage-faturar .faturar-nf-cell>.faturar-nf-fields:nth-of-type(2){
  grid-column:2!important;
  grid-row:1!important;
}
.compras-page.flow-stage-faturar .faturar-nf-cell>a:nth-of-type(1){
  grid-column:1!important;
  grid-row:2!important;
}
.compras-page.flow-stage-faturar .faturar-nf-cell>a:nth-of-type(2){
  grid-column:1!important;
  grid-row:3!important;
}
.compras-page.flow-stage-faturar .faturar-nf-cell>a:nth-of-type(3){
  grid-column:2!important;
  grid-row:2!important;
}
.compras-page.flow-stage-faturar .faturar-nf-cell>a:nth-of-type(4){
  grid-column:2!important;
  grid-row:3!important;
}
.compras-page.flow-stage-compras .product-name-link{color:#0057d8!important;text-decoration:none!important;cursor:pointer!important}
.compras-page.flow-stage-compras .product-name-link:hover{text-decoration:underline!important}

/* Compras: garante leitura e edição do Valor Compra no layout atual */
.compras-page.flow-stage-compras .pedidos-table-container{overflow-x:auto}
.compras-page.flow-stage-compras .pedidos-table{min-width:1520px;table-layout:fixed}
.compras-page.flow-stage-compras .compras-col-product,
.compras-page.flow-stage-compras .pedidos-table th:nth-child(4),
.compras-page.flow-stage-compras .pedidos-table td:nth-child(4){width:230px}
.compras-page.flow-stage-compras .compras-col-ref,
.compras-page.flow-stage-compras .pedidos-table th:nth-child(8),
.compras-page.flow-stage-compras .pedidos-table td:nth-child(8){width:112px}
.compras-page.flow-stage-compras .compras-col-cost,
.compras-page.flow-stage-compras .pedidos-table th:nth-child(9),
.compras-page.flow-stage-compras .pedidos-table td:nth-child(9){width:118px}
.compras-page.flow-stage-compras .compras-col-ncm,
.compras-page.flow-stage-compras .pedidos-table th:nth-child(10),
.compras-page.flow-stage-compras .pedidos-table td:nth-child(10){width:82px}
.compras-page.flow-stage-compras .compras-col-ean,
.compras-page.flow-stage-compras .pedidos-table th:nth-child(11),
.compras-page.flow-stage-compras .pedidos-table td:nth-child(11){width:82px}
.compras-page.flow-stage-compras td[data-label="Valor Compra"],
.compras-page.flow-stage-compras td[data-label="Custo Fonte"]{overflow:visible}
.compras-page.flow-stage-compras td[data-label="Valor Compra"] .flow-input-shell,
.compras-page.flow-stage-compras td[data-label="Custo Fonte"] .flow-input-shell,
.compras-page.flow-stage-compras .cost-field .flow-input-shell{min-width:104px}
.compras-page.flow-stage-compras td[data-label="Valor Compra"] .flow-input,
.compras-page.flow-stage-compras td[data-label="Custo Fonte"] .flow-input,
.compras-page.flow-stage-compras .cost-field .flow-input{font-size:12px}

/* Aduana: comporta o campo Dólar de Compra junto dos demais dados do processo */
.compras-page.flow-stage-aduana .aduana-settings-grid{grid-template-columns:minmax(220px,1.25fr) repeat(6,minmax(112px,1fr)) minmax(130px,.8fr)}
.flow-col-dispatch-duration{width:135px}.dispatch-duration-cell{min-width:120px;color:#0f172a}.dispatch-duration-cell strong{display:block;color:#0f766e;font-weight:900;line-height:1.15}.dispatch-duration-cell small{display:block;color:#64748b;font-size:10.5px;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:130px}@media(max-width:768px){.dispatch-duration-cell{min-width:0}.dispatch-duration-cell small{white-space:normal;max-width:none}}

/* Ondax action standard: mesma fonte, altura e formato nas colunas de ação. */
:root{
  --ondax-action-height:34px;
  --ondax-action-radius:12px;
  --ondax-action-font-size:11.5px;
  --ondax-action-shadow:0 8px 18px rgba(15,23,42,.08);
}
.compras-page .actions,
.pedidos-table td[data-label="Ações"] .actions,
.pedidos-table td[data-label="Ação"] .actions,
.pedidos-table td[data-label="Acao"] .actions,
.pedidos-table td[data-label="Acoes"] .actions{
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
  justify-content:center!important;
  gap:7px!important;
  min-width:0!important;
}
.compras-page .actions .button,
.pedidos-table td[data-label="Ações"] button,
.pedidos-table td[data-label="Ação"] button,
.pedidos-table td[data-label="Acao"] button,
.pedidos-table td[data-label="Acoes"] button,
.pedidos-table td:last-child .comprar-button,
.pedidos-table td:last-child .button,
.flow-actions-menu summary,
.dispatch-regress-button,
.dispatch-doc-buttons .button,
.archive-actions-trigger{
  min-height:var(--ondax-action-height)!important;
  height:auto!important;
  border-radius:var(--ondax-action-radius)!important;
  padding:8px 12px!important;
  border:1px solid #cbd5e1!important;
  background:#f8fafc!important;
  color:#0f172a!important;
  font-size:var(--ondax-action-font-size)!important;
  font-weight:850!important;
  line-height:1.05!important;
  letter-spacing:-.01em!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:6px!important;
  text-align:center!important;
  text-decoration:none!important;
  white-space:normal!important;
  box-shadow:none!important;
  cursor:pointer;
}
.pedidos-table td[data-label="Ações"],
.pedidos-table td[data-label="Ação"],
.pedidos-table td[data-label="Acao"],
.pedidos-table td[data-label="Acoes"],
.pedidos-table td:last-child{
  text-align:center!important;
}
.compras-page .actions .button,
.pedidos-table td[data-label="Ações"] button,
.pedidos-table td[data-label="Ação"] button,
.pedidos-table td[data-label="Acao"] button,
.pedidos-table td[data-label="Acoes"] button,
.pedidos-table td:last-child .comprar-button,
.pedidos-table td:last-child .button{
  width:100%!important;
  max-width:132px!important;
  min-width:88px!important;
}
.pedidos-table td:last-child .comprar-button,
.compras-page .actions .button.secondary,
.compras-page .actions .button:not(.ghost):not(.danger):not(.compras-remove-button){
  background:#0f766e!important;
  border-color:#0f766e!important;
  color:#fff!important;
  box-shadow:var(--ondax-action-shadow)!important;
}
.compras-page .actions .button.ghost,
.compras-page .actions .button:not(.secondary):not(.danger):not(.compras-remove-button),
.dispatch-regress-button,
.dispatch-doc-buttons .button,
.archive-actions-trigger{
  background:#eefaf6!important;
  border-color:#bfe3d6!important;
  color:#0f513f!important;
}
.compras-page .actions .button.danger,
.compras-page .actions .compras-remove-button{
  background:#fee2e2!important;
  border-color:#fecaca!important;
  color:#991b1b!important;
  box-shadow:none!important;
}
.compras-page .actions .button:disabled,
.pedidos-table td[data-label="Ações"] button:disabled,
.pedidos-table td[data-label="Ação"] button:disabled,
.pedidos-table td[data-label="Acao"] button:disabled,
.pedidos-table td[data-label="Acoes"] button:disabled,
.flow-actions-menu-list button:disabled,
.dispatch-regress-button:disabled{
  opacity:.55!important;
  cursor:not-allowed!important;
  filter:saturate(.75)!important;
}
.compras-page.flow-stage-faturar .flow-actions-menu{
  width:100%!important;
  min-width:0!important;
}
.compras-page.flow-stage-faturar .flow-actions-menu summary{
  width:100%!important;
  min-width:92px!important;
  max-width:132px!important;
  background:#5b35e6!important;
  border-color:#5b35e6!important;
  color:#fff!important;
  box-shadow:var(--ondax-action-shadow)!important;
}
.compras-page.flow-stage-faturar .flow-actions-menu-list{
  border-radius:14px!important;
  border:1px solid #dbe3ee!important;
  box-shadow:0 18px 42px rgba(15,23,42,.18)!important;
  padding:8px!important;
}
.compras-page.flow-stage-faturar .flow-actions-menu-list button{
  width:100%!important;
  min-height:34px!important;
  border-radius:10px!important;
  padding:8px 10px!important;
  border:0!important;
  background:#fff!important;
  color:#1f2937!important;
  font-size:12px!important;
  font-weight:800!important;
  justify-content:flex-start!important;
  white-space:nowrap!important;
}
.compras-page.flow-stage-faturar .flow-actions-menu-list button.primary{
  background:#5b35e6!important;
  color:#fff!important;
  justify-content:flex-start!important;
}
.dispatch-action{
  min-height:var(--ondax-action-height)!important;
  border-radius:var(--ondax-action-radius)!important;
  padding:8px 12px!important;
  background:#f3e8ff!important;
  color:#6d28d9!important;
  border:1px solid #ddd6fe!important;
  font-size:var(--ondax-action-font-size)!important;
  font-weight:850!important;
  line-height:1.05!important;
  box-shadow:none!important;
}

/* Faturar: dropdown da coluna Ações não deve cortar textos nem ficar atrás da linha. */
.compras-page.flow-stage-faturar .flow-actions-menu[open]{
  position:relative!important;
  z-index:3000!important;
}
.compras-page.flow-stage-faturar .flow-actions-menu[open] .flow-actions-menu-list{
  position:absolute!important;
  top:calc(100% + 8px)!important;
  right:0!important;
  width:230px!important;
  min-width:230px!important;
  max-width:min(230px,calc(100vw - 32px))!important;
  z-index:3100!important;
}
.compras-page.flow-stage-faturar .pedidos-table tbody tr:has(.flow-actions-menu[open]){
  min-height:210px!important;
}

/* Dispatch compact validation fix - keeps top controls visible at 100% zoom */
.dispatch-page{padding-top:14px!important}.dispatch-session-bar{grid-template-columns:minmax(150px,auto) repeat(4,minmax(105px,1fr)) minmax(110px,auto)!important;align-items:stretch!important;gap:8px!important;padding:10px 12px!important;margin:4px 0 12px!important}.dispatch-session-bar .button{min-height:38px!important;height:38px!important;padding:8px 12px!important}.dispatch-session-bar div,.dispatch-session-metric{min-width:0!important;padding:7px 9px!important;font-size:12px!important}.dispatch-session-bar b{display:block!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}.dispatch-workstation{padding:12px!important}.dispatch-step{min-height:116px!important}.dispatch-scan-input,.dispatch-confirm-box input{height:44px!important}.dispatch-printer{width:52px!important;height:52px!important;font-size:27px!important}

/* Dispatch product title containment - prevents status badge from covering title */
.dispatch-product-cell>span{display:block!important;min-width:0!important}.dispatch-product-cell strong{max-width:100%!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}

.import-limits-page{display:flex;flex-direction:column;gap:18px}.import-limits-header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.import-limits-header p{margin:6px 0 0;color:#64748b;max-width:760px}.import-limits-filters{display:grid;grid-template-columns:repeat(4,minmax(160px,1fr));gap:12px;background:#fff;border:1px solid #e2e8f0;border-radius:18px;padding:14px;box-shadow:0 10px 30px rgba(15,23,42,.05)}.import-limits-filters label{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:700;color:#475569;text-transform:uppercase;letter-spacing:.04em}.import-limits-filters input,.import-limits-filters select{border:1px solid #cbd5e1;border-radius:12px;padding:10px 12px;font-size:14px;color:#0f172a;background:#fff}.import-limits-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.import-limit-kpi,.import-limit-company-card,.import-limits-section{background:#fff;border:1px solid #e2e8f0;border-radius:20px;box-shadow:0 14px 38px rgba(15,23,42,.06)}.import-limit-kpi{padding:16px;display:flex;flex-direction:column;gap:6px}.import-limit-kpi span,.import-limit-kpi small,.import-limit-company-card small,.section-title-row span{color:#64748b}.import-limit-kpi strong{font-size:24px;color:#0f172a}.import-limits-company-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:14px}.import-limit-company-card{padding:16px;display:flex;flex-direction:column;gap:12px}.import-limit-company-card.warning{border-color:#f59e0b;background:#fffbeb}.import-limit-company-card.exceeded{border-color:#ef4444;background:#fef2f2}.import-limit-company-head,.import-limit-company-values,.section-title-row{display:flex;align-items:center;justify-content:space-between;gap:12px}.import-limit-company-head strong{display:block;color:#0f172a}.import-limit-company-head small{display:block;margin-top:2px}.import-limit-status{border-radius:999px;padding:5px 10px;background:#dcfce7;color:#166534;font-size:12px;font-weight:800}.warning .import-limit-status{background:#fef3c7;color:#92400e}.exceeded .import-limit-status{background:#fee2e2;color:#991b1b}.import-limit-company-values{font-size:13px;color:#475569}.import-limit-company-values strong{color:#0f172a}.import-limit-progress{height:10px;background:#e2e8f0;border-radius:999px;overflow:hidden}.import-limit-progress span{display:block;height:100%;background:linear-gradient(90deg,#22c55e,#14b8a6);border-radius:inherit}.warning .import-limit-progress span{background:linear-gradient(90deg,#f59e0b,#f97316)}.exceeded .import-limit-progress span{background:linear-gradient(90deg,#ef4444,#b91c1c)}.import-limits-section{padding:16px}.section-title-row{margin-bottom:12px}.section-title-row h2{margin:0;font-size:18px;color:#0f172a}.import-limits-table-wrap{overflow:auto;border:1px solid #e2e8f0;border-radius:14px}.import-limits-table{width:100%;border-collapse:separate;border-spacing:0;font-size:13px}.import-limits-table th,.import-limits-table td{padding:11px 12px;border-bottom:1px solid #e2e8f0;text-align:left;white-space:nowrap}.import-limits-table th{background:#f8fafc;color:#475569;font-size:11px;text-transform:uppercase;letter-spacing:.05em}.import-limits-table tbody tr:hover{background:#f8fafc}.import-limits-table .money{text-align:right;font-weight:800;color:#0f172a}@media(max-width:900px){.import-limits-header{flex-direction:column}.import-limits-filters,.import-limits-kpis{grid-template-columns:1fr}.import-limits-table th,.import-limits-table td{padding:9px 10px}}
.import-limits-header .secondary-button{border:0;border-radius:12px;background:#0f766e;color:#fff;font-weight:800;padding:10px 16px;box-shadow:0 10px 24px rgba(15,118,110,.18);cursor:pointer}.import-limits-header .secondary-button:disabled{opacity:.65;cursor:not-allowed}
.import-limits-header .primary-button.ghost{border:0;border-radius:12px;background:#0f766e;color:#fff;font-weight:800;padding:10px 16px;box-shadow:0 10px 24px rgba(15,118,110,.18);cursor:pointer}.import-limits-header .primary-button.ghost:disabled{opacity:.65;cursor:not-allowed}
.limits-dashboard{gap:16px;color:#0f172a}.limits-topbar{display:flex;align-items:flex-start;justify-content:space-between;gap:20px}.limits-topbar h1{margin:0 0 6px;font-size:28px;line-height:1.05;color:#050816}.limits-topbar p{margin:2px 0;color:#64748b;font-weight:650}.limits-refresh-button{display:inline-flex;align-items:center;gap:8px;border:0;border-radius:10px;background:linear-gradient(135deg,#059669,#047857);color:#fff;font-weight:900;padding:12px 20px;box-shadow:0 14px 28px rgba(4,120,87,.26);cursor:pointer}.limits-refresh-button:disabled{opacity:.7;cursor:not-allowed}.limits-filter-card{display:grid;grid-template-columns:280px 1fr 1fr 1fr 1fr 260px;gap:22px;align-items:end;background:#fff;border:1px solid #e2e8f0;border-radius:18px;padding:20px 22px;box-shadow:0 14px 36px rgba(15,23,42,.07)}.limits-filter-card label{display:flex;flex-direction:column;gap:8px}.limits-filter-card label>span,.limits-quarter-shortcuts>span,.limits-fixed-note span{font-size:12px;font-weight:900;color:#475569}.limits-filter-card input,.limits-filter-card select{height:44px;border:1px solid #cbd5e1;border-radius:10px;background:#fff;color:#0f172a;font-size:15px;font-weight:750;padding:0 14px}.limits-quarter-shortcuts{display:flex;flex-direction:column;gap:10px;border-right:1px solid #e2e8f0;padding-right:22px}.limits-quarter-shortcuts div{display:flex;gap:10px}.limits-quarter-shortcuts button{height:44px;min-width:58px;border:1px solid #cbd5e1;border-radius:9px;background:#fff;color:#0f172a;font-weight:850;cursor:pointer}.limits-quarter-shortcuts button.active{border-color:#6d28d9;background:linear-gradient(135deg,#7c3aed,#5b21b6);color:#fff;box-shadow:0 8px 20px rgba(91,33,182,.24)}.limits-fixed-note{align-self:stretch;display:flex;flex-direction:column;justify-content:center;gap:6px;border-left:1px solid #e2e8f0;padding-left:22px;color:#475569}.limits-fixed-note strong{font-size:13px;color:#475569}.limits-kpi-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:14px}.limits-kpi-card{display:flex;align-items:flex-start;gap:14px;background:#fff;border:1px solid #e5e7eb;border-radius:18px;padding:20px 18px;box-shadow:0 14px 34px rgba(15,23,42,.06);min-height:118px}.limits-kpi-card span{display:block;color:#64748b;font-weight:760;font-size:13px}.limits-kpi-card strong{display:block;margin-top:8px;color:#050816;font-size:22px;line-height:1.18;letter-spacing:-.02em}.limits-kpi-card small{display:block;margin-top:8px;color:#64748b;font-weight:650}.limits-kpi-icon{flex:0 0 44px;width:44px;height:44px;display:grid!important;place-items:center;border-radius:12px;font-size:22px;font-weight:900}.limits-kpi-icon.purple{background:#ede9fe;color:#5b21b6}.limits-kpi-icon.violet{background:#f1e9ff;color:#6d28d9}.limits-kpi-icon.blue{background:#dbeafe;color:#2563eb}.limits-kpi-icon.green{background:#dcfce7;color:#16a34a}.limits-kpi-icon.orange{background:#ffedd5;color:#f97316}.limits-kpi-icon.cyan{background:#cffafe;color:#0891b2}.limits-kpi-icon.lime{background:#dcfce7;color:#16a34a}.limits-content-grid{display:grid;grid-template-columns:minmax(600px,.82fr) minmax(720px,1.18fr);gap:14px;align-items:stretch}.limits-daily-table-card,.limits-company-card{background:#fff;border:1px solid #e2e8f0;border-radius:16px;box-shadow:0 12px 30px rgba(15,23,42,.055)}.limits-daily-table-card{overflow:hidden;min-height:520px}.limits-daily-table-card h2{margin:0;padding:18px 18px;font-size:17px;color:#172033;border-bottom:1px solid #e2e8f0}.limits-table-wrap{overflow:auto}.limits-daily-table{width:100%;border-collapse:collapse;font-size:12px}.limits-daily-table th{background:#f8fafc;color:#475569;text-align:left;font-size:11px;font-weight:900;padding:13px 14px;border-bottom:1px solid #e2e8f0}.limits-daily-table td{padding:14px;border-bottom:1px solid #edf2f7;color:#1e293b;font-weight:750;white-space:nowrap}.limits-daily-table td.negative{color:#ef4444}.limits-company-grid{display:grid;grid-template-columns:repeat(4,minmax(210px,1fr));gap:10px}.limits-company-card{padding:14px 14px 10px;display:flex;flex-direction:column;gap:10px}.limits-company-card.warning{border-color:#fde68a}.limits-company-card.exceeded{border-color:#fecaca}.limits-company-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.limits-company-head strong{display:block;font-size:14px;color:#0f172a;line-height:1.2}.limits-company-head small{display:block;margin-top:3px;color:#64748b;font-size:11px;font-weight:700;word-break:break-all}.limits-status-pill{display:inline-flex;align-items:center;justify-content:center;border-radius:999px;padding:5px 10px;font-size:11px;font-weight:900;white-space:nowrap}.limits-status-pill.ok{background:#dcfce7;color:#15803d}.limits-status-pill.warning{background:#ffedd5;color:#f97316}.limits-status-pill.exceeded{background:#fee2e2;color:#ef4444}.limits-company-values{display:grid;gap:4px}.limits-company-values span{display:flex;justify-content:space-between;gap:10px;color:#475569;font-size:12px;font-weight:750}.limits-company-values strong{color:#0f172a}.limits-card-progress-row{display:grid;grid-template-columns:1fr 44px;align-items:center;gap:8px}.limits-card-progress-row span{display:block;margin-bottom:5px;color:#64748b;font-size:11px;font-weight:800}.limits-card-progress-row strong{font-size:11px;text-align:right;color:#475569}.limits-progress{height:7px;background:#e8eef8;border-radius:999px;overflow:hidden}.limits-progress span{display:block;height:100%;border-radius:inherit}.limits-progress.purple span{background:linear-gradient(90deg,#7c3aed,#6d28d9)}.limits-progress.green span{background:linear-gradient(90deg,#16a34a,#22c55e)}.limits-progress.yellow span{background:linear-gradient(90deg,#f59e0b,#f97316)}.limits-progress.red span{background:linear-gradient(90deg,#ef4444,#dc2626)}.limits-card-mini-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}.limits-card-mini-grid span{display:flex;flex-direction:column;gap:2px;color:#64748b;font-size:10px;text-align:center;font-weight:760}.limits-card-mini-grid strong{font-size:11px;color:#0f172a}.limits-pending-note{display:flex;align-items:center;gap:7px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:10px;padding:8px 9px;color:#475569;font-size:11px;font-weight:760}.limits-pending-note span{width:8px;height:8px;border-radius:50%;background:#22c55e;box-shadow:0 0 0 4px rgba(34,197,94,.12)}.limits-pending-note.warning span{background:#f59e0b;box-shadow:0 0 0 4px rgba(245,158,11,.12)}.limits-pending-note.exceeded span{background:#ef4444;box-shadow:0 0 0 4px rgba(239,68,68,.12)}@media(max-width:1400px){.limits-filter-card{grid-template-columns:1fr 1fr 1fr}.limits-quarter-shortcuts,.limits-fixed-note{border:0;padding:0}.limits-kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.limits-content-grid{grid-template-columns:1fr}.limits-company-grid{grid-template-columns:repeat(3,minmax(210px,1fr))}}@media(max-width:900px){.limits-topbar{flex-direction:column}.limits-filter-card{grid-template-columns:1fr}.limits-kpi-grid{grid-template-columns:1fr}.limits-company-grid{grid-template-columns:1fr}.limits-daily-table-card{min-height:auto}}
.limits-dashboard{gap:14px}.limits-kpi-card{gap:11px;padding:17px 15px;min-height:112px}.limits-kpi-icon{flex-basis:40px;width:40px;height:40px;font-size:19px}.limits-kpi-card span{font-size:12px}.limits-kpi-card strong{font-size:20px}.limits-kpi-card small{font-size:12px}.limits-daily-table{font-size:11px}.limits-daily-table th{font-size:10px;padding:11px 9px;white-space:normal;line-height:1.25}.limits-daily-table td{padding:12px 9px;font-size:11px}.limits-daily-table td:first-child{white-space:normal;min-width:130px}.limits-daily-table .limits-status-pill{padding:4px 8px;font-size:10px}
.compras-page.flow-stage-compras .product-name-copy{border:0!important;background:transparent!important;padding:0!important;text-align:left!important;font:inherit!important;cursor:copy!important;color:#0057d8!important;-webkit-text-fill-color:#0057d8!important;appearance:none!important;width:100%!important}.compras-page.flow-stage-compras .product-name-copy:hover{text-decoration:underline!important}
.compras-page.flow-stage-compras .pedidos-table tbody tr.compras-row-key-fields-complete,.compras-page.flow-stage-compras .pedidos-table tbody tr.compras-row-key-fields-complete td{background:#bbf7d0!important}.compras-page.flow-stage-compras .pedidos-table tbody tr.compras-row-key-fields-complete:hover,.compras-page.flow-stage-compras .pedidos-table tbody tr.compras-row-key-fields-complete:hover td{background:#86efac!important}
.compras-page.flow-stage-compras .pedidos-table tbody tr.compras-row-cancel-requested,.compras-page.flow-stage-compras .pedidos-table tbody tr.compras-row-cancel-requested td{background:#fecaca!important}.compras-page.flow-stage-compras .pedidos-table tbody tr.compras-row-cancel-requested:hover,.compras-page.flow-stage-compras .pedidos-table tbody tr.compras-row-cancel-requested:hover td{background:#fca5a5!important}.compras-page.flow-stage-compras .pedidos-table tbody tr.compras-row-cancel-requested.is-compras-expanded>td{background:#fee2e2!important}.compras-page.flow-stage-compras .compras-kebab-menu .flow-actions-menu-list .compras-cancel-button{color:#b91c1c!important}.compras-page.flow-stage-compras .compras-kebab-menu .flow-actions-menu-list .compras-cancel-clear-button{color:#047857!important}

/* Marketplace badge: Carrefour padronizado com Magalu em tamanho e forma. */
.marketplace-logo-carrefour{background:linear-gradient(135deg,#0057ff 0 52%,#e30613 52% 100%)!important;border:0!important;color:transparent!important;box-shadow:0 1px 2px #0f172a26!important}.marketplace-logo-carrefour:before{inset:0!important;background-size:100% 100%!important;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%230057FF'/%3E%3Cstop offset='.52' stop-color='%230057FF'/%3E%3Cstop offset='.52' stop-color='%23E30613'/%3E%3Cstop offset='1' stop-color='%23E30613'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='32' height='32' rx='7' fill='url(%23g)'/%3E%3Ctext x='16' y='22' text-anchor='middle' font-family='Arial,sans-serif' font-size='18' font-weight='900' fill='white'%3EC%3C/text%3E%3C/svg%3E")!important}.flow-stage-compras .marketplace-logo-carrefour:before{inset:0!important}

@media (min-width:769px){
/* Compras: mantém a coluna Ações visível em 100% de zoom. */
.compras-page.flow-stage-compras .pedidos-table-container{overflow-x:auto!important}
.compras-page.flow-stage-compras .pedidos-table{min-width:1380px!important;table-layout:fixed!important}
.compras-page.flow-stage-compras .compras-col-date,.compras-page.flow-stage-compras .pedidos-table th:nth-child(1),.compras-page.flow-stage-compras .pedidos-table td:nth-child(1){width:86px!important}
.compras-page.flow-stage-compras .compras-col-code,.compras-page.flow-stage-compras .pedidos-table th:nth-child(2),.compras-page.flow-stage-compras .pedidos-table td:nth-child(2){width:106px!important}
.compras-page.flow-stage-compras .compras-col-term,.compras-page.flow-stage-compras .pedidos-table th:nth-child(3),.compras-page.flow-stage-compras .pedidos-table td:nth-child(3){width:76px!important}
.compras-page.flow-stage-compras .compras-col-product,.compras-page.flow-stage-compras .pedidos-table th:nth-child(4),.compras-page.flow-stage-compras .pedidos-table td:nth-child(4){width:210px!important}
.compras-page.flow-stage-compras .compras-col-qty,.compras-page.flow-stage-compras .pedidos-table th:nth-child(5),.compras-page.flow-stage-compras .pedidos-table td:nth-child(5){width:46px!important}
.compras-page.flow-stage-compras .compras-col-value,.compras-page.flow-stage-compras .pedidos-table th:nth-child(6),.compras-page.flow-stage-compras .pedidos-table td:nth-child(6){width:78px!important}
.compras-page.flow-stage-compras .compras-col-source,.compras-page.flow-stage-compras .pedidos-table th:nth-child(7),.compras-page.flow-stage-compras .pedidos-table td:nth-child(7){width:106px!important}
.compras-page.flow-stage-compras .compras-col-ref,.compras-page.flow-stage-compras .pedidos-table th:nth-child(8),.compras-page.flow-stage-compras .pedidos-table td:nth-child(8){width:82px!important}
.compras-page.flow-stage-compras .compras-col-cost,.compras-page.flow-stage-compras .pedidos-table th:nth-child(9),.compras-page.flow-stage-compras .pedidos-table td:nth-child(9){width:74px!important}
.compras-page.flow-stage-compras .compras-col-ncm,.compras-page.flow-stage-compras .pedidos-table th:nth-child(10),.compras-page.flow-stage-compras .pedidos-table td:nth-child(10){width:60px!important}
.compras-page.flow-stage-compras .compras-col-ean,.compras-page.flow-stage-compras .pedidos-table th:nth-child(11),.compras-page.flow-stage-compras .pedidos-table td:nth-child(11){width:60px!important}
.compras-page.flow-stage-compras .compras-col-address,.compras-page.flow-stage-compras .pedidos-table th:nth-child(12),.compras-page.flow-stage-compras .pedidos-table td:nth-child(12){width:58px!important}
.compras-page.flow-stage-compras .compras-col-status,.compras-page.flow-stage-compras .pedidos-table th:nth-child(13),.compras-page.flow-stage-compras .pedidos-table td:nth-child(13){width:84px!important}
.compras-page.flow-stage-compras .compras-col-marketplace,.compras-page.flow-stage-compras .pedidos-table th:nth-child(14),.compras-page.flow-stage-compras .pedidos-table td:nth-child(14){width:76px!important}
.compras-page.flow-stage-compras .compras-col-regress,.compras-page.flow-stage-compras .pedidos-table th:nth-child(15),.compras-page.flow-stage-compras .pedidos-table td:nth-child(15){width:76px!important}
.compras-page.flow-stage-compras .compras-col-actions,.compras-page.flow-stage-compras .pedidos-table th:nth-child(16),.compras-page.flow-stage-compras .pedidos-table td:nth-child(16){width:96px!important;min-width:96px!important}
.compras-page.flow-stage-compras .pedidos-table th:nth-child(16),.compras-page.flow-stage-compras .pedidos-table td:nth-child(16),.compras-page.flow-stage-compras .pedidos-table td[data-label="Acao"],.compras-page.flow-stage-compras .pedidos-table td[data-label="Ação"]{position:sticky!important;right:0!important;z-index:20!important;background:#fff!important;box-shadow:-10px 0 16px -14px #0f172a73!important;overflow:visible!important}
.compras-page.flow-stage-compras .pedidos-table th:nth-child(16){z-index:25!important;background:#f8fafc!important}
.compras-page.flow-stage-compras .pedidos-table tbody tr.compras-row-key-fields-complete td:nth-child(16){background:#ecfdf5!important}
.compras-page.flow-stage-compras .pedidos-table tbody tr.compras-row-key-fields-complete:hover td:nth-child(16){background:#dcfce7!important}
.compras-page.flow-stage-compras .pedidos-table tbody tr.compras-row-cancel-requested td:nth-child(16){background:#fee2e2!important}
.compras-page.flow-stage-compras .pedidos-table tbody tr.compras-row-cancel-requested:hover td:nth-child(16){background:#fecaca!important}
}

@media (min-width:769px){
/* Compras compacta: dados editáveis só aparecem no painel expandido. */
.compras-page.flow-stage-compras .pedidos-table-container{overflow-x:visible!important}
.compras-page.flow-stage-compras .pedidos-table{min-width:0!important;width:100%!important;table-layout:fixed!important}
.compras-page.flow-stage-compras .pedidos-table th:nth-child(3),
.compras-page.flow-stage-compras .pedidos-table td:nth-child(3),
.compras-page.flow-stage-compras .pedidos-table th:nth-child(7),
.compras-page.flow-stage-compras .pedidos-table td:nth-child(7),
.compras-page.flow-stage-compras .pedidos-table th:nth-child(8),
.compras-page.flow-stage-compras .pedidos-table td:nth-child(8),
.compras-page.flow-stage-compras .pedidos-table th:nth-child(9),
.compras-page.flow-stage-compras .pedidos-table td:nth-child(9),
.compras-page.flow-stage-compras .pedidos-table th:nth-child(10),
.compras-page.flow-stage-compras .pedidos-table td:nth-child(10),
.compras-page.flow-stage-compras .pedidos-table th:nth-child(11),
.compras-page.flow-stage-compras .pedidos-table td:nth-child(11),
.compras-page.flow-stage-compras .pedidos-table th:nth-child(12),
.compras-page.flow-stage-compras .pedidos-table td:nth-child(12),
.compras-page.flow-stage-compras .pedidos-table th:nth-child(13),
.compras-page.flow-stage-compras .pedidos-table td:nth-child(13),
.compras-page.flow-stage-compras .pedidos-table th:nth-child(15),
.compras-page.flow-stage-compras .pedidos-table td:nth-child(15){display:none!important}
.compras-page.flow-stage-compras .pedidos-table th:nth-child(1),.compras-page.flow-stage-compras .pedidos-table td:nth-child(1){width:118px!important}
.compras-page.flow-stage-compras .pedidos-table th:nth-child(2),.compras-page.flow-stage-compras .pedidos-table td:nth-child(2){width:150px!important}
.compras-page.flow-stage-compras .pedidos-table th:nth-child(4),.compras-page.flow-stage-compras .pedidos-table td:nth-child(4){width:auto!important}
.compras-page.flow-stage-compras .pedidos-table th:nth-child(5),.compras-page.flow-stage-compras .pedidos-table td:nth-child(5){width:64px!important}
.compras-page.flow-stage-compras .pedidos-table th:nth-child(6),.compras-page.flow-stage-compras .pedidos-table td:nth-child(6){width:118px!important}
.compras-page.flow-stage-compras .pedidos-table th:nth-child(14),.compras-page.flow-stage-compras .pedidos-table td:nth-child(14){width:122px!important;text-align:center!important}
.compras-page.flow-stage-compras .pedidos-table th:nth-child(16),.compras-page.flow-stage-compras .pedidos-table td:nth-child(16){width:58px!important;min-width:58px!important;position:relative!important;right:auto!important;background:inherit!important;box-shadow:none!important;text-align:center!important;overflow:visible!important;z-index:30!important}
.compras-page.flow-stage-compras .pedidos-table tbody tr:not(.compras-expanded-row){cursor:pointer}
.compras-page.flow-stage-compras .pedidos-table tbody tr.is-compras-expanded>td{background:#f8fbff!important}
.compras-page.flow-stage-compras .pedidos-table tbody tr.compras-row-key-fields-complete td:nth-child(16){background:#ecfdf5!important}
.compras-page.flow-stage-compras .pedidos-table tbody tr.compras-row-key-fields-complete:hover td:nth-child(16){background:#dcfce7!important}
.compras-page.flow-stage-compras .pedidos-table tbody tr.compras-row-cancel-requested td:nth-child(16){background:#fee2e2!important}
.compras-page.flow-stage-compras .pedidos-table tbody tr.compras-row-cancel-requested:hover td:nth-child(16){background:#fecaca!important}
}
.compras-page.flow-stage-compras .compras-kebab-menu{display:inline-flex!important;position:relative!important;justify-content:center!important;width:34px!important;min-width:34px!important}
.compras-page.flow-stage-compras .compras-kebab-menu summary{display:inline-flex!important;align-items:center!important;justify-content:center!important;width:34px!important;height:34px!important;border:0!important;background:transparent!important;color:#0f2a4a!important;font-size:24px!important;font-weight:900!important;line-height:1!important;padding:0!important;border-radius:10px!important;cursor:pointer!important;list-style:none!important}
.compras-page.flow-stage-compras .compras-kebab-menu summary::-webkit-details-marker{display:none!important}
.compras-page.flow-stage-compras .compras-kebab-menu summary:after{content:none!important}
.compras-page.flow-stage-compras .compras-kebab-menu summary:hover{background:#eef4ff!important}
.compras-page.flow-stage-compras .compras-kebab-menu[open]{z-index:5000!important}
.compras-page.flow-stage-compras .compras-kebab-menu .flow-actions-menu-list{position:absolute!important;right:0!important;top:calc(100% + 6px)!important;z-index:5100!important;width:205px!important;min-width:205px!important;background:#fff!important;border:1px solid #d8e2f0!important;border-radius:14px!important;box-shadow:0 18px 42px rgba(15,23,42,.16)!important;padding:8px!important}
.compras-page.flow-stage-compras .compras-kebab-menu .flow-actions-menu-list button{width:100%!important;min-height:34px!important;border:0!important;background:#fff!important;color:#0f172a!important;text-align:left!important;justify-content:flex-start!important;padding:8px 10px!important;border-radius:10px!important;font-size:12px!important;font-weight:800!important}
.compras-page.flow-stage-compras .compras-kebab-menu .flow-actions-menu-list button:hover:not(:disabled){background:#f3efff!important;color:#4c1d95!important}
.compras-page.flow-stage-compras .compras-kebab-menu .flow-actions-menu-list .compras-remove-button{color:#dc2626!important}
.compras-page.flow-stage-compras .compras-expanded-row td{display:table-cell!important;padding:0!important;background:#f8fbff!important;border-top:0!important}
.compras-page.flow-stage-compras .compras-expanded-panel{margin:0 12px 14px;padding:16px;border:1px solid #dbeafe;border-radius:16px;background:linear-gradient(180deg,#ffffff,#f8fbff);box-shadow:0 12px 26px rgba(15,23,42,.07)}
.compras-page.flow-stage-compras .compras-expanded-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:13px;color:#0f172a}
.compras-page.flow-stage-compras .compras-expanded-head strong{font-size:14px}
.compras-page.flow-stage-compras .compras-expanded-head span{font-size:12px;color:#64748b;font-weight:800}
.compras-page.flow-stage-compras .compras-expanded-grid{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:12px}
.compras-page.flow-stage-compras .compras-expanded-field{display:flex;flex-direction:column;gap:6px;min-width:0}
.compras-page.flow-stage-compras .compras-expanded-field span{font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.04em;color:#475569}
.compras-page.flow-stage-compras .compras-expanded-field input{height:42px;border:1px solid #cfe0f5;border-radius:10px;background:#fff;color:#0f172a;font-size:13px;font-weight:750;padding:0 12px;outline:none}
.compras-page.flow-stage-compras .compras-expanded-field input:focus{border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.14)}
.compras-page.flow-stage-compras .compras-expanded-save{min-height:14px;font-size:10px;font-weight:800}
.compras-page.flow-stage-compras .compras-expanded-save.is-saving{color:#0284c7}
.compras-page.flow-stage-compras .compras-expanded-save.is-ok{color:#15803d}
.compras-page.flow-stage-compras .compras-expanded-save.is-error{color:#dc2626}
@media(max-width:900px){.compras-page.flow-stage-compras .compras-expanded-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:768px){.compras-page.flow-stage-compras .compras-expanded-grid{grid-template-columns:1fr}.compras-page.flow-stage-compras .compras-expanded-panel{margin:0 0 12px;padding:12px}}

/* Compras 2026-08-12: colunas alinhadas, marketplace visível e ações no menu "...". */
@media (min-width:769px){
.compras-page.flow-stage-compras .pedidos-table{width:100%!important;min-width:0!important;table-layout:fixed!important}
.compras-page.flow-stage-compras .pedidos-table th:nth-child(3),
.compras-page.flow-stage-compras .pedidos-table td:nth-child(3),
.compras-page.flow-stage-compras .compras-col-term,
.compras-page.flow-stage-compras .pedidos-table th:nth-child(7),
.compras-page.flow-stage-compras .pedidos-table td:nth-child(7),
.compras-page.flow-stage-compras .compras-col-source,
.compras-page.flow-stage-compras .pedidos-table th:nth-child(8),
.compras-page.flow-stage-compras .pedidos-table td:nth-child(8),
.compras-page.flow-stage-compras .compras-col-ref,
.compras-page.flow-stage-compras .pedidos-table th:nth-child(9),
.compras-page.flow-stage-compras .pedidos-table td:nth-child(9),
.compras-page.flow-stage-compras .compras-col-cost,
.compras-page.flow-stage-compras .pedidos-table th:nth-child(10),
.compras-page.flow-stage-compras .pedidos-table td:nth-child(10),
.compras-page.flow-stage-compras .compras-col-aduana-value,
.compras-page.flow-stage-compras .pedidos-table th:nth-child(11),
.compras-page.flow-stage-compras .pedidos-table td:nth-child(11),
.compras-page.flow-stage-compras .compras-col-ncm,
.compras-page.flow-stage-compras .pedidos-table th:nth-child(12),
.compras-page.flow-stage-compras .pedidos-table td:nth-child(12),
.compras-page.flow-stage-compras .compras-col-ean,
.compras-page.flow-stage-compras .pedidos-table th:nth-child(13),
.compras-page.flow-stage-compras .pedidos-table td:nth-child(13),
.compras-page.flow-stage-compras .compras-col-address,
.compras-page.flow-stage-compras .compras-col-regress{display:none!important;width:0!important;min-width:0!important;max-width:0!important;padding:0!important;border:0!important}
.compras-page.flow-stage-compras .pedidos-table th:nth-child(1),.compras-page.flow-stage-compras .pedidos-table td:nth-child(1){width:120px!important}
.compras-page.flow-stage-compras .pedidos-table th:nth-child(2),.compras-page.flow-stage-compras .pedidos-table td:nth-child(2){width:152px!important}
.compras-page.flow-stage-compras .pedidos-table th:nth-child(4),.compras-page.flow-stage-compras .pedidos-table td:nth-child(4){width:auto!important}
.compras-page.flow-stage-compras .pedidos-table th:nth-child(5),.compras-page.flow-stage-compras .pedidos-table td:nth-child(5){width:64px!important;text-align:center!important}
.compras-page.flow-stage-compras .pedidos-table th:nth-child(6),.compras-page.flow-stage-compras .pedidos-table td:nth-child(6){width:120px!important}
.compras-page.flow-stage-compras .pedidos-table th:nth-child(14),.compras-page.flow-stage-compras .pedidos-table td:nth-child(14){display:table-cell!important;width:108px!important;text-align:center!important}
.compras-page.flow-stage-compras .pedidos-table th:nth-child(15),.compras-page.flow-stage-compras .pedidos-table td:nth-child(15){display:table-cell!important;width:182px!important;text-align:left!important}
.compras-page.flow-stage-compras .pedidos-table th:nth-child(16),.compras-page.flow-stage-compras .pedidos-table td:nth-child(16),.compras-page.flow-stage-compras .pedidos-table td.compras-actions-cell{display:table-cell!important;width:58px!important;min-width:58px!important;text-align:center!important;overflow:visible!important;position:relative!important;right:auto!important;background:inherit!important;box-shadow:none!important;z-index:30!important}
.compras-page.flow-stage-compras .compras-col-actions{width:58px!important;min-width:58px!important}
.compras-page.flow-stage-compras .status-cell{display:table-cell!important;text-align:center!important}
.compras-page.flow-stage-compras .marketplace-cell{display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:7px!important;flex-wrap:nowrap!important;min-width:0!important}
.compras-page.flow-stage-compras .marketplace-label{display:inline-block!important;min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;font-size:.76rem!important;font-weight:800!important;color:#0f2a4a!important}
.compras-page.flow-stage-compras .marketplace-table-cell{overflow:hidden!important}
.compras-page.flow-stage-compras .compras-actions-cell .compras-kebab-menu{margin-inline:auto!important}
}

/* Compras 2026-08-12: relatório por empresa nativo no React. */
.compras-page.flow-stage-compras .company-report-button{
  background:#166534!important;
  box-shadow:0 8px 20px rgba(22,101,52,.18)!important;
}
.compras-page.flow-stage-compras .company-report-button:hover{background:#14532d!important}
.compras-company-report-modal{width:min(1180px,calc(100vw - 80px))!important}
.compras-company-report-group.is-ready{border-color:#bbf7d0}
.compras-company-report-group.is-below-minimum{border-color:#fed7aa}
.compras-company-report-group header{align-items:flex-start!important}
.compras-company-report-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.compras-company-status{display:inline-flex;align-items:center;border-radius:999px;padding:7px 10px;font-size:12px;font-weight:950;white-space:nowrap}
.compras-company-status.ready{background:#dcfce7;color:#166534}
.compras-company-status.blocked{background:#fff7ed;color:#9a3412}
.compras-company-report-grid{display:grid;width:100%}
.compras-company-report-row{display:grid;grid-template-columns:150px 64px minmax(260px,1fr) 150px 120px 120px;gap:12px;align-items:center;padding:10px 14px;border-top:1px solid #edf2f7;color:#1e293b;font-size:13px}
.compras-company-report-row.is-head{position:sticky;top:0;z-index:1;background:#f8fafc;color:#475569;font-size:11px;font-weight:950;letter-spacing:.04em;text-transform:uppercase}
.compras-company-report-row>span:nth-child(2),
.compras-company-report-row>span:nth-child(5),
.compras-company-report-row>span:nth-child(6){text-align:right;font-weight:900}
.compras-company-report-row strong{display:block;color:#0f172a;line-height:1.25;overflow-wrap:anywhere}
.compras-company-report-row small{display:block;margin-top:3px;color:#64748b;font-size:11px;font-weight:800;overflow-wrap:anywhere}
@media(max-width:760px){
  .compras-company-report-modal{width:calc(100vw - 28px)!important}
  .compras-company-report-group header,.compras-company-report-actions{align-items:stretch!important;flex-direction:column;justify-content:flex-start}
  .compras-company-report-row,.compras-company-report-row.is-head{grid-template-columns:1fr;gap:5px}
  .compras-company-report-row.is-head{display:none}
  .compras-company-report-row>span:nth-child(2),
  .compras-company-report-row>span:nth-child(5),
  .compras-company-report-row>span:nth-child(6){text-align:left}
  .compras-company-report-row>span:nth-child(2)::before{content:'Qtd: ';color:#64748b}
  .compras-company-report-row>span:nth-child(5)::before{content:'USD un.: ';color:#64748b}
  .compras-company-report-row>span:nth-child(6)::before{content:'Total USD: ';color:#64748b}
}

/* Compras 2026-08-12: telefones do cliente no marketplace. */
.compras-page.flow-stage-compras .marketplace-cell{
  flex-direction:column!important;
  align-items:flex-start!important;
  gap:4px!important;
}
.compras-page.flow-stage-compras .marketplace-main-line{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:7px;
  min-width:0;
  max-width:100%;
}
.compras-page.flow-stage-compras .customer-phone-list{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:3px;
  max-width:100%;
}
.compras-page.flow-stage-compras .customer-phone-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  max-width:100%;
  min-height:20px;
  border:1px solid #bbf7d0;
  border-radius:999px;
  background:#ecfdf5;
  color:#166534;
  padding:2px 6px;
  font-size:10px;
  line-height:1;
  font-weight:800;
  cursor:pointer;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.compras-page.flow-stage-compras .customer-phone-chip:hover{background:#dcfce7;border-color:#86efac}
@media(max-width:768px){
  .compras-page.flow-stage-compras .marketplace-cell{align-items:flex-start!important}
  .compras-page.flow-stage-compras .marketplace-label{max-width:none!important}
}
