/* V8.109: histórico compartilhado; não interfere nos modais aprovados */
.gc-history-overlay{position:fixed;inset:0;background:#10283d91;z-index:999990;display:grid;place-items:center;padding:16px;font-family:Inter,Arial,sans-serif}
.gc-history-card{width:min(720px,96vw);max-height:85vh;background:white;border-radius:14px;box-shadow:0 16px 50px #09234040;display:flex;flex-direction:column;overflow:hidden}
.gc-history-head{display:flex;justify-content:space-between;align-items:flex-start;padding:20px 24px;border-bottom:1px solid #dce7f2}.gc-history-head h2{margin:0;font-size:20px;color:#12324f}.gc-history-head p{color:#667d92;font-size:13px;margin:4px 0}.gc-history-head button{background:#edf5ff;border:0;border-radius:8px;padding:6px 12px;font-size:20px;cursor:pointer}
.gc-history-body{padding:12px 22px;overflow:auto}.gc-history-line{display:flex;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid #e0eaf3;padding:12px 2px}.gc-history-line>div{display:grid;gap:4px}.gc-history-line strong{color:#173653;font-size:13px}.gc-history-line small{color:#6b8094;font-size:12px}.gc-history-line>div:last-child{text-align:right;white-space:nowrap}.gc-history-empty{padding:22px;color:#6b8094}.gc-history-foot{font-size:11px;color:#657b8d;padding:12px 22px;margin:0;border-top:1px solid #e0eaf3}
.g88-quote-history{max-width:1160px;margin:0 auto 20px;padding:0 18px;font-family:Inter,Arial,sans-serif}.gq-head,.gq-row{display:flex;align-items:center;justify-content:space-between;gap:15px}.gq-head{padding:16px 4px}.gq-head h2{margin:0;font-size:18px;color:#163653}.gq-head p{font-size:12px;color:#6b8094;margin:3px 0}.gq-search{border:1px solid #d4e4f5;border-radius:8px;padding:9px;color:#4776a6}.gq-search input{border:0;outline:0;font:inherit;min-width:175px}.gq-body,.gq-detail{border:1px solid #d9e7f5;border-radius:12px;background:#fff}.gq-row{padding:12px 16px;border-bottom:1px solid #e8eff6}.gq-row:last-child{border-bottom:0}.gq-row>div{display:grid;gap:4px}.gq-row strong{font-size:13px;color:#183a5e}.gq-row small{font-size:12px;color:#627a91}.gq-row>div:last-child{text-align:right}.gq-row button,.gq-detail button{background:#eaf3ff;border:1px solid #bad6f5;color:#1563bf;border-radius:7px;padding:6px 10px;font-weight:700;cursor:pointer}.gq-empty{padding:20px;color:#708599}.gq-detail{margin-top:12px;padding:18px}.gq-detail>div{display:flex;justify-content:space-between}.gq-detail p{font-size:13px;color:#274762;overflow-wrap:anywhere}@media(max-width:650px){.gq-head,.gq-row,.gc-history-line{align-items:stretch;flex-direction:column}.gq-row>div:last-child,.gc-history-line>div:last-child{text-align:left}.gq-search input{width:100%}}


/* Detalhes de orçamento: ações agrupadas e hierarquia visual aprovada.
   Seletor deliberadamente restrito ao histórico, sem alterar Vendas/Agenda. */
#g88QuoteHistory .gq-detail{margin:18px 0 0;padding:22px 22px 18px;background:#fff;border:1px solid #dce8f5;border-radius:16px;box-shadow:0 8px 30px rgba(16,53,93,.045);color:#172f4f}
#g88QuoteHistory .gq-detail-header{display:flex;gap:20px;justify-content:space-between;align-items:center;padding-bottom:22px;border-bottom:1px solid #e7eef7}
#g88QuoteHistory .gq-detail-heading{display:flex;align-items:center;gap:16px;min-width:0}
#g88QuoteHistory .gq-heading-icon{display:grid;place-items:center;width:57px;height:57px;border-radius:13px;background:#e9f2ff;color:#116be0;flex:none}
#g88QuoteHistory .gq-heading-icon svg{height:29px;width:29px}
#g88QuoteHistory .gq-detail-header h2{font-size:20px;font-weight:800;line-height:1.3;color:#102c4e;margin:0}
#g88QuoteHistory .gq-detail-header p{font-size:13px;color:#68819e;line-height:1.5;margin:6px 0 0}
#g88QuoteHistory .gq-status-tag{display:inline-flex;align-items:center;gap:6px;max-width:100%;border-radius:9px;padding:8px 13px;background:#eef4fc;color:#385f86;font-weight:750;font-size:12px;white-space:nowrap}
#g88QuoteHistory .gq-status-approved{background:#fff0ce;color:#a16a08}
#g88QuoteHistory .gq-status-approved:before{content:'✓';display:grid;place-items:center;width:17px;height:17px;border-radius:50%;background:#ca870b;color:#fff;font-weight:900;font-size:11px}
#g88QuoteHistory .gq-status-scheduled{background:#e6f1ff;color:#145eb6}
#g88QuoteHistory .gq-status-sold{background:#e5f8ed;color:#166d45}
#g88QuoteHistory .gq-detail-main{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(255px,1fr);gap:30px;padding:24px 0 25px}
#g88QuoteHistory .gq-detail-fields{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:26px 24px;align-content:start}
#g88QuoteHistory .gq-detail-field,#g88QuoteHistory .gq-detail-note{display:flex;align-items:flex-start;gap:12px;min-width:0}
#g88QuoteHistory .gq-field-icon{display:inline-flex;align-items:flex-start;justify-content:center;width:23px;height:23px;color:#163e67;flex:none;margin-top:1px}
#g88QuoteHistory .gq-field-icon svg{width:21px;height:21px}
#g88QuoteHistory .gq-field-label{display:block;color:#597696;font-size:12px;font-weight:700;line-height:1.45;margin-bottom:5px}
#g88QuoteHistory .gq-field-value{font-size:14px;font-weight:550;color:#0d2b4e;line-height:1.5;overflow-wrap:anywhere}
#g88QuoteHistory .gq-money{font-weight:800}
#g88QuoteHistory .gq-detail-notes{border-left:1px solid #e3edf8;padding-left:28px;display:grid;gap:26px;align-content:start}
#g88QuoteHistory .gq-detail-note p{margin:0;font-size:14px;color:#152f4f;line-height:1.5;overflow-wrap:anywhere}
#g88QuoteHistory .gq-action-bar{display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap;border-radius:12px;background:#f0f5fd;padding:16px}
#g88QuoteHistory .gq-action-intro{display:flex;gap:12px;align-items:center;min-width:0;flex:1 1 200px}
#g88QuoteHistory .gq-action-icon{display:grid;place-items:center;width:45px;height:45px;background:#e0ecff;border-radius:50%;color:#1675e8;flex:none}
#g88QuoteHistory .gq-action-icon svg{width:23px;height:23px}
#g88QuoteHistory .gq-action-intro h3{margin:0;font-size:15px;color:#102e51;font-weight:800}
#g88QuoteHistory .gq-action-intro p{margin:5px 0 0;font-size:12px;color:#6c83a1;line-height:1.4}
#g88QuoteHistory .gq-status-actions{margin:0;display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:9px}
#g88QuoteHistory .gq-status-actions button{width:auto!important;min-height:43px;display:inline-flex;justify-content:center;align-items:center;gap:9px;border-radius:9px;padding:10px 16px;font-size:13px;font-weight:800;cursor:pointer;white-space:nowrap;transition:background .15s,border-color .15s,box-shadow .15s}
#g88QuoteHistory .gq-status-actions button svg{width:17px;height:17px}
#g88QuoteHistory .gq-status-actions .gq-action-primary{background:#0868e9;border:1px solid #0868e9;color:white;box-shadow:0 4px 12px rgba(11,105,225,.14)}
#g88QuoteHistory .gq-status-actions .gq-action-primary:hover{background:#0759c5}
#g88QuoteHistory .gq-status-actions .gq-action-secondary{background:#fff;border:1px solid #b7d2f8;color:#0961d4;box-shadow:none}
#g88QuoteHistory .gq-status-actions .gq-action-secondary:hover{background:#e8f2ff}
#g88QuoteHistory .gq-status-actions .gq-action-neutral{background:#f8fafc;border:1px solid #d5e0ec;color:#28435f;box-shadow:none}
#g88QuoteHistory .gq-status-actions .gq-action-neutral:hover{background:#ebf1f8}
#g88QuoteHistory .gq-status-actions button:focus-visible{outline:3px solid #4d9df2;outline-offset:2px}
#g88QuoteHistory #gqActionError:not([hidden]){margin:14px 2px 0;font-weight:650;font-size:13px;color:#a32828}
@media(max-width:1040px){
 #g88QuoteHistory .gq-detail-main{grid-template-columns:1fr;gap:20px}
 #g88QuoteHistory .gq-detail-notes{border-left:0;border-top:1px solid #e3edf8;padding:20px 0 0;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
 #g88QuoteHistory .gq-action-bar{align-items:stretch}
 #g88QuoteHistory .gq-status-actions{width:100%;justify-content:flex-start}
}
@media(max-width:650px){
 #g88QuoteHistory .gq-detail{padding:16px;margin-top:14px}
 #g88QuoteHistory .gq-detail-header{align-items:flex-start;gap:12px}
 #g88QuoteHistory .gq-heading-icon{width:42px;height:42px}
 #g88QuoteHistory .gq-heading-icon svg{width:23px;height:23px}
 #g88QuoteHistory .gq-detail-header h2{font-size:16px}
 #g88QuoteHistory .gq-detail-header>.gq-status-tag{font-size:11px;padding:7px}
 #g88QuoteHistory .gq-detail-fields{gap:20px 14px}
 #g88QuoteHistory .gq-detail-notes{grid-template-columns:1fr}
 #g88QuoteHistory .gq-action-bar{padding:13px}
 #g88QuoteHistory .gq-status-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
 #g88QuoteHistory .gq-status-actions button{white-space:normal;padding:10px 8px}
 #g88QuoteHistory .gq-status-actions button:last-child:nth-child(odd){grid-column:1/-1}
}
@media(max-width:420px){
 #g88QuoteHistory .gq-detail-header{flex-wrap:wrap}
 #g88QuoteHistory .gq-detail-fields{grid-template-columns:1fr}
 #g88QuoteHistory .gq-status-actions{grid-template-columns:1fr}
}
