/* AQQ 0.2 — contraste e consulta comercial. Sem dependências externas. */
:root{--ink:#202d38;--muted:#5c6b76;--line:#dbe2e6;--blue:#245bc0;--green:#246b50;--bg:#f3f5f7;--sidebar:#edf1f0}
.button{font-size:12px;font-weight:600;border-color:#cbd4db;height:40px}
.button.primary{background:#245bc0;border-color:#245bc0;box-shadow:0 3px 7px #245bc025;color:#fff}
.button.primary:hover{background:#194b9f;border-color:#194b9f}
.button.subtle,.text-button,.document-link{color:#2456a4}
.icon-button{color:#536575}.icon-button:hover{background:#e8eff7;color:#173e72}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline-color:#245bc0}
input::placeholder,textarea::placeholder{color:#65737d}
.input-with-icon:focus-within{border-color:#245bc0;box-shadow:0 0 0 3px #245bc01f}
.nav-item{color:#4c5f59;font-size:13px}.nav-item .icon{color:inherit}
.nav-item.active{color:#194b9f;background:#e2ebfa;border-color:#b9cdef;box-shadow:inset 3px 0 #245bc0;font-weight:650}
.nav-item.active .icon{color:inherit}.nav-count{background:#fff;color:#2456a4}
.sidebar{border-color:#ccd6d2}.sidebar-profile{border-color:#ccd6d2;background:#fff}
.brand-copy span,.nav-section-label,.side-search,.sidebar-profile small,.workspace-note,.workspace-note strong,.desktop-crumb,.header-search,.demo-label,.page-heading p,.eyebrow,.stat-label,.stat-foot,.card-heading p,.chart-legend>span,.chart-bottom>span,.product-row-copy small,.product-rank,.card-bottom-link,.heading-count,.table-person small,.table-sub,.table-footer,.table-footer>span,.attention-item small,.attention-note,.page-footer,.list-caption,.overview-strip span,.small-empty,.empty-state,.catalog-card p,.product-category,.goal-main>p,.goal-large-labels,.goal-two span,.definition-card p,.section-number p,.empty-items p,.summary-row,.summary-total span,.summary-hint,.field-hint,.modal-intro,.demo-footnote,.command-row small,.command-hint,.product-detail-info p,.product-detail-info small,.help-content>p,.help-content>div{color:#5c6b76}
.card,.stat-card{border-color:#d7e0e6;box-shadow:0 2px 4px #152b3b04}
.goal-banner{background:linear-gradient(115deg,#253e61,#3c5b88)}
.goal-banner p,.goal-caption,.banner-kicker,.goal-values div small{color:#e0e8f4}
.goal-banner p strong{color:#fff}.goal-caption{font-size:10px}.banner-kicker{font-size:10px}.goal-banner p{font-size:12px}
.stat-label{font-size:12px}.stat-label .icon{color:#637b90}.stat-foot,.delta{font-size:10px}.delta.positive{color:#246b50}.green-dot{color:#246b50}
.card-heading p{font-size:11px}.chart-legend>span,.chart-bottom>span{font-size:10px}.sales-chart text{fill:#61707b;font-size:10px}
.segmented-control button{color:#566877;font-size:10px}.segmented-control button.selected{color:#194b9f;font-weight:600}
.product-row-copy strong,.attention-item strong{font-size:12px}.product-row-copy small,.attention-item small{font-size:10px}
.product-mini-track i{background:#658d75}.card-bottom-link{font-size:11px}.table-footer,.page-footer{font-size:10px}
.table-person strong{font-size:12px}.table-person small,.table-sub{font-size:11px}.table-person:hover strong{color:#245bc0}
th{font-size:10px;color:#536573;background:#f5f7f9;border-color:#dce3e8;font-weight:600}
td{border-color:#e4e9ed}tbody tr:hover{background:#f7faff}table{font-size:12px}.amount{font-size:12px;font-weight:600}
.badge{font-size:11px;font-weight:600;padding:5px 8px;border:1px solid transparent}
.badge.green{background:#e6f3eb;color:#226245;border-color:#c5dfce}.badge.blue{background:#e8effc;color:#2453a2;border-color:#cbdaf5}.badge.amber{background:#fff3d9;color:#805808;border-color:#eedbad}.badge.neutral{background:#edf0f2;color:#53616b;border-color:#dce2e6}
.avatar.sage,.product-symbol.sage,.attention-icon.sage{color:#456341}.avatar.sand,.product-symbol.sand{color:#78613e}.avatar.rose,.product-symbol.rose{color:#8d514a}.avatar.blue,.product-symbol.blue,.attention-icon.blue{color:#365b98}.attention-icon.amber{color:#805808}
.overview-strip strong{color:#285b43}.definition-card h2,.goal-large-labels strong{color:#2c5f45}.goal-large-track i,.inline-progress i{background:#477f5b}.inline-progress strong{color:#365f43}
.field,.summary-row strong,.modal-intro strong{color:#384f5a}.form-error{color:#a92b25}
.section-number>span{background:#e6eefb;color:#2456a4}.empty-items h3{color:#476555}.summary-hint,.demo-footnote{font-size:11px}
.record-identity{display:flex;align-items:center;gap:10px}.record-identity>div{min-width:0}.client-link{display:block;text-align:left;font-weight:600;font-size:12px;padding:3px 0;color:#233b4a}.client-link:hover{text-decoration:underline;color:#245bc0}
.document-link{display:inline-flex;align-items:center;gap:5px;font-size:12px;font-weight:600;text-align:left;padding:4px 0}.document-link:hover{text-decoration:underline}.document-link .icon{width:14px;height:14px}
.record-number{font-size:11px;font-weight:500;margin-top:2px}.customer-document{font-size:12px;font-weight:500;white-space:nowrap}
.editor-customer{display:flex;gap:10px;align-items:center;width:100%;padding:12px;background:#f2f6fc;border:1px solid #cfddf0;border-radius:8px;text-align:left}.editor-customer>span:nth-child(2){flex:1}.editor-customer strong,.editor-customer small{display:block}.editor-customer small{font-size:11px;color:var(--muted);margin-top:4px}.editor-customer>span:last-child{display:flex;align-items:center;gap:4px;color:#2456a4;font-size:11px}.editor-customer .icon{width:14px;height:14px}
.reuse-notice{display:flex;align-items:center;gap:10px;background:#eaf1fd;border:1px solid #c1d4f3;border-radius:10px;padding:14px 18px;margin-bottom:20px;color:#234c86;font-size:12px;line-height:1.6}
/* Diálogos: cabeçalho e ações permanecem acessíveis enquanto o conteúdo rola. */
dialog.commercial-dialog{width:1120px;max-width:calc(100vw - 48px);max-height:calc(100dvh - 48px);padding:0;overflow:hidden;border-color:#c6d2dc;border-radius:18px;box-shadow:0 24px 100px #152d4a40}
dialog.commercial-dialog[open]{display:flex;flex-direction:column}
dialog::backdrop{background:#172b446b;backdrop-filter:blur(3px)}
.commercial-dialog .modal-heading{flex-shrink:0;padding:18px 26px;margin:0;border-bottom:1px solid var(--line);background:#fff}
.commercial-dialog .modal-heading h2{font-size:16px;font-weight:650;letter-spacing:-.02em}
.commercial-dialog .modal-heading .icon-button{border-color:#cdd6de;background:#f7f9fb}
.commercial-scroll{overflow-y:auto;overscroll-behavior:contain;padding:26px;min-height:0;background:#f6f8fb;scrollbar-gutter:stable}
.commercial-footer{flex-shrink:0;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 26px;border-top:1px solid var(--line);background:#fff}
.commercial-footer>span{display:flex;align-items:center;gap:7px;color:var(--muted);font-size:11px}.commercial-footer>span .icon{width:14px;height:14px}
.commercial-footer>div{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.client-hero,.document-hero{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:24px}
.client-heading{display:flex;gap:16px;align-items:center;min-width:0}.client-heading>.avatar{width:62px;height:62px;font-size:22px;border-radius:16px}
.client-heading h2{font-size:27px;font-weight:650}.client-heading .eyebrow,.document-hero .eyebrow{display:block;font-size:10px;margin-bottom:6px;color:#536c84}
.client-heading p{font-size:12px;color:var(--muted);margin-top:3px}.client-identification{display:flex;gap:17px;flex-wrap:wrap;margin-top:10px;font-size:11px;color:#425767}.client-identification>span{display:flex;gap:5px;align-items:center}.client-identification .icon{width:13px;height:13px}
.customer-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border:1px solid #cedbe6;border-radius:12px;background:#fff;margin-bottom:16px;overflow:hidden}
.customer-stats>div{padding:18px 22px;border-right:1px solid #e0e7ee}.customer-stats>div:last-child{border:0}.customer-stats span{display:block;font-size:11px;color:var(--muted)}.customer-stats strong{display:block;margin-top:8px;font-size:23px;letter-spacing:-.035em;font-weight:620;color:#233f5c;font-variant-numeric:tabular-nums}
.client-contact-strip{display:flex;align-items:center;gap:22px;margin:17px 0 24px;flex-wrap:wrap;color:#465d6b;font-size:12px}.client-contact-strip>span{display:flex;gap:7px;align-items:center}.client-contact-strip .icon{width:15px;height:15px}.client-contact-strip .data-scope{margin-left:auto}
.detail-tabs{display:flex;align-items:center;gap:22px;border-bottom:1px solid #cfd9e2;margin-bottom:20px;overflow-x:auto}
.detail-tabs button{display:inline-flex;align-items:center;gap:8px;white-space:nowrap;padding:13px 1px;border-bottom:3px solid transparent;font-size:12px;color:#5c6b76;font-weight:550}.detail-tabs button.active{border-bottom-color:#245bc0;color:#1e51a5;font-weight:650}.detail-tabs button>span{background:#e6ebf1;border-radius:5px;padding:3px 6px;font-size:10px}.detail-tabs button.active>span{background:#dce8fc;color:#2453a2}
.detail-tabs button:focus-visible{outline-offset:-3px;border-radius:4px}
.history-toolbar{display:flex;align-items:center;gap:15px;margin:0 0 15px}.history-toolbar .input-with-icon{flex:1;max-width:400px}.history-toolbar>span{display:flex;align-items:center;gap:6px;color:var(--muted);font-size:10px}.history-toolbar>span .icon{width:13px;height:13px}
#customer-panel{min-height:200px}#customer-panel>.table-scroll{background:#fff;border:1px solid #d7e0e6;border-radius:10px}.history-table th,.history-table td{padding:14px}.history-table th:first-child{border-top:0}.history-table .history-products{font-size:12px;display:block;max-width:220px}.history-table td:first-child{white-space:nowrap}
.history-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:17px;font-size:11px;color:var(--muted)}.history-pagination>div{display:flex;gap:12px;align-items:center}.history-pagination .button{height:34px;font-size:11px}
.history-empty{padding:36px 20px;display:flex;align-items:center;justify-content:center;gap:10px;color:var(--muted);font-size:12px;background:#fff;border-radius:10px}.history-empty>.icon{width:22px;height:22px}
.detail-section{background:#fff;border:1px solid #d9e2e9;border-radius:12px;padding:20px;margin-bottom:18px;min-width:0}.detail-section:last-child{margin-bottom:0}.detail-section h3{display:flex;align-items:center;gap:8px;font-size:14px;font-weight:650}.detail-section h3 .icon{width:17px;height:17px;color:#58738d}
.section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}.section-heading p{font-size:11px;color:var(--muted);margin-top:4px}.section-heading>span{font-size:10px;color:var(--muted)}
.registration-layout{display:grid;grid-template-columns:1fr 1fr;gap:18px}.registration-layout .detail-section{margin:0}.registration-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px 16px;margin:22px 0 4px}
.registration-grid dt,.document-summary dt{font-size:11px;color:var(--muted);margin-bottom:6px}.registration-grid dd,.document-summary dd{font-size:12px;margin:0;line-height:1.6;font-weight:550;overflow-wrap:anywhere}
.data-scope{font-size:11px;color:var(--muted);line-height:1.65}.detail-section>p.data-scope{margin-top:16px}
.customer-products-layout{display:grid;gap:18px}.customer-products-layout .detail-section{margin:0}
.suggested-product{display:flex;align-items:center;gap:12px;padding:14px 0;border-bottom:1px solid var(--line)}.suggested-product>div{flex:1;min-width:0}.suggested-product strong{display:block;font-size:12px}.suggested-product small{display:block;font-size:11px;color:var(--muted);margin-top:5px}
.document-title{display:flex;align-items:center;gap:14px;margin:8px 0}.document-title h2{font-size:30px;font-weight:650;letter-spacing:-.04em}.document-hero p{font-size:12px;color:var(--muted)}
.document-layout{display:grid;grid-template-columns:minmax(0,1fr) 270px;gap:22px;align-items:start}.document-main{min-width:0}.document-summary{padding:22px;background:#eaf0f7;border:1px solid #cbd9e7;border-radius:12px;min-width:0}
.document-summary .eyebrow{display:block;color:#4b6480}.summary-amount{font-size:30px;font-weight:650;letter-spacing:-.045em;color:#1e3e61;display:block;margin:15px 0 7px}.document-summary dl{margin:20px 0;padding:17px 0;border-top:1px solid #cbd9e7;border-bottom:1px solid #cbd9e7;display:grid;gap:16px}.document-summary dd{color:#2d4659}
.document-origin>span{display:block;font-size:11px;color:var(--muted);margin-bottom:8px}.document-origin .button{color:#2453a2}.document-origin p{font-size:12px;line-height:1.7}
.customer-quick-info{padding-top:20px;margin-top:20px;border-top:1px solid #cbd9e7}.customer-quick-info h4{font-size:12px;margin:0 0 12px}.customer-quick-info p{display:flex;align-items:center;gap:7px;font-size:11px;color:#4b6073;margin:8px 0;overflow-wrap:anywhere}.customer-quick-info .icon{width:14px;height:14px}
.document-customer{display:flex;align-items:center;gap:12px;width:100%;border:1px solid #c3d4e9;border-radius:11px;padding:17px;margin-bottom:17px;background:#fff;text-align:left}.document-customer:hover{background:#edf4ff;border-color:#7fa4db}.document-customer>span:nth-child(2){flex:1;min-width:0}.document-customer strong{display:block;font-size:15px;font-weight:650}.document-customer small{display:block;font-size:11px;color:var(--muted);margin:4px 0 9px}.document-customer>span:nth-child(2)>span{font-size:11px;color:#435c70}.document-customer .open-client{display:flex;align-items:center;gap:3px;font-size:11px;color:#2453a2;white-space:nowrap}.document-customer .open-client .icon{width:15px;height:15px}
.document-items-table th,.document-items-table td{padding:14px 8px}.document-items-table th:first-child,.document-items-table td:first-child{padding-left:0}.document-items-table th:last-child,.document-items-table td:last-child{padding-right:0}.document-items-table td{font-size:11px}.document-items-table .amount{font-size:12px}.item-name{display:flex;align-items:center;gap:9px;min-width:160px}.item-name>span{font-size:10px;color:#657b8f;background:#eef2f6;padding:5px;border-radius:4px}.item-name strong{font-size:12px;font-weight:550;line-height:1.5;display:block}
.observations-section{background:#fffdf5;border-color:#e7d9aa}.observations-section h3{color:#66501c}.observations-section .local-data-label{color:#715616;border:1px solid #e5d6a6;border-radius:4px;padding:4px 6px;font-size:10px;background:#fff8e2;white-space:nowrap}.document-notes{font-size:13px;color:#403d33;line-height:1.8;white-space:pre-wrap;overflow-wrap:anywhere}
.related-documents{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.related-documents>button{display:flex;flex-direction:column;align-items:flex-start;gap:9px;padding:13px 11px;text-align:left;background:#f8fafc;border:1px solid #d9e3ec;border-radius:8px}.related-documents>button:hover{background:#eaf1fc;border-color:#a8c2e6}.related-documents>button>span:first-child{display:flex;align-items:center;gap:6px;font-size:12px;color:#2453a2}.related-documents .icon{width:14px;height:14px}.related-documents small{font-size:10px;color:var(--muted)}.related-documents b{font-size:13px;font-weight:600}.related-documents .badge{font-size:10px}
@media(max-width:1100px){.document-layout{grid-template-columns:minmax(0,1fr) 230px;gap:16px}.document-summary{padding:18px}.customer-stats>div{padding:17px}.customer-stats strong{font-size:21px}.document-main .section-heading{flex-wrap:wrap}.client-heading h2{font-size:24px}}
@media(max-width:760px){
 .stat-label{font-size:10px}.stat-foot,.delta{font-size:9px}.page-heading p{font-size:12px}.page-actions{flex-wrap:wrap}.recent-orders .record-identity .avatar{display:none}.recent-orders .client-link{font-size:11px}.recent-orders .badge{font-size:10px}.recent-orders th,.recent-orders td{padding:12px 9px}.top-product-list{grid-template-columns:1fr}.chart-bottom{flex-wrap:wrap}.chart-legend>span{font-size:9px}.stat-foot .delta+span{display:none}
 dialog.commercial-dialog{max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px);border-radius:12px}.commercial-dialog .modal-heading{padding:12px 16px}.commercial-scroll{padding:18px 14px;scrollbar-gutter:auto}.commercial-footer{padding:12px;gap:8px}.commercial-footer>span{display:none}.commercial-footer>div{width:100%;justify-content:flex-end;gap:7px}.commercial-footer .button{font-size:11px;padding:0 10px;height:40px}
 .client-hero,.document-hero{align-items:flex-start;flex-direction:column;gap:15px;margin-bottom:18px}.client-hero>.button{align-self:stretch}.client-heading{gap:12px}.client-heading>.avatar{width:47px;height:47px;font-size:18px}.client-heading h2{font-size:23px}.client-heading p{font-size:11px}.client-identification{gap:8px;font-size:11px}.customer-stats{grid-template-columns:1fr 1fr}.customer-stats>div{padding:14px;border-bottom:1px solid #e0e7ee}.customer-stats>div:nth-child(2){border-right:0}.customer-stats>div:nth-last-child(-n+2){border-bottom:0}.customer-stats strong{font-size:21px}.customer-stats span{font-size:10px}.client-contact-strip{gap:10px;margin:14px 0;font-size:11px}.client-contact-strip .data-scope{margin-left:0;width:100%;font-size:10px}
 .detail-tabs{gap:18px;margin-bottom:16px}.detail-tabs button{font-size:12px;padding:12px 0;gap:5px}.history-toolbar{flex-wrap:wrap;gap:9px}.history-toolbar .input-with-icon{flex-basis:100%;max-width:none}.history-toolbar input{font-size:11px}.history-table{min-width:630px}.history-pagination{gap:10px;flex-wrap:wrap;font-size:10px}.history-pagination>div{gap:8px}.registration-layout,.document-layout{grid-template-columns:1fr}.registration-grid{gap:16px;grid-template-columns:1fr 1fr}.detail-section{padding:16px}.registration-grid dd{font-size:11px}.document-summary{order:-1;padding:17px}.document-summary .summary-amount{font-size:30px}.document-summary dl{grid-template-columns:1fr 1fr;gap:14px}.document-summary .customer-quick-info{display:none}.document-summary .document-origin{display:flex;align-items:center;justify-content:space-between;gap:12px}.document-origin>span{margin:0}.document-origin p{max-width:170px;font-size:11px}.document-customer{padding:13px;gap:9px}.document-customer strong{font-size:14px}.document-customer .open-client{font-size:0}.document-customer .open-client .icon{width:17px;height:17px}.document-customer small{font-size:10px}.document-items-table{min-width:560px}.document-main .detail-tabs{gap:16px}.document-main .detail-tabs button{font-size:11px}.related-documents{grid-template-columns:1fr}.related-documents>button{display:grid;grid-template-columns:1fr 1fr;gap:9px}.related-documents small{text-align:right}.related-documents .badge{justify-self:end}.document-title h2{font-size:28px}.document-hero>.button{width:100%;font-size:12px}.section-heading{flex-wrap:wrap}.section-heading h3{font-size:13px}.suggested-product .product-symbol{display:none}.editor-customer>span:last-child{font-size:0}.editor-customer small{font-size:10px}.reuse-notice{font-size:11px;align-items:flex-start}
}
@media(max-width:430px){.stat-value{font-size:18px}.stat-card{padding:16px 12px}.stat-label{font-size:10px}.customer-stats strong{font-size:19px}}
#selected-customer:empty{display:none}
@media(max-width:760px){.client-hero~.detail-tabs{gap:12px}.client-hero~.detail-tabs button{font-size:11px;gap:4px}.client-hero~.detail-tabs button>span{padding:3px 5px}}

/* Disponibilidade e andamento consultados na Produção. */
.production-meta{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:0 0 18px;padding:13px 16px;border:1px solid #d4e1db;border-radius:10px;background:#f4f9f6;color:#315446}
.production-meta>div{min-width:0}.production-meta strong,.production-meta span{display:block}.production-meta strong{font-size:12px;font-weight:650}.production-meta span{margin-top:4px;font-size:10px;line-height:1.6;color:#5d7067}.production-meta .text-button{flex-shrink:0;color:#2c6350;font-size:11px}.production-meta.is-stale{background:#fff8e9;border-color:#e4d2aa;color:#74571e}.production-meta.is-stale span{color:#7a6740}
.production-progress{min-width:165px;max-width:300px;color:#2b4f63}.production-progress-title{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}.production-progress-title strong{font-size:13px;font-weight:700;font-variant-numeric:tabular-nums}.production-progress-title>span{font-size:10px;color:#347257}.production-track{height:7px;border-radius:99px;background:#e2e9ef;overflow:hidden;width:100%;margin-bottom:7px}.production-track>i{display:block;height:100%;background:#557ac9;border-radius:inherit}.production-piece-count{display:block;font-size:10px;font-variant-numeric:tabular-nums;color:#5c6c79}.production-progress.is-complete .production-track>i{background:#378366}.production-progress.is-stale .production-track>i{background:#a38343}.production-progress.is-unknown{font-size:11px;line-height:1.6;color:#6b747c;max-width:185px}.production-progress.is-compact{min-width:115px;max-width:160px;margin-top:8px}.production-progress.is-compact .production-progress-title{margin-bottom:5px}.production-progress.is-compact .production-progress-title strong{font-size:11px}.production-progress.is-compact .production-track{height:5px;margin-bottom:4px}.production-freshness{display:block;font-size:10px;line-height:1.5;color:#73808b;margin-top:6px}.production-freshness.is-stale{color:#82601f;font-weight:600}
.order-production-panel{padding:20px;border:1px solid #c8d9e5;border-radius:12px;background:#f4f8fc;margin-bottom:18px}.production-panel-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:17px}.production-panel-heading h3{font-size:14px;color:#2a475f}.production-panel-heading>span{font-size:10px;color:#64768b}.order-production-panel .production-progress{max-width:none;min-width:0}.order-production-panel .production-progress-title strong{font-size:22px}.order-production-panel .production-track{height:10px}.order-production-panel .production-piece-count{font-size:12px}.production-milestones{display:flex;gap:22px;flex-wrap:wrap;padding-top:15px;margin-top:15px;border-top:1px solid #d5e1ea;font-size:11px;color:#66778a}.production-milestones strong{margin-left:5px;color:#344d65;font-weight:650}.production-footnote{font-size:10px;color:#708094;line-height:1.6;margin-top:11px}
.stock-label{display:inline-flex;align-items:center;gap:5px;font-size:10px;line-height:1.5;padding:4px 7px;border-radius:5px;background:#f0f2f3;color:#65717a}.stock-label>i{width:5px;height:5px;border-radius:50%;background:currentColor;flex-shrink:0}.stock-label strong{font-size:inherit!important;font-weight:650!important;letter-spacing:0!important}.stock-label.has-stock{background:#e9f4ed;color:#266b49}.stock-label.is-empty{background:#f0f2f3;color:#68747d}.stock-label.is-stale{background:#fff3d9;color:#806020}.stock-label.is-unknown{padding:0;background:transparent;color:#7a828a;font-size:10px}.stock-subset{display:block;margin-top:5px;font-size:10px;line-height:1.6;color:#617264}.stock-slot{margin-top:7px}.stock-help{font-size:10px;color:#6a7a70;line-height:1.6;margin:9px 0 12px}.stock-help strong{font-weight:650;color:#3d634f}.suggestion .suggestion-copy{flex:1;min-width:0}.suggestion .suggestion-copy>.stock-slot{display:block;margin-top:5px}.suggestion .stock-label{font-size:10px}.catalog-card>.stock-slot{display:block;text-align:left;margin:8px 0}.catalog-card>.stock-slot .stock-label{display:inline-flex}.catalog-card>.stock-slot .production-freshness{display:block}.product-detail-stock{padding:13px 15px;margin:16px 0;border:1px solid #d5e2d9;border-radius:8px;background:#f6faf7}.product-detail-stock>strong{font-size:11px;display:block;margin-bottom:7px;color:#4b6755}
@media(max-width:760px){.production-meta{gap:10px;padding:12px;margin-bottom:15px;align-items:flex-start}.production-meta strong{font-size:11px}.production-meta span{font-size:10px}.production-meta .text-button{font-size:10px}.production-progress{min-width:135px}.production-progress.is-compact{min-width:105px;max-width:140px}.production-progress-title strong{font-size:12px}.order-production-panel{padding:16px}.production-panel-heading{align-items:flex-start;gap:8px}.production-panel-heading>span{display:none}.order-production-panel .production-progress-title{align-items:flex-start;flex-wrap:wrap}.order-production-panel .production-progress-title strong{font-size:21px}.production-milestones{gap:9px 17px;font-size:10px}.suggestion .suggestion-copy>.stock-slot{margin-top:6px}.suggestion .stock-label{font-size:9px}.suggestion b{align-self:flex-start;margin-top:3px}.stock-help{font-size:10px}.catalog-card>.stock-slot .stock-label{font-size:9px}}

/* Previsão local do pedido, compartilhada com a agenda. */
.order-delivery-cell{min-width:112px;max-width:200px;color:var(--ink);line-height:1.6}
.order-delivery-panel{margin:20px 0 4px;padding:16px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.order-delivery-panel h3{display:flex;align-items:center;gap:7px;font-size:12px;font-weight:600;margin:0 0 10px}
.order-delivery-panel h3 .icon{width:16px;height:16px;color:var(--green)}
.order-delivery-value{display:block;font-size:16px;font-weight:650;line-height:1.5}
.order-delivery-panel>.data-scope{margin:5px 0 12px;font-size:11px}
.order-delivery-panel>.button{width:100%;justify-content:center}
.order-delivery-panel form{margin-top:16px}
.order-delivery-panel .field{font-size:11px;gap:7px}
.order-delivery-panel input{min-width:0;max-width:100%;box-sizing:border-box;width:100%;font-size:13px}
.order-delivery-panel .field-hint{font-size:11px;line-height:1.5;margin:10px 0}
.order-delivery-actions{display:flex;gap:6px;justify-content:space-between;flex-wrap:wrap;margin-top:12px}
.order-delivery-actions .button{font-size:11px;padding:0 10px;flex:1;justify-content:center}
.period-label{font-size:10px;color:var(--muted)}

/* Orçamento prévio: a identificação não cria um cadastro de cliente. */
.field[hidden]{display:none}
.preliminary-notice{margin:0 0 20px;padding:15px 18px;background:#fff8e9;border:1px solid #e9d7aa;border-radius:10px;color:#695025}
.preliminary-notice p{margin:6px 0 0;line-height:1.5;font-size:13px}
.commercial-footer>div{flex-wrap:wrap}

/* Consulta comercial renovada com Unslop, Damir Sokolovsky, CC BY 4.0. */
.document-view {
  min-width: 0;
  color: var(--ink);
}

.document-view--preview {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

html:root dialog.commercial-dialog:has(> .document-view--preview) > .modal-heading {
  padding: 12px 24px;
}

.document-view-header {
  flex: none;
  padding: 12px 24px 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.document-view--page .document-view-header {
  padding: 0;
  background: transparent;
}

.document-list-return { margin-bottom: 8px; }
.document-view--page .document-view-header h1 { margin-bottom: 12px; overflow-wrap: anywhere; }

.document-view-toolbar {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
}

.document-view-status,
.document-view-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.document-view-actions { min-width: 0; margin-inline-start: auto; }
.document-view-date { font-size: 12px; color: var(--muted); }
.document-view-actions .button { min-height: 36px; height: 36px; }
.document-view-actions .badge { margin-inline-end: 4px; }
.document-view-menu { position: relative; margin-inline-start: auto; }
.document-view-menu > summary { cursor: pointer; list-style: none; }
.document-view-menu > summary::-webkit-details-marker { display: none; }
.document-view-menu > summary:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.document-view-menu[open] > summary .icon { transform: rotate(180deg); }

.document-view-menu-panel {
  position: absolute;
  z-index: 2;
  inset-block-start: calc(100% + 4px);
  inset-inline-end: 0;
  display: grid;
  align-items: start;
  gap: 2px;
  width: min(264px, calc(100vw - 40px));
  max-height: min(352px, 45dvh);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 6px 20px #27332f1f;
}

.document-view-menu:not([open]) > .document-view-menu-panel { display: none; }
.document-view .document-view-menu-panel .button {
  justify-content: flex-start;
  width: 100%;
  min-height: 36px;
  height: auto;
  padding: 7px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
  text-align: start;
  white-space: normal;
}

.document-view .document-view-menu-panel .button:not(:disabled):hover,
.document-view .document-view-menu-panel .button:focus-visible { background: var(--bg); }
.document-view .document-view-menu-panel .button:focus-visible { outline-offset: -2px; }
.document-view-menu-panel .button.document-danger { color: #913c30; }
.document-erp-options { display: grid; gap: 2px; padding-top: 4px; border-top: 1px solid var(--line); }
.document-erp-options .data-scope,
.document-erp-options .form-error:not(:empty),
.document-erp-blockers { margin: 4px 8px; font-size: 12px; }
.document-erp-blockers { padding-inline-start: 16px; color: var(--muted); }
.document-fiscal-items { padding: 4px 8px; color: var(--muted); font-size: 12px; }
.document-fiscal-items summary { cursor: pointer; }
.document-fiscal-items dl > div { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; }

html:root .document-view .document-view-tabs {
  flex-wrap: wrap;
  gap: 4px 24px;
  margin: 8px 0 -1px;
  border-color: transparent;
}

html:root .document-view .document-view-tabs button { padding: 12px 0 8px; }
html:root .document-view .document-view-scroll { padding: 16px 24px; }
html:root .document-view--page .document-view-scroll { padding: 16px 0 24px; overflow: visible; background: transparent; }
.document-view-note { margin: 0 0 12px; color: var(--muted); font-size: 12px; }
.document-view .erp-operation { margin: 0 0 12px; }
.document-view-layout { grid-template-columns: minmax(0, 1fr) clamp(222px, 24%, 280px); gap: 16px; }

html:root .document-view .detail-section { margin: 0 0 12px; padding: 16px; }
html:root .document-view .document-items-panel { padding: 0; overflow: hidden; }

.document-items-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 12px 16px;
  color: var(--muted);
  font-size: 13px;
}

.document-items-toolbar .document-items-search { width: min(100%, 280px); min-width: 0; height: 36px; }
.document-items-search input { min-width: 0; width: 100%; }
.document-view .document-items-scroll { max-height: min(56dvh, 680px); overflow: auto; }
.document-items-scroll:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.document-view .document-items-table { min-width: 560px; }
.document-view .document-items-table :is(th,td) { padding: 8px 12px; }
.document-view .document-items-table :is(th,td):first-child { padding-inline-start: 16px; }
.document-view .document-items-table thead th { position: sticky; top: 0; z-index: 1; background: var(--bg); white-space: nowrap; }
.document-view .document-items-table td { font-variant-numeric: tabular-nums; }
.document-view .document-items-table [hidden] { display: none; }
.document-view .document-items-table [data-document-items-empty] td { padding-block: 24px; color: var(--muted); text-align: center; }
.document-view .item-name { align-items: flex-start; }
.document-view .item-name strong { overflow-wrap: anywhere; font-weight: 500; }
html:root .detail-section.document-note-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 12px;
  padding: 16px;
}
.document-note-panel > .document-notes,
.document-note-panel > form { grid-column: 1 / -1; margin: 0; }
.document-note-panel > .document-notes { color: var(--ink); line-height: 1.6; }
.document-note-actions { display: flex; flex-wrap: wrap; justify-content: end; gap: 4px; }
.document-note-panel > .document-notes.form-error { color: var(--danger, #8b2c21); }
html:root .document-note-panel .document-note-edit {
  min-height: 40px;
  gap: 8px;
  padding: 4px 8px;
  border-color: transparent;
  background: transparent;
  color: var(--blue);
}
html:root .document-note-panel .document-note-edit:hover,
html:root .document-note-panel .document-note-edit:focus-visible { background: var(--bg); }
.document-note-edit .icon { width: 16px; height: 16px; }
.document-note-panel > form { display: grid; gap: 8px; }
.document-note-panel > form .modal-actions { margin: 0; }
.erp-edit-notes { margin-top: 18px; }
.document-progress-panel { container-type: inline-size; }
.document-progress-panel .section-heading { flex-wrap: wrap; margin-bottom: 12px; }
.document-progress-panel .section-heading > div { margin-inline-end: auto; }
.document-progress-panel .section-heading p { line-height: 1.5; }
.document-progress-panel > .form-error { margin-block: 8px 12px; }
.document-order-invoice {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
}
.document-order-invoice dt { color: var(--muted); font-size: 11px; }
.document-order-invoice dd { margin: 4px 0 0; font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.document-order-invoice-review { border: 1px solid var(--line); border-radius: 8px; padding: 12px; font-size: 12px; line-height: 1.5; }
.document-order-invoice-review p { margin: 0; }
.document-order-invoice-review ul { margin: 6px 0 0; padding-inline-start: 20px; }
.document-order-fiscal-items { margin-top: 16px; }
.document-order-fiscal-items h4 { margin: 0; font-size: 13px; font-weight: 650; }
.document-order-fiscal-items .section-heading > span { font-size: 12px; }
.document-order-fiscal-warning { margin: 0 0 8px; }
.document-view .document-order-fiscal-table { min-width: 0; }
.document-order-fiscal-table :is(th,td) { padding: 8px; }
.document-order-fiscal-table td { font-variant-numeric: tabular-nums; }
.document-order-fiscal-table td[data-label]:not(:last-child) { white-space: nowrap; }
.document-order-fiscal-reference { font-size: 11px; color: var(--muted); overflow-wrap: anywhere; }
.document-order-quantity-pending { font-weight: 650; }
.document-order-release-scroll:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }

@container (max-width: 500px) {
  .document-order-invoice { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .document-order-invoice > div:first-child { grid-column: 1 / -1; }
  .document-order-fiscal-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .document-order-fiscal-table,
  .document-order-fiscal-table tbody { display: block; }
  .document-order-fiscal-table tbody tr {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 10px 4px;
    border-top: 1px solid var(--line);
  }
  html:root .document-order-fiscal-table td { min-width: 0; padding: 0; border: 0; text-align: start !important; overflow-wrap: anywhere; }
  html:root .document-order-fiscal-table td[data-label] { white-space: normal; }
  .document-order-fiscal-table td:is(:first-child,:last-child) { grid-column: 1 / -1; }
  .document-order-fiscal-table td[data-label]::before { display: block; content: attr(data-label); color: var(--muted); font-size: 10px; font-weight: 400; }
}

html:root .document-view .document-summary { padding: 16px; }
html:root .document-view .summary-amount { margin: 4px 0; font-size: 28px; }
html:root .document-view .document-summary dl { margin: 12px 0; padding: 12px 0 4px; }
.document-view .document-summary dl > div { margin-bottom: 8px; }
.document-view .document-summary .document-origin { margin-top: 12px; }
.document-view .order-delivery-panel > .button { margin-top: 8px; }

.document-view-client {
  display: flex;
  gap: 8px;
  width: 100%;
  align-items: flex-start;
  padding: 0;
  text-align: left;
}

.document-view-client > span:last-child { min-width: 0; }
.document-view-client strong { display: block; font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }
.document-view-client small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.document-view-client .document-view-client-link { display: flex; align-items: center; gap: 4px; margin-top: 4px; color: var(--blue); }
.document-view-client-link > .icon { width: 12px; height: 12px; }

html:root .document-view .document-view-footer { padding: 8px 24px; }
.document-view--page .document-view-footer { position: sticky; bottom: 0; z-index: 2; border: 1px solid var(--line); border-radius: 8px; }

@media (max-width: 820px) {
  .document-view-layout { grid-template-columns: minmax(0, 1fr); }
  .document-view .document-view-actions { flex-basis: 100%; }
  .document-view .document-items-scroll { max-height: min(60dvh, 560px); }
}

@media (max-width: 560px) {
  html:root .detail-section.document-note-panel > h3 { font-size: 14px; }
  .document-note-actions { grid-column: 1 / -1; justify-content: start; }
  html:root dialog.commercial-dialog:has(> .document-view--preview) > .modal-heading,
  .document-view-header,
  html:root .document-view .document-view-scroll,
  html:root .document-view .document-view-footer { padding-inline: 12px; }
  html:root .document-view--page .document-view-scroll { padding-inline: 0; }
  .document-view .document-view-footer > div { width: auto; }
  .document-view-actions { gap: 6px; }
  .document-view-actions .button { padding-inline: 8px; }
  .document-view-actions .button .icon { width: 14px; height: 14px; }
  .document-view .document-view-menu-panel .button { min-height: 40px; }
  .document-items-toolbar .document-items-search { flex: 1 1 160px; }
}

@media (max-width: 760px) {
  .document-view-layout--progress .document-summary { order: 0; }
}

@media (max-height: 480px) {
  .document-view--preview .document-view-menu-panel { max-height: 36dvh; }
}
