.pmt-dialog{width:min(760px,calc(100vw - 32px));max-height:90dvh;overflow:auto;box-sizing:border-box;padding:24px;border:1px solid var(--ds-border,#ddd);border-radius:10px;background:var(--ds-surface,#fff);color:var(--ds-text,#18181b)}
.pmt-dialog::backdrop{background:#0006}
.pmt-dialog header{display:flex;align-items:center;justify-content:space-between;gap:16px}
.pmt-dialog h2{font-size:20px;margin:0 0 12px}.pmt-dialog header>button{flex-shrink:0}
.pmt-dialog label{display:block;margin:18px 0}
.pmt-dialog input,.pmt-dialog select{width:100%;box-sizing:border-box;min-width:0}
.pmt-help,.pmt-scope{font-size:13px;line-height:1.5;color:var(--ds-muted,#73737d);margin:12px 0}
.pmt-help>summary{cursor:pointer}
.pmt-dialog footer{display:flex;justify-content:flex-end;gap:10px;padding-top:18px}
.pmt-rule{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 0;border-bottom:1px solid var(--ds-border,#ddd)}
.pmt-rule>div:first-child{min-width:0;overflow-wrap:anywhere}
.pmt-rule span{display:block;font-size:13px;color:var(--ds-muted,#73737d);margin-top:6px}
.pmt-rule .actions{display:flex;flex-wrap:wrap;gap:8px;flex-shrink:0}
.pmt-dialog [data-pmt-error]{color:var(--ds-danger,#b42336);font-size:13px}
.pa-manual-label{display:block;font-size:11px;color:var(--ds-muted,#73737d);margin-top:6px}
.pa-type-actions{display:flex;flex-wrap:wrap;gap:8px}
@media(max-width:600px){.pmt-dialog{padding:18px}.pmt-rule{align-items:flex-start;flex-direction:column}.pmt-dialog input,.pmt-dialog select,.pmt-dialog button{min-height:44px}.pmt-dialog footer{flex-wrap:wrap}}
/* Reserve space for the material classification action, even with long descriptions. */
html body #app #purchase-analytics .pa-family [data-pa-items] table{table-layout:auto;width:100%}

html body #app #purchase-analytics .pa-family [data-pa-items] td{vertical-align:top}
html body #app #purchase-analytics .pa-family [data-pa-items] td:has([data-pa-edit-type]){
 width:128px;min-width:128px;white-space:nowrap;overflow-wrap:normal;word-break:normal;
}
html body #app #purchase-analytics [data-pa-edit-type]{
 display:inline-flex!important;align-items:center;justify-content:center;
 width:auto!important;min-width:100px!important;max-width:none!important;
 height:auto!important;min-height:32px;padding:7px 12px!important;
 white-space:nowrap!important;overflow-wrap:normal!important;word-break:normal!important;
 line-height:1.3!important;flex-shrink:0;
}
html body #app #purchase-analytics .pa-family [data-pa-items] td:first-child{width:48%;min-width:180px}
html body #app #purchase-analytics .pa-family [data-pa-items] td:nth-child(4){min-width:110px}
@media(max-width:767px){
 html body #app #purchase-analytics .pa-family [data-pa-items] table,
 html body #app #purchase-analytics .pa-family [data-pa-items] tbody{display:block;width:100%;min-width:0}
 html body #app #purchase-analytics .pa-family [data-pa-items] thead{display:none}
 html body #app #purchase-analytics .pa-family [data-pa-items] tr{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;padding:14px;border-bottom:1px solid var(--ds-border,#ddd)}
 html body #app #purchase-analytics .pa-family [data-pa-items] td{display:block;width:auto!important;min-width:0!important;padding:0;border:0;white-space:normal;overflow-wrap:anywhere}
 html body #app #purchase-analytics .pa-family [data-pa-items] td:first-child,
 html body #app #purchase-analytics .pa-family [data-pa-items] td:nth-child(4),
 html body #app #purchase-analytics .pa-family [data-pa-items] td:has([data-pa-edit-type]){grid-column:1/-1}
 html body #app #purchase-analytics .pa-family [data-pa-items] td:before{display:block;font-size:10px;font-weight:600;color:var(--ds-muted,#73737d);margin-bottom:4px}
 html body #app #purchase-analytics .pa-family [data-pa-items] td:nth-child(2):before{content:'Quantidade'}
 html body #app #purchase-analytics .pa-family [data-pa-items] td:nth-child(3):before{content:'Valor sem IVA'}
 html body #app #purchase-analytics .pa-family [data-pa-items] td:nth-child(4):before{content:'Fornecedores'}
 html body #app #purchase-analytics [data-pa-edit-type]{min-height:44px}
}
@media(max-width:767px){
 html body #app #purchase-analytics .pa-family [data-pa-items] tr,
 html body #app #purchase-analytics .pa-family [data-pa-items] td{
  height:auto!important;min-height:0!important;max-height:none!important;
 }
}
