/* Renovar Portal 2.0 — camada visual: preserva os componentes legados e seus contratos */
:root{--portal-sidebar:#122a1c;--portal-nav:#183a27;--portal-work-bg:#f4f8f5;}
html,body{min-height:100%;scroll-behavior:smooth}
body.portal-v2{padding:0!important;margin:0;background:var(--portal-work-bg);font:400 16px/1.5 'Inter',system-ui,sans-serif;color:#0d2218}
body.portal-v2 button,body.portal-v2 input,body.portal-v2 select,body.portal-v2 textarea{font-family:'Inter',system-ui,sans-serif}
body.portal-v2:not(.portal-authenticated):not(.portal-preview) .portal-layout{visibility:hidden}
.portal-layout{display:flex;min-height:100vh;align-items:stretch}
.portal-sidebar{width:262px;flex:0 0 262px;position:sticky;top:0;height:100vh;background:var(--portal-sidebar);color:#eef8f1;display:flex;flex-direction:column;z-index:100;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#427354 transparent}
.portal-sidebar-head{min-height:100px;padding:27px 22px 18px;display:flex;flex-direction:column;align-items:flex-start;gap:9px;border-bottom:1px solid rgba(255,255,255,.08)}
.portal-sidebar-logo{height:26px;max-width:175px;object-fit:contain;filter:brightness(0) invert(1)}
.portal-name{font-size:15px;font-weight:750;letter-spacing:.08em}.portal-name small{font-size:11px;font-weight:500;letter-spacing:.07em;color:#b9d7c5}
.portal-side-close{display:none}
.portal-company-card{margin:20px 14px 10px;padding:14px;border-radius:14px;background:rgba(255,255,255,.055);border:1px solid rgba(255,255,255,.095);display:grid;gap:5px}
.portal-company-overline{font-size:10px;font-weight:650;letter-spacing:.13em;color:#98bba7}
.portal-company-card strong{font-size:14px;font-weight:600;line-height:1.4;overflow-wrap:anywhere}
.portal-online{font-size:11px;color:#b5d3c0;display:inline-flex;gap:6px;align-items:center;margin-top:5px}
.portal-online i{width:6px;height:6px;border-radius:50%;background:#62d59a}
.portal-nav{display:grid;align-content:start;gap:4px;padding:12px 12px 28px;flex:1}
.portal-nav-label{padding:20px 12px 6px;color:#8cb49c;font-size:10px;font-weight:700;letter-spacing:.15em}
.portal-nav-link{color:#d6e7db!important;background:transparent!important;display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:12px!important;width:100%;border:1px solid transparent!important;border-radius:11px!important;min-height:43px;padding:0 12px!important;text-align:left;font-size:13.5px!important;font-weight:550!important;box-shadow:none!important;transform:none!important;white-space:normal!important}
.portal-nav-link svg{width:18px;height:18px;flex-shrink:0;opacity:.85}
.portal-nav-link svg:last-child{width:13px;height:13px;margin-left:auto;opacity:.35}
.portal-nav-link:hover{background:rgba(255,255,255,.08)!important;color:#fff!important;opacity:1!important}
.portal-nav-link[aria-current="page"]{color:#fff!important;background:#2e8957!important;box-shadow:0 4px 16px rgba(0,0,0,.12)!important}
.portal-nav-link[aria-current="page"] svg{opacity:1}
.portal-side-bottom{padding:14px 24px 22px;border-top:1px solid rgba(255,255,255,.08);display:grid;gap:4px}
.portal-side-bottom span{font-size:12px;font-weight:650}.portal-side-bottom small{font-size:10px;color:#a2b9a9}
.portal-workspace{flex:1;min-width:0;min-height:100vh}
.portal-topbar{display:flex;align-items:center;justify-content:space-between;gap:16px;height:92px;padding:16px clamp(18px,3vw,48px);background:white;border-bottom:1px solid #e4ede7;position:sticky;top:0;z-index:40}
.portal-top-heading{min-width:0}.portal-breadcrumb{font-size:11.5px;color:#718a79;font-weight:550;margin-bottom:4px}.portal-breadcrumb span{margin:0 4px}
.portal-topbar h2{font-size:23px;line-height:1.2;color:#173e29;letter-spacing:-.03em;font-weight:720;margin:0}
.portal-top-actions{display:flex;align-items:center;gap:14px}.portal-secure{font-size:12px;color:#5d7a68;display:flex;align-items:center;gap:7px}.portal-secure svg{width:15px;height:15px;color:#2e8957}
.portal-avatar{width:39px;height:39px;padding:0!important;min-width:39px;background:#e8f4ec!important;border:1px solid #d1e8d9!important;color:#206741!important;border-radius:50%!important;font-size:14px!important;font-weight:750!important;box-shadow:none!important}
.portal-mobile-menu{display:none!important;background:transparent!important;border:0!important;padding:7px!important;box-shadow:none!important}.portal-mobile-menu svg,.portal-side-close svg{width:22px;height:22px}
.portal-content{padding:28px clamp(18px,3vw,48px) 42px;min-width:0}
body.portal-v2 .app-shell{max-width:1450px;width:100%;margin:0 auto}
body.portal-v2 .page-header.ph-dash{min-height:148px!important;padding:28px 32px!important;border-radius:18px!important;margin-bottom:18px!important;background:linear-gradient(112deg,#173d29,#276c48)!important;box-shadow:0 9px 24px rgba(20,61,39,.1)!important}
body.portal-v2 .ph-pill{margin-bottom:12px!important}
body.portal-v2 .ph-marca{height:108%!important;opacity:.08!important;right:-2%!important}
body.portal-v2 .page-header h1{font-size:clamp(24px,3vw,34px)!important}
body.portal-v2 .barra-topo{margin:-1px 0 12px}
body.portal-v2 #painel-selecao-escopo{background:#fff;border-radius:16px;box-shadow:0 2px 9px rgba(20,61,39,.04);margin-bottom:18px}
body.portal-v2 #painel-selecao-escopo .panel-head{padding:13px 22px!important;background:#fff!important}
body.portal-v2 #painel-selecao-escopo .panel-body{padding:12px 22px 16px!important}
body.portal-v2 #painel-selecao-escopo .section-title{font-size:15px!important}
body.portal-v2 .panel{border-radius:16px!important;box-shadow:0 2px 10px rgba(20,61,39,.04)!important}
body.portal-v2 .panel-head{padding:18px 22px!important}
body.portal-v2 .section-title{font-size:17px!important;letter-spacing:-.015em}
body.portal-v2 .section-subtitle{font-size:13px!important;line-height:1.55}
body.portal-v2 .panel-body{padding:20px 22px}
body.portal-v2 .tbl th{font-size:11px!important;letter-spacing:.035em!important}
body.portal-v2 .tbl td{font-size:13.5px!important}
body.portal-v2 .kpi-card{border-radius:16px!important;min-height:125px!important}
body.portal-v2 .kpi-row{gap:14px!important}
body.portal-v2 .stack{gap:17px}
body.portal-v2 .tabs-portal{display:none!important}
body.portal-v2 .stack>[data-tab]{display:none!important}
body.portal-v2 .stack>[data-tab].portal-section-on{display:revert!important;animation:portalEnter .18s ease both}
body.portal-v2 .stack>[data-tab].portal-section-on.panel{display:block!important}
body.portal-v2 .stack>[data-tab].portal-section-on.kpi-row{display:grid!important}
body.portal-v2 .stack>[data-tab].portal-section-on.chart-row{display:grid!important}
@keyframes portalEnter{from{opacity:.55;transform:translateY(5px)}to{opacity:1;transform:none}}
.portal-integration-note{padding:32px 20px;border:1px dashed #cadfd0;border-radius:12px;background:#f6faf7;color:#4e6d59;font-size:13px;text-align:center;width:100%;grid-column:1/-1}
.portal-shade{display:none}
.portal-demo-ribbon{position:fixed;right:20px;bottom:18px;background:#6f491c;color:#fff;padding:11px 15px;border-radius:10px;font-size:11px;letter-spacing:.045em;z-index:300;box-shadow:0 6px 20px rgba(0,0,0,.2);font-weight:700}
@media(min-width:1050px) and (max-width:1370px){.portal-sidebar{flex-basis:236px;width:236px}.portal-content{padding-left:24px;padding-right:24px}}
@media(max-width:1050px){
 .portal-sidebar{position:fixed;left:0;top:0;height:100dvh;transform:translateX(-105%);transition:transform .2s ease;width:270px;box-shadow:10px 0 35px rgba(0,0,0,.15)}
 .portal-sidebar.portal-open{transform:translateX(0)}
 .portal-side-close{display:flex!important;position:absolute;top:20px;right:16px;background:transparent!important;color:white!important;box-shadow:none!important;border:0!important;padding:4px!important}
 .portal-mobile-menu{display:inline-flex!important}.portal-workspace{width:100%}
 .portal-shade:not([hidden]){display:block;position:fixed;inset:0;z-index:90;background:rgba(3,24,13,.48)}
 .portal-topbar{height:78px;padding-left:18px;padding-right:18px}.portal-topbar h2{font-size:20px}
}
@media(max-width:680px){.portal-content{padding:14px 12px 24px}.portal-topbar{height:72px}.portal-breadcrumb{font-size:10px}.portal-topbar h2{font-size:17px}.portal-secure{display:none}.portal-top-actions{gap:6px}body.portal-v2 .page-header.ph-dash{min-height:115px!important;padding:20px!important;border-radius:14px!important}body.portal-v2 .page-header h1{font-size:23px!important}body.portal-v2 #painel-selecao-escopo .panel-head{padding:12px 16px!important}body.portal-v2 #painel-selecao-escopo .panel-body{padding:12px 16px 16px!important}}
@media print{body.portal-v2{background:#fff!important;padding:0!important}.portal-sidebar,.portal-topbar,.portal-shade,.portal-demo-ribbon{display:none!important}.portal-content{padding:0!important}.portal-workspace{width:100%}body.portal-v2 .stack>[data-tab]{display:none!important}body.portal-v2 .stack>[data-tab="visao"]{display:block!important}body.portal-v2 .stack>[data-tab="visao"].kpi-row{display:grid!important}}

.portal-data-warning{margin:0 0 18px;padding:15px 18px;background:#fff4e3;color:#7e510f;border:1px solid #efd4a3;border-radius:12px;font-weight:600;font-size:13px;line-height:1.5}
a.portal-external-pending{opacity:.52!important;cursor:not-allowed!important;filter:grayscale(.7)}
