/* Orçamentos Premium v178 — layout horizontal e responsivo */
body:has(#gg178-metrics) main.erp011-page{width:min(100% - 36px,1720px)!important;max-width:none!important;margin:24px auto 56px!important;padding:0!important;display:flex;flex-direction:column;gap:16px}
body:has(#gg178-metrics) .erp011-heading{display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap;background:#152b48;color:white;border-radius:15px;padding:23px 27px;margin:0!important}
body:has(#gg178-metrics) .erp011-heading h1,body:has(#gg178-metrics) .erp011-heading p,body:has(#gg178-metrics) .erp011-heading .erp011-kicker{color:white!important}
#gg178-toggle-editor{background:white!important;color:#152b48!important;border:0;border-radius:9px;padding:12px 18px;font-weight:700;cursor:pointer}
.gg178-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.gg178-metric{background:white;border:1px solid #e0e7ef;border-radius:13px;padding:17px 19px;box-shadow:0 2px 9px #142a4810;min-width:0}
.gg178-metric[hidden],.gg178-editor[hidden]{display:none!important}
.gg178-metric-label{display:block;color:#60738b;font-size:13px;font-weight:600;margin-bottom:8px}
.gg178-metric strong{display:block;font-size:25px;color:#172e4b;font-variant-numeric:tabular-nums}
.gg178-value-row{display:flex;align-items:center;justify-content:space-between;gap:8px}
#gg178-eye{background:#eef3f8!important;color:#172e4b!important;border:1px solid #dce5ef!important;border-radius:8px;padding:7px 10px;font-size:12px;white-space:nowrap}
.gg178-editor{display:grid;grid-template-columns:1fr;gap:14px;scroll-margin-top:18px}
.gg178-editor-heading{padding:16px 22px;background:#eaf0f7;border-left:4px solid #173758;border-radius:9px}
.gg178-editor-heading h2,.gg178-editor-heading p{margin:0}.gg178-editor-heading p{margin-top:5px;color:#516782;font-size:13px}
body:has(#gg178-metrics) .panel{width:100%!important;max-width:none!important;margin:0!important;box-sizing:border-box}
body:has(#gg178-metrics) .quote074-client-row{display:grid!important;grid-template-columns:minmax(250px,2fr) minmax(180px,1fr) auto auto!important;gap:12px;align-items:end}
body:has(#gg178-metrics) .q074-item-form{display:grid!important;grid-template-columns:minmax(240px,3fr) minmax(100px,.8fr) minmax(140px,1fr) auto!important;gap:12px;align-items:end}
body:has(#gg178-metrics) .quote015-summary{display:flex;justify-content:flex-end;align-items:center;gap:20px;flex-wrap:wrap}
body:has(#gg178-metrics) .gg122-pending-head{display:flex;justify-content:space-between;align-items:center;gap:16px}
body:has(#gg178-metrics) .gg122-pending-search{flex:1;justify-content:flex-end}
body:has(#gg178-metrics) .gg122-pending-search input{width:min(430px,100%)}
body:has(#gg178-metrics) #gg122-pending-list>.order,body:has(#gg178-metrics) #list>.order{width:100%;max-width:none;box-sizing:border-box}
@media(max-width:950px){.gg178-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}body:has(#gg178-metrics) .quote074-client-row,body:has(#gg178-metrics) .q074-item-form{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:620px){body:has(#gg178-metrics) main.erp011-page{width:calc(100% - 20px)!important}.gg178-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.gg178-metric{padding:12px}.gg178-metric strong{font-size:19px}.gg178-value-row{flex-wrap:wrap}body:has(#gg178-metrics) .quote074-client-row,body:has(#gg178-metrics) .q074-item-form{grid-template-columns:1fr!important}body:has(#gg178-metrics) .erp011-heading{padding:18px}body:has(#gg178-metrics) .gg122-pending-head{align-items:stretch}body:has(#gg178-metrics) .gg122-pending-search{width:100%}}

/* v179 — conter a página na área útil ao lado do menu lateral. */
@media (min-width:801px){
  body.cash035-shared:has(#gg178-metrics)>main.erp011-page{
    box-sizing:border-box!important;
    width:calc(100% - 288px)!important;
    max-width:none!important;
    min-width:0!important;
    margin:24px 22px 56px 266px!important;
    padding:0!important;
  }
}
@media (max-width:800px){
  body.cash035-shared:has(#gg178-metrics)>main.erp011-page{
    box-sizing:border-box!important;
    width:calc(100% - 28px)!important;
    min-width:0!important;
    max-width:none!important;
    margin:16px 14px 48px!important;
    padding:0!important;
  }
}
body:has(#gg178-metrics) .gg178-metrics,
body:has(#gg178-metrics) .gg178-editor,
body:has(#gg178-metrics) .gg122-pending,
body:has(#gg178-metrics) .erp011-quote-list{min-width:0;max-width:100%;box-sizing:border-box}
body:has(#gg178-metrics) .gg122-pending-head>*{min-width:0}
body:has(#gg178-metrics) #gg122-pending-list,
body:has(#gg178-metrics) #list{max-width:100%;min-width:0;overflow-x:auto}
@media(max-width:1100px){body:has(#gg178-metrics) .gg122-pending-head{flex-wrap:wrap}body:has(#gg178-metrics) .gg122-pending-search{width:100%;justify-content:flex-start}}

/* v180: orçamentos pendentes em linhas horizontais, dentro da área útil. */
body:has(#gg178-metrics) #gg122-pending-list,body:has(#gg178-metrics) #list{overflow-x:visible;min-width:0}
body:has(#gg178-metrics) .gg180-quote-row{display:grid!important;grid-template-columns:minmax(80px,.6fr) minmax(150px,1.25fr) minmax(160px,1.7fr) minmax(85px,.7fr) minmax(190px,1.7fr);align-items:center;gap:12px;padding:14px 16px;margin:0 0 10px!important;width:100%;min-width:0;max-width:100%;box-sizing:border-box;border:1px solid #e0e7ef;border-radius:12px;background:#fff;box-shadow:0 2px 8px #142a480b}
.gg180-quote-row>div{min-width:0}.gg180-quote-identity,.gg180-quote-customer,.gg180-quote-details{display:flex;flex-direction:column;gap:5px;overflow-wrap:anywhere}.gg180-quote-identity strong,.gg180-quote-customer strong{font-size:13px;color:#193453}.gg180-quote-identity span,.gg180-quote-customer span,.gg180-quote-details span{font-size:12px;color:#61738a}.gg180-quote-details span{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.gg180-quote-status span{display:inline-block;border-radius:999px;padding:6px 10px;font-size:11px;font-weight:700}.gg180-status-pending{background:#fff3dc;color:#865400}.gg180-status-completed{background:#e9f4ed;color:#16633a}.gg180-quote-actions{display:flex;justify-content:flex-end;align-items:center;gap:6px;flex-wrap:wrap}.gg180-quote-actions button{min-height:34px;padding:7px 9px;font-size:11px;white-space:normal}.gg180-quote-actions a{font-size:11px;overflow-wrap:anywhere}
@media(max-width:1300px){body:has(#gg178-metrics) .gg180-quote-row{grid-template-columns:minmax(80px,.7fr) minmax(130px,1.2fr) minmax(145px,1.5fr) minmax(75px,.7fr)}.gg180-quote-actions{grid-column:1/-1;justify-content:flex-start;border-top:1px solid #eef1f5;padding-top:9px}}
@media(max-width:700px){body:has(#gg178-metrics) .gg180-quote-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px}.gg180-quote-details,.gg180-quote-actions{grid-column:1/-1}.gg180-quote-actions{justify-content:flex-start}.gg180-quote-status{text-align:right}}

/* v181: formulário premium em linhas, sem modificar contratos JS/IDs */
#gg178-editor{gap:0!important;border:1px solid #dbe5ef;border-radius:16px;background:#f6f8fc;overflow:hidden;box-shadow:0 8px 28px #152b4812}
#gg178-editor>.gg178-editor-heading{background:#152b48!important;border:0!important;border-radius:0!important;padding:22px 26px!important;color:white!important}
#gg178-editor>.gg178-editor-heading h2{color:#fff!important;font-size:20px!important}
#gg178-editor>.gg178-editor-heading p{color:#cddbed!important;margin-top:6px!important}
body:has(#gg178-metrics) #gg178-editor>.panel{width:auto!important;margin:16px 20px 0!important;border:1px solid #e0e8f1!important;border-radius:13px!important;padding:21px 23px!important;background:#fff!important;box-shadow:0 2px 8px #162b4310!important}
#gg178-editor>.panel h2{font-size:16px!important;color:#1a3553!important;margin:0 0 6px!important}
#gg178-editor>.panel>p{font-size:13px!important;color:#63758c!important;margin:0 0 17px!important}
#gg178-editor label{font-size:12px!important;font-weight:700!important;color:#425771!important;margin-bottom:7px!important;display:block}
#gg178-editor input{box-sizing:border-box!important;width:100%;min-width:0;min-height:43px;border:1px solid #d3dfeb!important;border-radius:9px!important;padding:10px 12px!important;background:#fff!important}
#gg178-editor input:focus{outline:2px solid #82b7f2!important;outline-offset:1px}
#gg178-editor .quote074-client-row{grid-template-columns:minmax(0,2fr) minmax(0,1fr) auto auto!important;gap:12px!important;align-items:end!important}
#gg178-editor .q074-item-form{grid-template-columns:minmax(0,3fr) minmax(95px,.8fr) minmax(120px,1fr) auto!important;gap:12px!important;align-items:end!important;padding:15px!important;background:#f3f7fb;border:1px solid #e2eaf3;border-radius:11px}
#gg178-editor .q074-item-form button,#gg178-editor #save{min-height:43px!important;border-radius:9px!important;background:#152b48!important;color:white!important;font-weight:700!important;padding:10px 16px!important}
#gg178-editor .quote074-client-row button{min-height:43px!important;border-radius:9px!important;white-space:nowrap}
#gg178-editor .gg181-items-label{font-weight:700;color:#1a3553;font-size:13px;margin:18px 0 9px}
#gg178-editor #items{max-width:100%;overflow-x:auto}
#gg178-editor #items table{width:100%;border-collapse:collapse}
#gg178-editor #items th{background:#f1f5fa;color:#425771;text-align:left;padding:11px}
#gg178-editor #items td{padding:11px;border-bottom:1px solid #edf1f5}
#gg178-editor .gg181-closing-heading{margin-bottom:16px}
#gg178-editor .gg181-closing-heading p{color:#63758c;font-size:13px;margin:5px 0 0}
#gg178-editor .quote075-info{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px!important;margin:0 0 16px!important}
#gg178-editor .quote075-info>div{background:#f5f8fc;border:1px solid #e4ebf3;border-radius:10px;padding:13px!important;min-width:0}
#gg178-editor .quote075-info strong{display:block;font-size:12px;color:#60728a;margin-bottom:5px}
#gg178-editor .quote075-info span{font-size:13px;color:#1d3855;overflow-wrap:anywhere}
#gg178-editor .quote015-summary{border-top:1px solid #e7edf4;padding-top:18px!important;justify-content:space-between!important}
#gg178-editor #total{font-size:23px!important;color:#152b48!important}
#gg178-editor>.panel:last-child{margin-bottom:20px!important}
@media(max-width:1050px){#gg178-editor .quote074-client-row{grid-template-columns:repeat(2,minmax(0,1fr))!important}#gg178-editor .q074-item-form{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:640px){body:has(#gg178-metrics) #gg178-editor>.panel{margin:10px 10px 0!important;padding:15px!important}#gg178-editor .quote074-client-row,#gg178-editor .q074-item-form,#gg178-editor .quote075-info{grid-template-columns:1fr!important}#gg178-editor .quote015-summary{align-items:stretch!important;flex-direction:column!important}#gg178-editor #save{width:100%}}
