/* Estrutura local do RP. Aparência e tipografia pertencem ao painel universal. */
#permanente .study-visual{min-width:0;max-width:100%}
#ad01-panel{width:100%;max-width:100%;min-width:0;height:clamp(410px,calc(100svh - 245px),690px);display:flex;flex-direction:column;overflow:hidden;isolation:isolate}
#ad01-panel .ad01-header{justify-content:space-between}
#ad01-panel .ad01-body{display:flex;flex-direction:column;flex:1;min-height:0;min-width:0;overflow:auto;overscroll-behavior:contain;gap:10px}
#ad01-panel .ad01-body>*{flex-shrink:0}
#ad01-panel .ad01-toolbar{margin:0;min-width:0}
#ad01-panel .ad01-toolbar>.review-page-head{flex:1 1 260px;min-width:0}
#ad01-panel .ad01-tools{display:flex;flex:0 1 auto;min-width:0;max-width:100%;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:6px 12px}
#ad01-panel .ad01-tools .ad01-toolset{display:flex;flex:0 1 auto;width:auto;min-width:0;max-width:100%;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:5px;margin:0}
#ad01-panel .ad01-tools .ad01-toolset button{flex:0 0 auto;white-space:nowrap}
#ad01-panel .ad01-domain-bar button{border-left:4px solid var(--domain-color)}
#ad01-panel .ad01-home{display:flex;flex-direction:column;gap:0;flex:none;min-height:auto}
#ad01-panel .ad01-home>.case-hero{flex:none;min-height:auto;align-items:start}
#ad01-panel .ad01-route{border-left:1px solid #bed2e3;padding-left:25px;display:flex;flex-direction:column;gap:6px;min-width:0}
#ad01-panel .ad01-route>strong{margin-bottom:5px}
#ad01-panel .ad01-domain-chip{display:flex;align-items:center;justify-content:space-between;gap:10px;border:1px solid #c6d8e7;border-left:4px solid var(--domain-color);border-radius:8px;background:#f7fafc;padding:10px 12px;min-width:0}
#ad01-panel .ad01-domain-chip span{white-space:nowrap}
#ad01-panel .ad01-transition{padding-left:12px}
#ad01-panel .review-step .home-actions{display:flex;flex-wrap:wrap;margin-top:10px;gap:6px}
#ad01-panel .ad01-geometry-grid{display:flex;flex-direction:column;flex:1 1 auto;min-height:0;gap:0}
#ad01-panel .ad01-geometry-grid>.chart-card{flex:1;min-height:0}
#ad01-panel .ad01-geometry-grid>.ac-chart{grid-column:1/-1}
#ad01-panel .ad01-geometry-table{display:flex;flex-direction:column;flex:1;min-height:0}
#ad01-panel .ad01-geometry-table .table-scroll table{min-width:650px}
#ad01-panel .ad01-plot{flex:1;width:100%;height:100%}
#ad01-panel .ad01-body .ad01-geometry-grid .ad01-plot,#ad01-panel .ad01-body .ad01-profile-grid .ad01-plot{min-width:0;min-height:0}
#ad01-panel .ad01-body.review-profile-view .ad01-profile-grid{flex:1 1 auto;min-height:0;height:auto;grid-template-columns:minmax(0,1.9fr) minmax(340px,1fr);gap:12px}
#ad01-panel .ad01-body .ad01-profile-grid>.chart-card,#ad01-panel .ad01-body .ad01-profile-grid>.table-card{height:auto;min-height:0}
#ad01-panel .ad01-consult-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}
#ad01-panel .ad01-consult .ad01-consult-controls{width:auto;flex:0 0 auto;display:flex;flex-wrap:nowrap;gap:5px}
#ad01-panel .ad01-consult .ad01-consult-controls button{flex:0 0 auto}
#ad01-panel .ad01-consult-heading h2{min-width:0}
#ad01-panel .ad01-results{display:flex;flex-direction:column;flex:1;min-height:0}
#ad01-panel .ad01-results .table-scroll{flex:1;min-height:0}
#ad01-panel .ad01-results .table-scroll table[data-columns="4"]{min-width:0;width:100%;table-layout:fixed}
#ad01-panel .ad01-results table[data-columns="4"] th:first-child,#ad01-panel .ad01-results table[data-columns="4"] th:last-child{width:25%}
#ad01-panel .ad01-results table[data-columns="4"] th .head-inner{padding:0}
#ad01-panel .ad01-text-button{font:inherit;min-height:0;padding:0;border:0;background:transparent;color:inherit}
#ad01-panel .ad01-text-button:hover{text-decoration:underline;text-underline-offset:3px}
#ad01-panel .ad01-pagination{justify-content:space-between;flex-shrink:0;border-top:1px solid #c6d8e7;border-bottom:0}
#ad01-panel .ad01-pagination button{width:30px}
#ad01-panel .ad01-pressure-cell{box-shadow:inset 4px 0 var(--pressure-band)}
#ad01-panel .ad01-readout{flex:1;overflow:auto;min-height:0;padding:12px 14px}
#ad01-panel .ad01-point-head{margin-bottom:8px}
#ad01-panel .ad01-chart-foot{flex-shrink:0;flex-wrap:wrap;justify-content:center;gap:6px 16px}
#ad01-panel .ad01-chart-foot span{display:inline-flex;gap:5px;align-items:center}
#ad01-panel .ad01-chart-foot i,#ad01-panel .ad01-domain-dot{display:inline-block;width:7px;height:7px;border-radius:50%;flex-shrink:0;margin-right:4px}
#ad01-panel .ad01-series-control{display:inline-flex;gap:6px;align-items:center;min-height:20px;padding:0;border:0;background:transparent;line-height:1;color:inherit}
#ad01-panel .ad01-series-control.active,#ad01-panel .ad01-series-control[aria-pressed=true]{background:transparent;color:inherit}
#ad01-panel .ad01-series-control[aria-pressed=false]{opacity:.45;text-decoration:line-through}
#ad01-panel .ad01-profile-result{flex-shrink:0;justify-content:space-between;flex-wrap:wrap;gap:4px 12px}
#ad01-panel .ad01-premise-inline{display:flex;flex-wrap:wrap;gap:10px 24px;margin:10px 0}
#ad01-panel .ad01-premise-inline b{margin-left:8px;white-space:nowrap}
#ad01-panel .ad01-domain-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
#ad01-panel .ad01-domain-card{border-left:4px solid var(--domain-color)!important}
#ad01-panel .ad01-domain-card .review-values strong{white-space:nowrap}
#ad01-panel .ad01-comparison-card{flex:none;min-width:0;overflow:hidden}
#ad01-panel .ad01-comparison-card .ad01-plot{min-width:0}
#ad01-panel .ad01-inventory{display:block}
#ad01-panel .ad01-inventory .table-scroll table{min-width:1100px}
#ad01-panel .ad01-pipe-chart{min-height:0}
#ad01-panel .ad01-pipe-chart .ad01-plot{min-width:0;min-height:0}
#ad01-panel .ad01-metrics{margin:0}
#ad01-panel .ad01-details{padding:0;border:1px solid #c6d8e7;border-radius:10px;background:#fff}
#ad01-panel .ad01-details summary{padding:12px 16px;cursor:pointer}
#ad01-panel .ad01-details .table-scroll{max-height:300px}
.ad01-dialog{padding:0;border:0;border-radius:12px;width:calc(100vw - 28px);max-width:none;height:calc(100dvh - 28px);max-height:none;overflow:hidden;background:transparent;margin:auto}
.ad01-dialog::backdrop{background:#092f4de8}
#ad01-panel.ad01-expanded{height:100%;max-height:100%;width:100%}
@media(max-width:1050px) and (min-width:760px){
 #ad01-panel .ad01-body.review-profile-view .ad01-profile-grid{grid-template-columns:minmax(0,1.5fr) minmax(320px,1fr)}
}
@media(max-width:759px){
 #ad01-panel{height:630px}
 #ad01-panel .panel-nav{display:flex;flex-wrap:wrap;overflow:visible;gap:3px}
 #ad01-panel .panel-nav button{flex:0 0 auto;white-space:nowrap}
 #ad01-panel .ad01-toolbar>.review-page-head{flex-basis:100%}
 #ad01-panel .ad01-toolbar>.ad01-tools{flex-basis:100%;justify-content:flex-start;gap:6px}
 #ad01-panel .ad01-tools .ad01-toolset{justify-content:flex-start}
 #ad01-panel .ad01-tools .ad01-toolset button{flex:0 0 auto}
 #ad01-panel .ad01-body.review-profile-view .ad01-profile-grid{display:flex;flex-direction:column;flex:none;min-height:0;height:auto;gap:10px}
 #ad01-panel .ad01-body .ad01-profile-grid>.chart-card{height:360px;min-height:360px}
 #ad01-panel .ad01-body .ad01-profile-grid>.table-card{height:350px;min-height:350px}
 #ad01-panel .ad01-domain-cards{grid-template-columns:1fr}
 #ad01-panel .ad01-geometry-grid{flex:none}
 #ad01-panel .ad01-geometry-grid>.chart-card{height:340px;min-height:340px}
 #ad01-panel .ad01-route{border-left:0;border-top:1px solid #bed2e3;padding:14px 0 0}
 .ad01-dialog{width:calc(100vw - 6px);height:calc(100dvh - 6px);border-radius:9px}
}

/* Versão 32: prioridade à área de leitura. */
@media(min-width:1200px){
 .ac-panel .ac-toolbar>.review-page-head{min-width:0!important;flex:1 1 auto!important}
 .ac-panel .ac-toolbar>.review-page-head h1{white-space:nowrap!important}
}
@media(max-width:759px){
 #ad01-panel .ad01-toolbar{flex-direction:column!important;flex-wrap:nowrap!important;align-items:stretch!important}
 #ad01-panel .ad01-toolbar>*{flex:0 0 auto!important;height:auto!important;min-height:0!important;width:100%!important;max-width:100%!important}
 #ad01-panel .ad01-toolbar .chart-legend{flex:0 1 auto!important;width:100%!important;max-width:100%!important;min-width:0!important;flex-wrap:wrap!important}
}

/* Versão 33: cabeçalhos e consultas compactos, sem retirar os dados. */
#ad01-panel .panel-header{min-height:38px!important;padding:4px 12px!important}
#ad01-panel .panel-nav{min-height:36px!important;padding:3px 12px!important;gap:3px!important}
#ad01-panel .panel-nav button{min-height:28px!important;padding:4px 10px!important;font-size:12px!important}
#ad01-panel .card-head{padding:6px 10px!important;min-height:0!important}
#ad01-panel .card-head h2{font-size:14px!important;line-height:1.25!important;letter-spacing:0!important}
#ad01-panel .card-head p{margin-top:3px!important;font-size:10px!important}
#ad01-panel th{font-size:11px!important;line-height:1.15!important;padding:5px 7px!important}
#ad01-panel th .head-inner{gap:5px!important;padding:0!important}
#ad01-panel th small{font-size:10px!important;padding-top:2px!important;margin-top:2px!important}
#ad01-panel td{font-size:11px!important;line-height:1.3!important;padding:4px 7px!important}
#ad01-panel .ac-toolbar{gap:5px 10px!important;margin-bottom:0!important}
#ad01-panel .review-page-head h1{font-size:20px!important;line-height:1.2!important}
#ad01-panel .ac-pagination{padding:3px 8px!important;min-height:28px!important}
#ad01-panel .ac-pagination button{min-height:23px!important;height:23px!important}
