/* Identidade por módulo: cores compartilhadas com o seletor. */
body[data-portal-module="estoque"]{ --module-color:#6b21a8;--module-deep:#3b0764;--module-light:#c4b5fd;--module-tint:#f5f3ff;}
body[data-portal-module="lumeagro"]{ --module-color:#166534;--module-deep:#052e16;--module-light:#86efac;--module-tint:#f0fdf4;}
body[data-portal-module="rh"]{ --module-color:#1e40af;--module-deep:#172554;--module-light:#93c5fd;--module-tint:#eff6ff;}
body[data-portal-module="financeiro"]{ --module-color:#115e59;--module-deep:#042f2e;--module-light:#5eead4;--module-tint:#f0fdfa;}
body[data-portal-module="energia"]{ --module-color:#650d2b;--module-deep:#320616;--module-light:#d9a0b3;--module-tint:#fbf1f5;}
body[data-portal-module="lumedata"]{--module-color:#155e75;--module-deep:#083344;--module-light:#67e8f9;--module-tint:#ecfeff}
body[data-portal-module="crm"]{ --module-color:#9a3412;--module-deep:#431407;--module-light:#fdba74;--module-tint:#fff7ed;}
body[data-portal-module="lumecharge"]{ --module-color:#3730a3;--module-deep:#1e1b4b;--module-light:#a5b4fc;--module-tint:#eef2ff;}
body[data-portal-module="atendimento"]{ --module-color:#155e75;--module-deep:#083344;--module-light:#67e8f9;--module-tint:#ecfeff;}
body[data-portal-module="configuracoes"]{ --module-color:#334155;--module-deep:#0f172a;--module-light:#cbd5e1;--module-tint:#f8fafc;}
body[data-portal-module="faculdade"]{ --module-color:#9d174d;--module-deep:#500724;--module-light:#f9a8d4;--module-tint:#fdf2f8;}
body[data-portal-module]:not([data-portal-module=""]) .content .page-heading{background:linear-gradient(120deg,var(--module-deep),var(--module-color))!important;border-color:var(--module-color)!important;border-left:4px solid var(--module-light)!important}
body[data-portal-module]:not([data-portal-module=""]) .content .page-heading :is(h1,.eyebrow,p){color:#fff!important}
body[data-portal-module]:not([data-portal-module=""]) .content .page-heading .date-tag{background:#ffffff20!important;color:#fff!important;border:1px solid #ffffff50!important}
body[data-portal-module]:not([data-portal-module=""]) .content .panel{border-top-color:var(--module-color)!important}
body[data-portal-module]:not([data-portal-module=""]) .content .panel>h2,body[data-portal-module] .content .la-app .panel h2,body[data-portal-module] .content .la-app .la-record h3{color:var(--module-deep)!important;background:var(--module-tint)!important;border-color:var(--module-color)!important}
body[data-portal-module]:not([data-portal-module=""]) .content .btn-primary{background:var(--module-color)!important;border-color:var(--module-color)!important;color:#fff!important}
body[data-portal-module]:not([data-portal-module=""]) .content :is(input,select,textarea):focus-visible{outline:2px solid var(--module-color)!important;outline-offset:2px}
body[data-portal-module] .content .la-app{--la-green:var(--module-color);--la-line:var(--module-light)}
body[data-portal-module] .content .la-app :is(.la-record,.la-kpis article){border-top-color:var(--module-color)!important;--la-tone:var(--module-color)!important}
body[data-portal-module] .content .la-app .la-kpis strong,body[data-portal-module] .content .la-app a:not(.btn){color:var(--module-color)!important}
body[data-portal-module] .content .la-app .la-kpis article{background:linear-gradient(135deg,var(--module-tint),var(--surface,#fff))!important}
body[data-portal-module] .content .la-app .btn-light{color:var(--module-deep)!important;border-color:var(--module-light)!important}
body[data-portal-module]:not([data-portal-module=""]) .topbar .topbar-active-module{color:var(--module-light)!important;border-color:var(--module-color)!important}
body[data-portal-module]:not([data-portal-module=""]) .topbar .nav-link.active{background:var(--module-deep)!important;color:var(--module-light)!important;border-color:var(--module-color)!important}
html:is([data-theme=dark],[data-theme=escuro]) body[data-portal-module] .content .panel>h2,html:is([data-theme=dark],[data-theme=escuro]) body[data-portal-module] .content .la-app .panel h2,html:is([data-theme=dark],[data-theme=escuro]) body[data-portal-module] .content .la-app .la-record h3{background:var(--module-deep)!important;color:var(--module-light)!important}
html:is([data-theme=dark],[data-theme=escuro]) body[data-portal-module] .content .la-app .la-kpis article{background:var(--surface,#18212d)!important}
html:is([data-theme=dark],[data-theme=escuro]) body[data-portal-module] .content .la-app :is(.la-kpis strong,.btn-light),html:is([data-theme=dark],[data-theme=escuro]) body[data-portal-module] .content .la-app a:not(.btn){color:var(--module-light)!important}

/* Cabeçalhos próprios e detalhes decorativos seguem o módulo ativo. */
body[data-portal-module]:not([data-portal-module=""]) .content .page-heading:before{background:var(--module-color)!important}
body[data-portal-module]:not([data-portal-module=""]) .content .pf-page-head{padding:22px;border-radius:18px;background:linear-gradient(120deg,var(--module-deep),var(--module-color))!important;border-color:var(--module-color)!important}
body[data-portal-module]:not([data-portal-module=""]) .content .pf-page-head :is(h1,h2,p,.pf-eyebrow){color:#fff!important;background:transparent!important}
body[data-portal-module]:not([data-portal-module=""]) .content .pf-page-head .pf-period{background:#ffffff20!important;color:#fff!important;border-color:#ffffff50!important}
body[data-portal-module="financeiro"] .content .pf-card{border-top:3px solid var(--module-color)!important}
body[data-portal-module="lumecharge"] .content .lc-hero{background:linear-gradient(120deg,var(--module-deep),var(--module-color))!important}
body[data-portal-module="lumecharge"] .content .lc-hero :is(h2,p,.lc-kicker){color:#fff!important;background:transparent!important}
body[data-portal-module="lumecharge"] .content .lc-mark{background:var(--module-light)!important;color:var(--module-deep)!important}
body[data-portal-module="lumecharge"] .content :is(.lc-kicker,.lc-shortcut svg){color:var(--module-color)!important}
body[data-portal-module="lumecharge"] .content .lc-shortcut:hover,body[data-portal-module="lumecharge"] .content .lc-tabs a[aria-current=page]{background:var(--module-tint)!important;border-color:var(--module-color)!important;color:var(--module-deep)!important}
body[data-portal-module="lumecharge"] .content .lc-metric{border-top-color:var(--module-color)!important;background:var(--surface,#fff)!important}
html:is([data-theme=dark],[data-theme=escuro]) body[data-portal-module="lumecharge"] .content :is(.lc-kicker,.lc-shortcut svg){color:var(--module-light)!important}

/* Hierarquia: primária preenchida, secundária neutra. Cores semânticas preservadas. */
body[data-portal-module]{--action-surface:#fff;--action-ink:var(--module-color);--action-border:var(--module-light);--action-hover:var(--module-tint)}
html:is([data-theme=dark],[data-theme=escuro]) body[data-portal-module]{--action-surface:#18212d;--action-ink:var(--module-light);--action-border:var(--module-color);--action-hover:var(--module-deep)}
body[data-portal-module]:not([data-portal-module=""]) :is(.content,dialog) :is(.btn,input[type=submit]):not(.btn-danger):not(.btn-outline-danger):not(.btn-success):not(.btn-outline-success):not(.btn-warning):not(.btn-outline-warning):not(.btn-link){background:var(--action-surface)!important;background-image:none!important;border:1px solid var(--action-border)!important;color:var(--action-ink)!important;box-shadow:none!important}
body[data-portal-module]:not([data-portal-module=""]) :is(.content,dialog) :is(.btn,input[type=submit]):not(.btn-danger):not(.btn-outline-danger):not(.btn-success):not(.btn-outline-success):not(.btn-warning):not(.btn-outline-warning):not(.btn-link):hover:not(:disabled):not(.disabled){background:var(--action-hover)!important;border-color:var(--module-color)!important;color:var(--action-ink)!important}
body[data-portal-module]:not([data-portal-module=""]) :is(.content,dialog) :is(.btn,input[type=submit]):not(.btn-danger):not(.btn-outline-danger):not(.btn-success):not(.btn-outline-success):not(.btn-warning):not(.btn-outline-warning):not(.btn-link):is(.btn-primary,input[type=submit],[data-module-action=primary]):not([data-module-action=secondary]){background:var(--module-color)!important;border-color:var(--module-color)!important;color:#fff!important}
body[data-portal-module]:not([data-portal-module=""]) :is(.content,dialog) :is(.btn,input[type=submit]):not(.btn-danger):not(.btn-outline-danger):not(.btn-success):not(.btn-outline-success):not(.btn-warning):not(.btn-outline-warning):not(.btn-link):is(.btn-primary,input[type=submit],[data-module-action=primary]):not([data-module-action=secondary]):hover:not(:disabled):not(.disabled){background:var(--module-deep)!important;border-color:var(--module-deep)!important;color:#fff!important}
body[data-portal-module]:not([data-portal-module=""]) :is(.content,dialog) :is(.btn,input[type=submit]):not(.btn-danger):not(.btn-outline-danger):not(.btn-success):not(.btn-outline-success):not(.btn-warning):not(.btn-outline-warning):not(.btn-link) :is(.ui-icon,.bi,svg){color:inherit!important}
body[data-portal-module]:not([data-portal-module=""]) :is(.content,dialog) :is(.btn,input[type=submit]):focus-visible{outline:3px solid var(--module-light)!important;outline-offset:3px}
body[data-portal-module]:not([data-portal-module=""]) :is(.content,dialog) :is(.btn,input[type=submit]):is(:disabled,.disabled){opacity:.5!important;cursor:not-allowed}

/* Barras de seção e bordas de identificação. */
body[data-portal-module]:not([data-portal-module=""]) .content .panel-heading{background:var(--module-tint)!important;border-color:var(--module-color)!important;border-left-color:var(--module-color)!important}
body[data-portal-module]:not([data-portal-module=""]) .content .panel-heading :is(h2,h3,.portal-section-kicker){color:var(--module-deep)!important;background:transparent!important}
body[data-portal-module]:not([data-portal-module=""]) .content .panel-heading:before,body[data-portal-module]:not([data-portal-module=""]) .content .panel>h2:before{background:var(--module-color)!important}
body[data-portal-module]:not([data-portal-module=""]) .content :is(.stat-card,.kpi-card,.portal-kpi-card){border-top-color:var(--module-color)!important}
html:is([data-theme=dark],[data-theme=escuro]) body[data-portal-module]:not([data-portal-module=""]) .content .panel-heading{background:var(--module-deep)!important}
html:is([data-theme=dark],[data-theme=escuro]) body[data-portal-module]:not([data-portal-module=""]) .content .panel-heading :is(h2,h3,.portal-section-kicker){color:var(--module-light)!important}

/* Superfícies neutras e identificação discreta nos cards. */
body[data-portal-module]:not([data-portal-module=""]) .content :is(.pf-card,.lc-metric,.la-kpis article){background:var(--action-surface)!important;border-top-width:2px!important}
body[data-portal-module]:not([data-portal-module=""]) .content .panel-heading{border:1px solid var(--action-border)!important;border-left:3px solid var(--module-color)!important}
html:is([data-theme=dark],[data-theme=escuro]) body[data-portal-module]:not([data-portal-module=""]) .content .panel-heading{background:color-mix(in srgb,var(--module-color) 16%,#18212d)!important}

/* Menu ativo/aberto: fundo, ícones e destaque na identidade do módulo. */
html[data-menu] body.app-page[data-portal-module]:not([data-portal-module=""]) .top-nav>.top-nav-group:is(.is-current,[open])>summary,
html[data-menu] body.app-page[data-portal-module]:not([data-portal-module=""]) .top-nav>.top-nav-group>summary:hover,
html[data-menu] body.app-page[data-portal-module]:not([data-portal-module=""]) .sidebar .nav-section:is(.is-current,[open])>.nav-section-title{
 background:var(--module-deep)!important;color:var(--module-light)!important;border-color:var(--module-color)!important;box-shadow:inset 0 -3px var(--module-light)!important;
}
html[data-menu] body.app-page[data-portal-module]:not([data-portal-module=""]) :is(.top-nav-group>summary,.nav-section-title) :is(.ui-icon,.menu-icon,.nav-category-icon){color:inherit!important}
html[data-menu] body.app-page[data-portal-module]:not([data-portal-module=""]) :is(.top-nav-group>summary,.nav-section-title):focus-visible{outline:3px solid var(--module-light)!important;outline-offset:3px}
html[data-menu] body.app-page[data-portal-module]:not([data-portal-module=""]) :is(.top-nav-dropdown,.sidebar) .nav-link:is(.active,:hover){background:var(--module-deep)!important;color:var(--module-light)!important;border-color:var(--module-color)!important;box-shadow:none!important}
html[data-menu] body.app-page[data-portal-module]:not([data-portal-module=""]) :is(.top-nav-dropdown,.sidebar) .nav-link:is(.active,:hover) :is(.ui-icon,.menu-icon){color:inherit!important}

/* Contraste dos rótulos internos e remoção do dourado legado dos submenus. */
html[data-menu] body.app-page[data-portal-module]:not([data-portal-module=""]) .top-nav .top-nav-dropdown{border-color:var(--module-color)!important;scrollbar-color:var(--module-color) #151515}
html[data-menu] body.app-page[data-portal-module]:not([data-portal-module=""]) :is(.top-nav .top-nav-dropdown,.sidebar) .nav-link :is(.ui-icon,.menu-icon){color:var(--module-light)!important}
html[data-menu] body.app-page[data-portal-module]:not([data-portal-module=""]) :is(.top-nav .top-nav-dropdown,.sidebar) .nav-link:is(.active,[aria-current=page],:hover){background:var(--module-deep)!important;color:#fff!important;border-color:var(--module-color)!important;box-shadow:none!important}
html[data-menu] body.app-page[data-portal-module]:not([data-portal-module=""]) :is(.top-nav .top-nav-dropdown,.sidebar) .nav-link:is(.active,[aria-current=page],:hover) :is(.nav-label,.ui-icon,.menu-icon){color:#fff!important}

/* Tabelas: cabeçalho, ordenação e vínculos na paleta do ambiente. */
body.app-page[data-portal-module]:not([data-portal-module=""]) .content table thead :is(th,td){background:var(--module-tint)!important;color:var(--module-deep)!important;border-bottom-color:var(--module-light)!important}
body.app-page[data-portal-module]:not([data-portal-module=""]) .content table thead :is(a,button):not(.btn-danger):not(.btn-success){color:var(--module-color)!important;background:transparent!important;border-color:transparent!important}
body.app-page[data-portal-module]:not([data-portal-module=""]) .content table th:is([aria-sort=ascending],[aria-sort=descending]) :is(a,button){color:var(--module-deep)!important;text-decoration:underline;text-underline-offset:4px}
body.app-page[data-portal-module]:not([data-portal-module=""]) .content table thead :is([data-pb-arrow],.ui-icon,.bi){color:inherit!important}
body.app-page[data-portal-module]:not([data-portal-module=""]) .content table tbody :is(td,th){border-bottom-color:var(--module-light)!important}
body.app-page[data-portal-module]:not([data-portal-module=""]) .content table tbody a:not(.btn):not(.badge){color:var(--action-ink)!important}
body.app-page[data-portal-module]:not([data-portal-module=""]) .content .pb-scroll small{color:var(--action-ink)!important}
body.app-page[data-portal-module]:not([data-portal-module=""]) .content table thead :is(a,button):focus-visible{outline:2px solid var(--module-color)!important;outline-offset:3px}
html:is([data-theme=dark],[data-theme=escuro]) body.app-page[data-portal-module]:not([data-portal-module=""]) .content table thead :is(th,td){background:var(--module-deep)!important;color:var(--module-light)!important}
html:is([data-theme=dark],[data-theme=escuro]) body.app-page[data-portal-module]:not([data-portal-module=""]) .content table thead :is(a,button){color:var(--module-light)!important}

/* Texto claro uniforme em todos os menus do portal e do SaaS. */
html[data-menu] body.app-page[data-portal-module] :is(.topbar .top-nav,.sidebar) :is(.top-nav-group,.nav-section)>:is(summary,.nav-section-title),
html[data-menu] body.app-page[data-portal-module] :is(.topbar .top-nav,.sidebar) :is(.top-nav-group,.nav-section):is(.is-current,[open])>:is(summary,.nav-section-title),
html[data-menu] body.app-page[data-portal-module] :is(.topbar .top-nav,.sidebar) :is(.top-nav-group,.nav-section)>:is(summary,.nav-section-title):hover{color:#f1f5f9!important}
html[data-menu] body.app-page[data-portal-module] :is(.topbar .top-nav,.sidebar) .nav-link,
html[data-menu] body.app-page[data-portal-module] :is(.topbar .top-nav,.sidebar) .nav-link:is(.active,[aria-current=page],:hover),
html[data-menu] body.app-page[data-portal-module] :is(.topbar .top-nav,.sidebar) .nav-link:is(.active,[aria-current=page],:hover) .nav-label,
html[data-menu] body.app-page[data-portal-module] :is(.topbar .top-nav,.sidebar) .nav-link .nav-label{color:#f1f5f9!important}
html[data-menu] body.app-page[data-portal-module] :is(.topbar .top-nav,.sidebar) :is(summary>.nav-group-label,summary>span:not(.ui-icon):not(.nav-group-icon)){color:#f1f5f9!important}
html[data-menu] body.app-page[data-portal-module] :is(.topbar .top-nav,.sidebar) .nav-subheading{color:#cbd5e1!important}
/* No SaaS não há módulo ativo: superfície neutra escura mantém a leitura clara. */
html[data-menu] body.app-page[data-portal-module=""] :is(.topbar .top-nav,.sidebar) .nav-link:is(.active,[aria-current=page],:hover){background:#30343b!important;border-color:#64748b!important;box-shadow:none!important}

/* Contexto administrativo no fluxo da página, sem sobrepor os dados. */
html body.app-page .content .portal-admin-banner.admin-context{position:static!important;inset:auto!important;transform:none!important;z-index:auto!important;width:100%!important;max-width:none!important;min-height:48px!important;box-sizing:border-box;margin:0 0 14px!important;padding:9px 14px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;flex-direction:row!important;flex-wrap:nowrap!important;gap:14px!important;background:#fff7ed!important;color:#7c2d12!important;border:1px solid #fed7aa!important;border-left:3px solid #c2410c!important;border-radius:10px!important;box-shadow:none!important;backdrop-filter:none!important}
html body.app-page .admin-context .admin-context-copy{display:flex;align-items:center;gap:10px;min-width:0}
html body.app-page .admin-context .admin-context-copy>div{min-width:0}
html body.app-page .admin-context .admin-context-copy>.ui-icon{width:20px;height:20px;flex:none;color:#9a3412}
html body.app-page .admin-context strong{display:block;font-size:11px;font-weight:600;line-height:1.4;color:#9a3412}
html body.app-page .admin-context span.admin-context-company{display:block!important;color:#7c2d12!important;font-size:12px!important;font-weight:500!important;line-height:1.4!important;max-width:none!important;white-space:nowrap!important;overflow:hidden;text-overflow:ellipsis}
html body.app-page .admin-context form{flex:none;margin:0}
html body.app-page .admin-context .portal-admin-return{display:inline-flex;align-items:center;gap:7px;padding:7px 10px;min-height:34px;border:1px solid #fdba74;border-radius:8px;background:#fff;color:#9a3412;cursor:pointer;font:inherit;font-size:11px;font-weight:600;box-shadow:none}
html body.app-page .admin-context .portal-admin-return span{color:inherit!important;font-size:11px!important;font-weight:600!important;line-height:1.2!important;white-space:nowrap!important}
html body.app-page .admin-context .portal-admin-return svg{width:16px;height:16px}
html body.app-page .admin-context .portal-admin-return:hover{background:#ffedd5}
html body.app-page .admin-context .portal-admin-return:focus-visible{outline:2px solid #9a3412;outline-offset:3px}
html:is([data-theme=dark],[data-theme=escuro]) body.app-page .content .portal-admin-banner.admin-context{background:#29221d!important;color:#fed7aa!important;border-color:#78523b!important}
html:is([data-theme=dark],[data-theme=escuro]) body.app-page .admin-context :is(strong,span.admin-context-company,.admin-context-copy>.ui-icon){color:#fed7aa!important}
html:is([data-theme=dark],[data-theme=escuro]) body.app-page .admin-context .portal-admin-return{background:#382b22;color:#fed7aa;border-color:#78523b}
@media(max-width:480px){html body.app-page .content .portal-admin-banner.admin-context{padding:8px 10px!important;gap:8px!important}html body.app-page .admin-context .admin-context-copy{gap:6px}html body.app-page .admin-context .portal-admin-return{padding:7px}}
@media print{html body.app-page .content .portal-admin-banner.admin-context{display:none!important}}

/* Navegação neutra: seleção, hover e foco independentes da cor do módulo. */
html[data-menu] body.app-page[data-portal-module] header.topbar nav.top-nav details.top-nav-group>summary,
html[data-menu] body.app-page[data-portal-module] aside.sidebar nav details.nav-section>summary{color:#f1f5f9!important;box-shadow:none!important}
html[data-menu] body.app-page[data-portal-module] header.topbar nav.top-nav details.top-nav-group:is(.is-current,[open])>summary,
html[data-menu] body.app-page[data-portal-module] header.topbar nav.top-nav details.top-nav-group>summary:hover,
html[data-menu] body.app-page[data-portal-module] aside.sidebar nav details.nav-section:is(.is-current,[open])>summary,
html[data-menu] body.app-page[data-portal-module] aside.sidebar nav details.nav-section>summary:hover{background:#292929!important;color:#f1f5f9!important;border-color:#626262!important;box-shadow:none!important}
html[data-menu] body.app-page[data-portal-module] header.topbar nav.top-nav .top-nav-dropdown{border-color:#484848!important;scrollbar-color:#737373 #151515}
html[data-menu] body.app-page[data-portal-module] header.topbar nav.top-nav .top-nav-dropdown a.nav-link:is(.active,[aria-current=page],:hover),
html[data-menu] body.app-page[data-portal-module] aside.sidebar nav .nav-section-links a.nav-link:is(.active,[aria-current=page],:hover){background:#292929!important;border-color:#626262!important;color:#f1f5f9!important;box-shadow:none!important}
html[data-menu] body.app-page[data-portal-module] header.topbar nav.top-nav :is(summary,a.nav-link):focus,
html[data-menu] body.app-page[data-portal-module] aside.sidebar nav :is(summary,a.nav-link):focus{outline:2px solid #b8bec7!important;outline-offset:2px!important;box-shadow:none!important}
html[data-menu] body.app-page[data-portal-module] header.topbar .topbar-active-module{background:#202020!important;border-color:#484848!important;color:#e5e7eb!important}

/* Aviso administrativo compacto preso ao topo, como o contexto original. */
html body.app-page header.topbar>.portal-admin-banner.admin-context{position:absolute!important;top:100%!important;right:14px!important;left:auto!important;bottom:auto!important;transform:none!important;display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:space-between!important;flex-wrap:nowrap!important;width:auto!important;max-width:min(490px,calc(100vw - 28px))!important;min-height:36px!important;margin:0!important;padding:6px 9px!important;gap:12px!important;background:#24272c!important;border:1px solid #4b5058!important;border-top:0!important;border-radius:0 0 10px 10px!important;box-shadow:0 3px 8px #0002!important;backdrop-filter:none!important;color:#e5e7eb!important;z-index:27!important}
html body.app-page header.topbar .admin-context .admin-context-copy{display:flex!important;align-items:center;gap:7px;min-width:0}
html body.app-page header.topbar .admin-context .admin-context-copy>div{min-width:0}
html body.app-page header.topbar .admin-context .admin-context-copy>.ui-icon{width:16px;height:16px;color:#cbd5e1!important;flex:none}
html body.app-page header.topbar .admin-context strong{display:block;font-size:9px!important;font-weight:500!important;line-height:1.3!important;color:#b8c0cc!important}
html body.app-page header.topbar .admin-context span.admin-context-company{display:block!important;font-size:11px!important;line-height:1.4!important;font-weight:500!important;white-space:nowrap!important;overflow:hidden;text-overflow:ellipsis;color:#f1f5f9!important;max-width:310px!important}
html body.app-page header.topbar .admin-context .portal-admin-return{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:center!important;gap:6px!important;min-height:30px!important;width:auto!important;padding:5px 8px!important;border:1px solid #606772!important;border-radius:6px!important;background:#343940!important;color:#f1f5f9!important;box-shadow:none!important}
html body.app-page header.topbar .admin-context .portal-admin-return span{display:inline!important;font-size:10px!important;line-height:1.2!important;color:#f1f5f9!important;white-space:nowrap!important}
html body.app-page header.topbar .admin-context .portal-admin-return svg{width:14px!important;height:14px!important;margin:0!important;flex:none}
html body.app-page header.topbar .admin-context .portal-admin-return:hover{background:#454c55!important}
html body.app-page header.topbar .admin-context .portal-admin-return:focus-visible{outline:2px solid #e2e8f0!important;outline-offset:2px}
@media(max-width:540px){html body.app-page header.topbar>.portal-admin-banner.admin-context{right:8px!important;max-width:calc(100vw - 16px)!important;gap:8px!important}html body.app-page header.topbar .admin-context span.admin-context-company{max-width:calc(100vw - 170px)!important}}

/* Conteúdo comum na paleta; cards e estados semânticos mantêm identidade própria. */
body.app-page[data-portal-module]:not([data-portal-module=""]) .content :is(.history-filters,.filter-bar,.filters-bar,.filter-panel){border-color:var(--module-light)!important;background:var(--action-surface)!important}
body.app-page[data-portal-module]:not([data-portal-module=""]) .content :is(p.muted,.text-muted,.help-text,.form-text):not(.card *,[class*="-card"] *,.metric *,.lc-metric *,.la-kpis *,.alert *,.admin-context *){color:color-mix(in srgb,var(--action-ink) 65%,#64748b)!important}
body.app-page[data-portal-module]:not([data-portal-module=""]) .content table :is(small,details>summary):not(.badge *,.alert *,[role=alert] *){color:var(--action-ink)!important}
body.app-page[data-portal-module]:not([data-portal-module=""]) .content details:not(.card *,[class*="-card"] *,.metric *, .alert *)>summary{color:var(--action-ink)!important;border-color:var(--module-light)!important}
body.app-page[data-portal-module]:not([data-portal-module=""]) .content table tbody tr:not([class]):not([data-state]):not([data-status]){background:var(--action-surface)!important;background-image:none!important;--bs-table-bg:var(--action-surface);--bs-table-striped-bg:var(--module-tint);--bs-table-hover-bg:var(--module-tint)}
body.app-page[data-portal-module]:not([data-portal-module=""]) .content table tbody tr:not([class]):not([data-state]):not([data-status])>td:not([class]):not([data-state]):not([data-status]){background:var(--action-surface)!important;background-image:none!important;box-shadow:none!important}
body.app-page[data-portal-module]:not([data-portal-module=""]) .content table tbody tr:not([class]):not([data-state]):not([data-status]):hover>td:not([class]):not([data-state]):not([data-status]){background:color-mix(in srgb,var(--module-color) 6%,var(--action-surface))!important}
body.app-page[data-portal-module]:not([data-portal-module=""]) .content :is(.pagination-row,.pagination) :is(a,button):not(.disabled){color:var(--action-ink)!important;border-color:var(--module-light)!important}

/* Entrega 668: cabeçalhos do portal compartilham a identidade do módulo. */
html body.app-page[data-portal-module]:not([data-portal-module=""]) .content :is(.page-heading,.performance-unified-header,.pf-page-head,.individual-hero,.mon-hero,.portal-energy-hero,.gestao-hero,.crm-client-hero,.access-client-hero,.resumo-hero,.cw-hero,.fac-hero,.fac-academy-hero,.fac-student-hero,.bb-hero,.apr-hero){background:linear-gradient(120deg,var(--module-deep),var(--module-color))!important;border-color:var(--module-color)!important;border-left:4px solid var(--module-light)!important}
html body.app-page[data-portal-module]:not([data-portal-module=""]) .content :is(.page-heading,.performance-unified-header,.pf-page-head,.individual-hero,.mon-hero,.portal-energy-hero,.gestao-hero,.crm-client-hero,.access-client-hero,.resumo-hero,.cw-hero,.fac-hero,.fac-academy-hero,.fac-student-hero,.bb-hero,.apr-hero)::before{background:var(--module-light)!important}
html body.app-page[data-portal-module]:not([data-portal-module=""]) .content :is(.page-heading,.performance-unified-header,.pf-page-head,.individual-hero,.mon-hero,.portal-energy-hero,.gestao-hero,.crm-client-hero,.access-client-hero,.resumo-hero,.cw-hero,.fac-hero,.fac-academy-hero,.fac-student-hero,.bb-hero,.apr-hero) :is(h1,h2,p,.eyebrow,[class$="-kicker"],[class$="-eyebrow"],.apr-hero-k,.apr-hero-v,.apr-hero-s):not(.card *,[class*="-metric"] *){color:#fff!important;background:transparent!important}
html body.app-page[data-portal-module]:not([data-portal-module=""]) .content :is(.page-heading,.performance-unified-header,.pf-page-head,.individual-hero,.mon-hero,.portal-energy-hero,.gestao-hero,.crm-client-hero,.access-client-hero,.resumo-hero,.cw-hero,.fac-hero,.fac-academy-hero,.fac-student-hero,.bb-hero,.apr-hero) .date-tag{background:#ffffff18!important;color:#fff!important;border:1px solid #ffffff45!important}
html body.app-page[data-portal-module]:not([data-portal-module=""]) .content :is(.page-heading,.performance-unified-header,.pf-page-head,.individual-hero,.mon-hero,.portal-energy-hero,.gestao-hero,.crm-client-hero,.access-client-hero,.resumo-hero,.cw-hero,.fac-hero,.fac-academy-hero,.fac-student-hero,.bb-hero,.apr-hero) .btn:not(.btn-danger):not(.btn-success){background:#ffffff!important;color:var(--module-color)!important;border-color:#ffffff80!important}

/* Entrega 672: ficha e detalhe do cliente usam a identidade de Energia. */
html body.app-page[data-portal-module="energia"] .content :is(.unit-v235-editor,.unit-v231-detail-section){--rv-teal:var(--module-color);--rv-navy-2:var(--module-deep);--rv-soft:var(--module-tint);--rv-line:var(--module-light);--brand-unit:var(--module-color)}
html body.app-page[data-portal-module="energia"] .content :is(.unit-v235-editor-header,.unit-v231-detail-hero){background:linear-gradient(120deg,var(--module-deep),var(--module-color))!important;border-color:var(--module-color)!important;color:#fff!important}
html body.app-page[data-portal-module="energia"] .content .unit-v235-editor-top{background:var(--module-deep)!important;color:#fff!important}
html body.app-page[data-portal-module="energia"] .content :is(.unit-v235-editor-header,.unit-v231-detail-hero) :is(h1,h2,p,strong,.unit-v231-eyebrow){color:#fff!important}
html body.app-page[data-portal-module="energia"] .content .unit-v236-location{background:#ffffff18!important;border-color:#ffffff45!important}
html body.app-page[data-portal-module="energia"] .content .unit-v236-action-nav{background:var(--action-hover)!important;border-color:var(--module-light)!important}
html body.app-page[data-portal-module="energia"] .content .unit-v236-action-tab{color:var(--action-ink)!important;border-color:var(--module-light)!important;background:var(--action-surface)!important;box-shadow:none!important}
html body.app-page[data-portal-module="energia"] .content .unit-v236-action-tab.is-current{background:var(--module-color)!important;color:#fff!important;border-color:var(--module-color)!important}
html body.app-page[data-portal-module="energia"] .content .unit-v236-action-tab .ui-icon{color:inherit!important}
html body.app-page[data-portal-module="energia"] .content .unit-v236-form-intro{background:var(--action-hover)!important;border-color:var(--module-light)!important}
html body.app-page[data-portal-module="energia"] .content :is(.unit-v231-section-head,.unit-v236-form-intro) :is(h3,strong,.unit-v231-eyebrow){color:var(--action-ink)!important}

body[data-portal-module="frota"]{--module-color:#245a83;--module-deep:#122e47;--module-light:#a6c4df;--module-tint:#eef5fb}
