/* Portal IBMF unified visual layer.
   Loaded after module CSS files to align legacy screens without changing behavior. */

:root {
  --portal-font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Arial, sans-serif;
  --portal-appbar-x: 32px;
  --portal-content-max: 1320px;
  --portal-content-gutter: 24px;
  --portal-bg: #f3f4f6;
  --portal-surface: #ffffff;
  --portal-surface-soft: #f8fafc;
  --portal-text: #111827;
  --portal-muted: #64748b;
  --portal-border: #e5e7eb;
  --portal-border-strong: #d1d5db;
  --portal-blue: #1a4889;
  --portal-blue-dark: #113560;
  --portal-blue-soft: #eaf2fb;
  --portal-indigo-legacy: #4f46e5;
  --portal-yellow: #e2a721;
  --portal-yellow-soft: #fff7df;
  --portal-success: #17804d;
  --portal-warning: #c77700;
  --portal-danger: #b42318;
  --portal-accent-blue: #2563eb;
  --portal-accent-sky: #0ea5e9;
  --portal-accent-cyan: #0891b2;
  --portal-accent-teal: #0f766e;
  --portal-accent-green: #16a34a;
  --portal-accent-amber: #f59e0b;
  --portal-accent-orange: #ea580c;
  --portal-accent-red: #dc2626;
  --portal-accent-rose: #e11d48;
  --portal-accent-violet: #7c3aed;
  --portal-accent-slate: #475569;
  --portal-radius: 8px;
  --portal-radius-sm: 6px;
  --portal-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
  --portal-shadow-hover: 0 10px 24px rgba(15, 23, 42, 0.12);
  --portal-focus: 0 0 0 3px rgba(26, 72, 137, 0.18);

  /* Legacy aliases used by the current modules. */
  --bg: var(--portal-bg);
  --bg-app: var(--portal-bg);
  --bg-body: var(--portal-bg);
  --bg-panel: var(--portal-surface);
  --panel: var(--portal-surface);
  --panel-soft: var(--portal-surface-soft);
  --card: var(--portal-surface);
  --card-bg: var(--portal-surface);
  --surface: var(--portal-surface);
  --surface-2: var(--portal-surface-soft);
  --text: var(--portal-text);
  --text-main: var(--portal-text);
  --text-primary: var(--portal-text);
  --color-text: var(--portal-text);
  --text-secondary: var(--portal-muted);
  --text-muted: var(--portal-muted);
  --muted: var(--portal-muted);
  --color-muted: var(--portal-muted);
  --line: var(--portal-border);
  --border: var(--portal-border);
  --border-color: var(--portal-border);
  --border-light: var(--portal-border);
  --border-hover: var(--portal-border-strong);
  --shadow: var(--portal-shadow);

  --primary: var(--portal-blue);
  --primary-dark: var(--portal-blue-dark);
  --primary2: var(--portal-blue-dark);
  --primary-2: var(--portal-blue-dark);
  --primary-700: var(--portal-blue-dark);
  --primary-hover: var(--portal-blue-dark);
  --primary-light: var(--portal-blue-soft);
  --primary-soft: var(--portal-blue-soft);
  --accent: var(--portal-blue);
  --brand: var(--portal-blue);
  --brand-2: var(--portal-blue-dark);
  --brand-primary: var(--portal-blue);
  --brand-secondary: var(--portal-blue-dark);
  --brand-accent: var(--portal-yellow);
  --brand-soft: var(--portal-blue-soft);
  --brand-muted: var(--portal-muted);
  --brand-order: var(--portal-blue);
  --brand-meta: var(--portal-yellow);
  --brand-header-bg: var(--portal-surface);
  --success: var(--portal-success);
  --warning: var(--portal-warning);
  --danger: var(--portal-danger);

  --menu-bg: var(--portal-bg);
  --menu-surface: var(--portal-surface);
  --menu-text: var(--portal-text);
  --menu-muted: var(--portal-muted);
  --menu-border: var(--portal-border);
  --menu-primary: var(--portal-blue);
  --menu-accent: var(--portal-success);
  --menu-warning: var(--portal-yellow);
  --menu-shadow: var(--portal-shadow);

  --color-primary: var(--portal-blue);
  --color-primary-light: var(--portal-blue-soft);
  --color-danger: var(--portal-danger);
  --color-success: var(--portal-success);
  --color-warning: var(--portal-warning);

  --cor-bg: var(--portal-bg);
  --cor-card: var(--portal-surface);
  --cor-fundo: var(--portal-bg);
  --cor-fundo-pagina: var(--portal-bg);
  --cor-fundo-card: var(--portal-surface);
  --cor-texto: var(--portal-text);
  --cor-texto-padrao: var(--portal-text);
  --cor-sub: var(--portal-muted);
  --cor-borda: var(--portal-border);
  --cor-input-fundo: var(--portal-surface);
  --cor-principal: var(--portal-blue);
  --cor-sec: var(--portal-blue-dark);
  --cor-secundaria: var(--portal-yellow);
  --cor-botao: var(--portal-blue);
  --cor-botao-hover: var(--portal-blue-dark);
  --cor-icone-card: var(--portal-accent-blue);
  --cor-icone-card-quando-passa-o-mouse: var(--portal-yellow);

  --export-primary: var(--portal-blue);
  --kanban-blue: var(--portal-blue);
}

html[data-portal-theme="dark"] {
  color-scheme: dark;
  --portal-bg: #1c1d20;
  --portal-surface: #1c1e22;
  --portal-surface-soft: #23242a;
  --portal-text: #edeef0;
  --portal-muted: #b0b4ba;
  --portal-border: rgba(255, 255, 255, 0.08);
  --portal-border-strong: #43484e;
  --portal-blue: #2781f6;
  --portal-blue-dark: #1574e7;
  --portal-blue-soft: rgba(39, 129, 246, 0.12);
  --portal-yellow: #ffca16;
  --portal-yellow-soft: rgba(255, 202, 22, 0.13);
  --portal-success: #12a594;
  --portal-warning: #ffca16;
  --portal-danger: #ff949d;
  --portal-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
  --portal-shadow-hover: 0 16px 34px rgba(0, 0, 0, 0.3);
  --portal-focus: 0 0 0 3px rgba(39, 129, 246, 0.28);
}

html[data-portal-theme="light"] {
  color-scheme: light;
}

html {
  background: var(--portal-bg);
  color: var(--portal-text);
  font-family: var(--portal-font);
  text-size-adjust: 100%;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--portal-bg) !important;
  color: var(--portal-text);
  font-family: var(--portal-font) !important;
  letter-spacing: 0;
}

body,
button,
input,
select,
textarea {
  font-family: var(--portal-font) !important;
}

a {
  color: inherit;
}

*:focus-visible {
  outline: 2px solid rgba(26, 72, 137, 0.45);
  outline-offset: 2px;
}

.portal-appbar {
  width: 100%;
  min-height: 67px;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 14px !important;
  padding: 14px var(--portal-appbar-x) !important;
  margin: 0 !important;
  background: var(--portal-surface) !important;
  color: var(--portal-text) !important;
  border: 0 !important;
  border-bottom: 1px solid var(--portal-border) !important;
  border-radius: 0 !important;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06) !important;
}

html[data-portal-theme="dark"] .portal-appbar {
  background: #17171a !important;
  box-shadow: none !important;
}

.portal-appbar > * {
  min-width: 0;
}

.portal-appbar-brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.portal-appbar-logo {
  width: 64px;
  height: 34px;
  flex: 0 0 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--portal-yellow);
  background: #111827;
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

.portal-appbar-logo-img {
  width: 64px;
  height: 34px;
  flex: 0 0 64px;
  object-fit: contain;
  display: block;
}

.portal-appbar-title {
  min-width: 0;
  display: block;
  line-height: normal;
}

.portal-appbar-title strong {
  overflow: hidden;
  color: var(--portal-text);
  font-size: 20px;
  font-weight: 700;
  line-height: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-appbar-title span {
  display: none;
}

.portal-appbar .portal-back-button {
  order: -1;
}

.portal-appbar.portal-appbar-normalized {
  justify-content: flex-start !important;
}

.portal-appbar.portal-appbar-normalized .portal-appbar-brand {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.portal-appbar .module-menu-actions,
.portal-appbar .topbar-right,
.portal-appbar .topbar-actions,
.portal-appbar .header-actions,
.portal-appbar .header-acoes,
.portal-appbar .pc-topbar__right,
.portal-appbar .dash-header .header-actions,
.portal-appbar .dre-actions,
.portal-appbar .despesas-topbar-actions {
  margin-left: auto;
}

.portal-page-heading {
  position: relative !important;
  width: min(var(--portal-content-max), calc(100% - (var(--portal-content-gutter) * 2))) !important;
  max-width: var(--portal-content-max) !important;
  margin: 24px auto 16px !important;
  padding: 20px 0 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.portal-page-heading::before {
  content: "" !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 44px !important;
  height: 4px !important;
  border-radius: 999px !important;
  background: var(--portal-yellow) !important;
}

.portal-page-heading h1 {
  margin: 0 0 6px !important;
  color: var(--portal-text) !important;
  font-size: 24px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  letter-spacing: 0 !important;
}

.portal-page-heading p,
.portal-page-heading .lead,
.portal-page-heading .subtitulo,
.portal-page-heading .muted,
.portal-page-heading .topbar-title span {
  display: none !important;
}

.portal-page-heading .eyebrow,
.portal-page-heading .module-menu-eyebrow,
.portal-page-heading .pc-title__kicker {
  display: none !important;
}

.portal-local-back-hidden {
  display: none !important;
}

body.portal-unified-header-shell .topbar-user,
body.portal-unified-header-shell .module-menu-user,
body.portal-unified-header-shell .pc-user,
body.portal-unified-header-shell .saudacao,
body.portal-unified-header-shell .user-badge,
body.portal-unified-header-shell .user-name,
body.portal-unified-header-shell .user-role,
body.portal-unified-header-shell .portal-user-chrome-hidden {
  display: none !important;
}

body.portal-unified-header-shell header img[alt="IBMF"]:not(.portal-appbar-logo-img),
body.portal-unified-header-shell header .brand-img,
body.portal-unified-header-shell header .brand-logo {
  display: none !important;
}

body.portal-unified-header-shell header.topbar:has(.brand-img):not(:has(.brand-title)):not(:has(.btn-back)):not(:has(.topbar-right > *)):not(:has(.cta-right > *)) {
  display: none !important;
}

body.portal-unified-header-shell .sidebar-eyebrow,
body.portal-unified-header-shell .dash-title small {
  display: none !important;
}

body.viewer-body {
  height: 100dvh !important;
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  overflow: hidden !important;
}

body.viewer-body > .portal-appbar {
  align-self: start !important;
}

body.viewer-body > #html-frame {
  grid-row: 2 !important;
  height: 100% !important;
  min-height: 0 !important;
}

.topbar,
.module-menu-topbar,
.dash-header,
header.despesas-topbar,
.chat-topbar,
.pc-header,
.pc-topbar,
.eq-header,
.dre-topbar {
  min-height: 64px;
  background: var(--portal-surface) !important;
  color: var(--portal-text) !important;
  border-bottom: 1px solid var(--portal-border) !important;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06) !important;
}

.topbar-left,
.topbar-right,
.module-menu-topbar > div,
.module-menu-actions,
.header-top,
.dash-header .brand,
.dash-header .header-actions,
.pc-header .header-content,
.pc-topbar__left,
.pc-topbar__right,
.eq-header,
.dre-brand,
.dre-actions,
.despesas-topbar-left,
.header-buttons {
  min-width: 0;
}

.topbar-logo,
.module-menu-brand,
.dash-header h1,
.brand h1,
.header-top h1,
.topbar-title strong,
.sidebar-logo,
.sidebar-header h1 {
  color: var(--portal-text) !important;
  font-weight: 700;
  letter-spacing: 0;
}

.topbar-user,
.module-menu-user,
.dash-header p,
.brand p,
.subtitle,
.muted,
.topbar-title span {
  color: var(--portal-muted) !important;
}

.topbar-logo-img,
.brand-logo {
  border-radius: 0 !important;
}

.page,
.page-container,
.module-menu-page,
.container,
.main,
.content,
.app-main {
  color: var(--portal-text);
}

.module-menu-page {
  width: min(var(--portal-content-max), calc(100% - (var(--portal-content-gutter) * 2)));
}

.module-menu-hero,
.hero,
.card,
.panel,
.metric,
.metric-card,
.kpi-card,
.summary-card,
.pc-card,
.eq-panel,
.dre-panel,
.dre-toolbar,
.dre-warning,
.module-menu-card,
.bucket-card,
.ranking-item,
.table-card,
.filters-card,
.filtro-card,
.filter-card,
.filters,
.cobranca-config-card,
.cobranca-card,
.travel-card,
.expense-card,
.receipt-card,
.job-card,
.talent-card,
.candidate-card,
.row-card {
  background: var(--portal-surface) !important;
  border-color: var(--portal-border) !important;
  border-radius: var(--portal-radius) !important;
  box-shadow: var(--portal-shadow) !important;
}

.login-card {
  background: var(--portal-surface) !important;
  border: 1px solid var(--portal-border) !important;
  box-shadow: var(--portal-shadow) !important;
}

.login-logo,
.login-card h1,
.login-card h2 {
  color: var(--portal-text) !important;
}

.login-subtitle,
.login-form label {
  color: var(--portal-muted) !important;
}

.login-form input {
  background: var(--portal-surface-soft) !important;
  border-color: var(--portal-border) !important;
  color: var(--portal-text) !important;
}

.login-form input:focus {
  background: var(--portal-surface) !important;
}

html[data-portal-theme="dark"] .login-wrapper {
  background: var(--portal-bg);
}

.module-menu-hero {
  border-top: 4px solid var(--portal-blue) !important;
  padding: 26px 28px !important;
}

.module-menu-hero::before,
.page-header::before,
.hero::before {
  content: "";
  display: block;
  width: 44px;
  height: 4px;
  margin-bottom: 16px;
  border-radius: 999px;
  background: var(--portal-yellow);
}

.module-menu-eyebrow,
.eyebrow,
.section-eyebrow {
  color: var(--portal-blue) !important;
  letter-spacing: 0 !important;
}

.module-menu-hero h1,
.page-header h1,
.hero h1,
.hero h2,
.module-header h1,
.section-heading h2,
.card-text h3,
.card h3,
.card-title,
.panel-title,
.metric-title,
.kpi-title {
  color: var(--portal-text) !important;
  letter-spacing: 0;
}

.module-menu-hero p,
.module-menu-card-text small,
.card-text p,
.hero p,
.card-header p {
  color: var(--portal-muted) !important;
}

.card.home-card,
.module-menu-card,
.module-card,
.home-card,
.travel-card {
  --portal-card-accent: var(--portal-blue);
  --portal-card-accent-soft: rgba(26, 72, 137, 0.12);
  border: 1px solid transparent !important;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.cards-grid,
.module-menu-grid,
.module-grid,
.home-cards,
.summary-grid,
.kpi-grid,
.action-grid {
  gap: 18px !important;
}

.module-grid,
.module-menu-grid,
.cards-grid {
  align-items: stretch !important;
}

.module-card {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 12px !important;
  min-height: 196px !important;
}

.module-card > div,
.module-menu-card-text,
.card-text {
  min-width: 0;
}

.module-card > div {
  flex: 1 1 auto;
}

.module-card > .btn,
.module-card > .button,
.module-card > [class*="btn"] {
  width: 100%;
  margin-top: auto !important;
}

.card.home-card:hover,
.module-menu-card:hover,
.module-card:hover,
.home-card:hover,
.travel-card:hover {
  border-color: var(--portal-card-accent-soft) !important;
  box-shadow: var(--portal-shadow-hover) !important;
  transform: translateY(-2px);
}

.card-icon,
.module-menu-icon,
.module-icon,
.home-card .icon-wrap,
.module-placeholder-marker,
.brand-mark {
  background: var(--portal-icon-bg, linear-gradient(135deg, var(--portal-blue), #2563ad));
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.56) !important;
  box-shadow: 0 10px 20px var(--portal-card-accent-soft) !important;
}

html[data-portal-theme="dark"] .card-icon,
html[data-portal-theme="dark"] .module-menu-icon,
html[data-portal-theme="dark"] .module-icon,
html[data-portal-theme="dark"] .home-card .icon-wrap,
html[data-portal-theme="dark"] .module-placeholder-marker,
html[data-portal-theme="dark"] .brand-mark {
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18) !important;
}

.portal-svg-icon {
  width: 23px;
  height: 23px;
  display: block;
  color: currentColor;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.portal-svg-icon [fill="currentColor"] {
  fill: currentColor;
  stroke: none;
}

.card.home-card[data-modulo="metas"],
.module-menu-card-primary {
  --portal-card-accent: #2563eb;
  --portal-card-accent-soft: rgba(37, 99, 235, 0.18);
  --portal-icon-bg: linear-gradient(135deg, #2563eb, #0ea5e9);
}

.card.home-card[data-modulo="projetos"] {
  --portal-card-accent: #7c3aed;
  --portal-card-accent-soft: rgba(124, 58, 237, 0.18);
  --portal-icon-bg: linear-gradient(135deg, #7c3aed, #2563eb);
}

.card.home-card[data-modulo="simulacoes"],
.card.home-card[data-modulo="equalizador-precos"] {
  --portal-card-accent: #0891b2;
  --portal-card-accent-soft: rgba(8, 145, 178, 0.18);
  --portal-icon-bg: linear-gradient(135deg, #0891b2, #2563eb);
}

.card.home-card[data-modulo="inadimplencia"] {
  --portal-card-accent: #dc2626;
  --portal-card-accent-soft: rgba(220, 38, 38, 0.18);
  --portal-icon-bg: linear-gradient(135deg, #dc2626, #f97316);
}

.card.home-card[data-modulo="regioes"] {
  --portal-card-accent: #e11d48;
  --portal-card-accent-soft: rgba(225, 29, 72, 0.18);
  --portal-icon-bg: linear-gradient(135deg, #e11d48, #f43f5e);
}

.card.home-card[data-modulo="links"] {
  --portal-card-accent: #0f766e;
  --portal-card-accent-soft: rgba(15, 118, 110, 0.18);
  --portal-icon-bg: linear-gradient(135deg, #0f766e, #14b8a6);
}

.card.home-card[data-modulo="ocorrencias"] {
  --portal-card-accent: #0ea5e9;
  --portal-card-accent-soft: rgba(14, 165, 233, 0.18);
  --portal-icon-bg: linear-gradient(135deg, #0ea5e9, #0284c7);
}

.card.home-card[data-rh="1"],
.card.home-card[data-modulo="despesas"] {
  --portal-card-accent: #16a34a;
  --portal-card-accent-soft: rgba(22, 163, 74, 0.18);
  --portal-icon-bg: linear-gradient(135deg, #16a34a, #059669);
}

.card.home-card[data-modulo="comissoes"],
.card.home-card[data-modulo="faturamento"] {
  --portal-card-accent: #e2a721;
  --portal-card-accent-soft: rgba(226, 167, 33, 0.22);
  --portal-icon-bg: linear-gradient(135deg, #e2a721, #f59e0b);
}

.card.home-card[data-modulo="assistente-bi"] {
  --portal-card-accent: #7c3aed;
  --portal-card-accent-soft: rgba(124, 58, 237, 0.18);
  --portal-icon-bg: linear-gradient(135deg, #7c3aed, #db2777);
}

.card.home-card[data-contratos="1"] {
  --portal-card-accent: #f59e0b;
  --portal-card-accent-soft: rgba(245, 158, 11, 0.2);
  --portal-icon-bg: linear-gradient(135deg, #f59e0b, #d97706);
}

.card.home-card[data-admin="1"] {
  --portal-card-accent: #475569;
  --portal-card-accent-soft: rgba(71, 85, 105, 0.18);
  --portal-icon-bg: linear-gradient(135deg, #475569, #0f172a);
}

.card.home-card[data-portal-card="custos"] {
  --portal-card-accent: #16a34a;
  --portal-card-accent-soft: rgba(22, 163, 74, 0.18);
  --portal-icon-bg: linear-gradient(135deg, #16a34a, #22c55e);
}

.card.home-card[data-portal-card="usuarios"] {
  --portal-card-accent: #7c3aed;
  --portal-card-accent-soft: rgba(124, 58, 237, 0.18);
  --portal-icon-bg: linear-gradient(135deg, #7c3aed, #8b5cf6);
}

.card.home-card[data-portal-card="escopo"] {
  --portal-card-accent: #0891b2;
  --portal-card-accent-soft: rgba(8, 145, 178, 0.18);
  --portal-icon-bg: linear-gradient(135deg, #0891b2, #0ea5e9);
}

.card.home-card[data-portal-card="bi"] {
  --portal-card-accent: #2563eb;
  --portal-card-accent-soft: rgba(37, 99, 235, 0.18);
  --portal-icon-bg: linear-gradient(135deg, #2563eb, #06b6d4);
}

.card.home-card[data-portal-card="ia"],
.card.home-card[data-portal-card="html"] {
  --portal-card-accent: #7c3aed;
  --portal-card-accent-soft: rgba(124, 58, 237, 0.18);
  --portal-icon-bg: linear-gradient(135deg, #7c3aed, #db2777);
}

.module-card[data-portal-card="briefcase"],
.module-card[data-portal-card="users"] {
  --portal-card-accent: #2563eb;
  --portal-card-accent-soft: rgba(37, 99, 235, 0.16);
  --portal-icon-bg: linear-gradient(135deg, #2563eb, #60a5fa);
}

.module-card[data-portal-card="health"] {
  --portal-card-accent: #0891b2;
  --portal-card-accent-soft: rgba(8, 145, 178, 0.16);
  --portal-icon-bg: linear-gradient(135deg, #0891b2, #22d3ee);
}

.module-card[data-portal-card="calendar"] {
  --portal-card-accent: #7c3aed;
  --portal-card-accent-soft: rgba(124, 58, 237, 0.16);
  --portal-icon-bg: linear-gradient(135deg, #7c3aed, #a78bfa);
}

.module-card[data-portal-card="message"] {
  --portal-card-accent: #f59e0b;
  --portal-card-accent-soft: rgba(245, 158, 11, 0.18);
  --portal-icon-bg: linear-gradient(135deg, #f59e0b, #f97316);
}

.card.home-card:not([data-modulo]):not([data-admin]):not([data-rh]):not([data-contratos]) {
  --portal-card-accent: #2563eb;
  --portal-card-accent-soft: rgba(37, 99, 235, 0.18);
  --portal-icon-bg: linear-gradient(135deg, #2563eb, #1a4889);
}

.module-menu-card-accent {
  --portal-card-accent: #16a34a;
  --portal-card-accent-soft: rgba(22, 163, 74, 0.18);
  --portal-icon-bg: linear-gradient(135deg, #16a34a, #22c55e);
}

.module-menu-card-export {
  --portal-card-accent: #f59e0b;
  --portal-card-accent-soft: rgba(245, 158, 11, 0.2);
  --portal-icon-bg: linear-gradient(135deg, #d97706, #f59e0b);
}

.module-menu-card[href*="cobranca-config"] {
  --portal-card-accent: #0891b2;
  --portal-card-accent-soft: rgba(8, 145, 178, 0.18);
  --portal-icon-bg: linear-gradient(135deg, #0891b2, #0ea5e9);
}

.btn,
.button,
.btn-primary,
.btn-secondary,
.btn-outline,
.btn-sair,
.module-menu-back,
.module-menu-logout,
.topbar-back,
.pc-back,
.header-button,
.primary-btn,
.secondary-btn,
.cobranca-btn,
.action-btn,
button.primary,
.btn.primary,
.btn.ghost {
  min-height: 38px;
  border-radius: var(--portal-radius-sm) !important;
  font-weight: 700;
  letter-spacing: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn-primary,
.primary-btn,
.btn.primary,
.cobranca-btn-primary,
button.primary {
  background: var(--portal-blue) !important;
  border-color: var(--portal-blue) !important;
  color: #ffffff !important;
  box-shadow: 0 6px 14px rgba(26, 72, 137, 0.18) !important;
}

html[data-portal-theme="dark"] .btn-primary,
html[data-portal-theme="dark"] .primary-btn,
html[data-portal-theme="dark"] .btn.primary,
html[data-portal-theme="dark"] .cobranca-btn-primary,
html[data-portal-theme="dark"] button.primary,
html[data-portal-theme="dark"] .login-form button[type="submit"] {
  background: var(--portal-blue) !important;
  border-color: var(--portal-blue) !important;
  color: #ffffff !important;
  box-shadow: 0 8px 18px rgba(39, 129, 246, 0.18) !important;
}

html[data-portal-theme="dark"] .btn-primary:hover,
html[data-portal-theme="dark"] .primary-btn:hover,
html[data-portal-theme="dark"] .btn.primary:hover,
html[data-portal-theme="dark"] .cobranca-btn-primary:hover,
html[data-portal-theme="dark"] button.primary:hover,
html[data-portal-theme="dark"] .login-form button[type="submit"]:hover {
  background: var(--portal-blue-dark) !important;
  border-color: var(--portal-blue-dark) !important;
  color: #ffffff !important;
}

.btn-primary:hover,
.primary-btn:hover,
.btn.primary:hover,
.cobranca-btn-primary:hover,
button.primary:hover {
  background: var(--portal-blue-dark) !important;
  border-color: var(--portal-blue-dark) !important;
}

.btn-secondary,
.btn-outline,
.btn-sair,
.module-menu-back,
.module-menu-logout,
.secondary-btn,
.btn.ghost,
.topbar-back,
.pc-back,
.header-button {
  background: var(--portal-surface) !important;
  border: 1px solid var(--portal-border) !important;
  color: var(--portal-blue) !important;
  box-shadow: none !important;
}

.btn-sair,
.module-menu-logout {
  background: #e5e7eb !important;
  color: var(--portal-text) !important;
}

html[data-portal-theme="dark"] .btn-sair,
html[data-portal-theme="dark"] .module-menu-logout {
  background: #4a4f56 !important;
  border: 1px solid var(--portal-border) !important;
  color: var(--portal-text) !important;
}

.portal-back-button {
  width: 38px !important;
  min-width: 38px !important;
  height: 38px !important;
  min-height: 38px !important;
  flex: 0 0 38px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0 !important;
  padding: 0 !important;
  border: 1px solid transparent !important;
  border-radius: var(--portal-radius-sm) !important;
  background: #e5e7eb !important;
  color: var(--portal-text) !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  box-shadow: none !important;
}

.portal-back-button:hover,
.btn-sair:hover,
.module-menu-logout:hover {
  background: #d1d5db !important;
  border-color: transparent !important;
  color: var(--portal-text) !important;
  transform: translateY(-1px);
}

html[data-portal-theme="dark"] .portal-back-button {
  background: #4a4f56 !important;
  border-color: var(--portal-border) !important;
  color: var(--portal-text) !important;
}

html[data-portal-theme="dark"] .portal-back-button:hover,
html[data-portal-theme="dark"] .btn-sair:hover,
html[data-portal-theme="dark"] .module-menu-logout:hover {
  background: #565c64 !important;
  border-color: var(--portal-border-strong) !important;
  color: var(--portal-text) !important;
}

.portal-back-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  margin: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.portal-back-label {
  display: none !important;
}

.portal-theme-toggle {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--portal-border);
  border-radius: var(--portal-radius-sm);
  background: var(--portal-surface);
  color: var(--portal-text);
  font: inherit;
  font-size: 0;
  font-weight: 800;
  cursor: pointer;
  box-shadow: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.portal-theme-toggle:hover {
  border-color: var(--portal-border-strong);
  background: var(--portal-surface-soft);
  transform: translateY(-1px);
}

.portal-theme-toggle svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.portal-theme-toggle-label {
  display: none;
}

.portal-theme-floating {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 80;
  box-shadow: var(--portal-shadow);
}

.btn-secondary:hover,
.btn-outline:hover,
.module-menu-back:not(.portal-back-button):hover,
.topbar-back:not(.portal-back-button):hover,
.header-button:hover,
.secondary-btn:hover {
  background: var(--portal-blue-soft) !important;
  border-color: rgba(26, 72, 137, 0.32) !important;
  color: var(--portal-blue-dark) !important;
}

.portal-back-button.portal-back-button,
.btn.portal-back-button,
.btn.ghost.portal-back-button,
.btn-light.portal-back-button,
.btn-voltar.portal-back-button,
.module-menu-back.portal-back-button,
.topbar-back.portal-back-button,
.pc-back.portal-back-button {
  width: 38px !important;
  min-width: 38px !important;
  max-width: 38px !important;
  height: 38px !important;
  min-height: 38px !important;
  flex: 0 0 38px !important;
  gap: 0 !important;
  padding: 0 !important;
  background: #e5e7eb !important;
  border-color: transparent !important;
  color: var(--portal-text) !important;
  box-shadow: none !important;
}

.portal-back-button.portal-back-button:hover,
.btn.portal-back-button:hover,
.btn.ghost.portal-back-button:hover,
.btn-light.portal-back-button:hover,
.btn-voltar.portal-back-button:hover,
.module-menu-back.portal-back-button:hover,
.topbar-back.portal-back-button:hover,
.pc-back.portal-back-button:hover {
  background: #d1d5db !important;
  border-color: transparent !important;
  color: var(--portal-text) !important;
}

html[data-portal-theme="dark"] .portal-back-button.portal-back-button,
html[data-portal-theme="dark"] .btn.portal-back-button,
html[data-portal-theme="dark"] .btn.ghost.portal-back-button,
html[data-portal-theme="dark"] .btn-light.portal-back-button,
html[data-portal-theme="dark"] .btn-voltar.portal-back-button,
html[data-portal-theme="dark"] .module-menu-back.portal-back-button,
html[data-portal-theme="dark"] .topbar-back.portal-back-button,
html[data-portal-theme="dark"] .pc-back.portal-back-button {
  background: #2a2b33 !important;
  border-color: var(--portal-border) !important;
  color: var(--portal-text) !important;
}

html[data-portal-theme="dark"] .portal-back-button.portal-back-button:hover,
html[data-portal-theme="dark"] .btn.portal-back-button:hover,
html[data-portal-theme="dark"] .btn.ghost.portal-back-button:hover,
html[data-portal-theme="dark"] .btn-light.portal-back-button:hover,
html[data-portal-theme="dark"] .btn-voltar.portal-back-button:hover,
html[data-portal-theme="dark"] .module-menu-back.portal-back-button:hover,
html[data-portal-theme="dark"] .topbar-back.portal-back-button:hover,
html[data-portal-theme="dark"] .pc-back.portal-back-button:hover {
  background: #353942 !important;
  border-color: var(--portal-border-strong) !important;
  color: var(--portal-text) !important;
}

input,
select,
textarea,
.multi-select-button,
.month-selector,
.field,
.input {
  border-color: var(--portal-border) !important;
  border-radius: var(--portal-radius-sm) !important;
  background: var(--portal-surface) !important;
  color: var(--portal-text) !important;
}

input::placeholder,
textarea::placeholder {
  color: var(--portal-muted);
}

input:focus,
select:focus,
textarea:focus,
.multi-select-button:focus {
  border-color: var(--portal-blue) !important;
  box-shadow: var(--portal-focus) !important;
  outline: none !important;
}

label,
th,
.field-hint,
.small,
small {
  letter-spacing: 0;
}

table {
  background: var(--portal-surface);
}

th {
  color: var(--portal-muted) !important;
  letter-spacing: 0 !important;
}

tbody tr:hover {
  background: rgba(26, 72, 137, 0.04) !important;
}

html[data-portal-theme="dark"] .topbar,
html[data-portal-theme="dark"] .module-menu-topbar,
html[data-portal-theme="dark"] .dash-header,
html[data-portal-theme="dark"] header.despesas-topbar,
html[data-portal-theme="dark"] .chat-topbar,
html[data-portal-theme="dark"] .pc-header,
html[data-portal-theme="dark"] .pc-topbar,
html[data-portal-theme="dark"] .eq-header,
html[data-portal-theme="dark"] .dre-topbar {
  background: #17171a !important;
  border-bottom-color: var(--portal-border) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04), 0 10px 20px rgba(0, 0, 0, 0.18) !important;
}

html[data-portal-theme="dark"] .module-menu-hero,
html[data-portal-theme="dark"] .hero,
html[data-portal-theme="dark"] .card,
html[data-portal-theme="dark"] .panel,
html[data-portal-theme="dark"] .metric,
html[data-portal-theme="dark"] .metric-card,
html[data-portal-theme="dark"] .kpi-card,
html[data-portal-theme="dark"] .summary-card,
html[data-portal-theme="dark"] .pc-card,
html[data-portal-theme="dark"] .eq-panel,
html[data-portal-theme="dark"] .dre-panel,
html[data-portal-theme="dark"] .dre-toolbar,
html[data-portal-theme="dark"] .dre-warning,
html[data-portal-theme="dark"] .module-menu-card,
html[data-portal-theme="dark"] .bucket-card,
html[data-portal-theme="dark"] .ranking-item,
html[data-portal-theme="dark"] .table-card,
html[data-portal-theme="dark"] .filters-card,
html[data-portal-theme="dark"] .filtro-card,
html[data-portal-theme="dark"] .filter-card,
html[data-portal-theme="dark"] .filters,
html[data-portal-theme="dark"] .kanban-col,
html[data-portal-theme="dark"] .kanban-card,
html[data-portal-theme="dark"] .col-header {
  background: var(--portal-surface) !important;
  border-color: var(--portal-border) !important;
}

html[data-portal-theme="dark"] input,
html[data-portal-theme="dark"] select,
html[data-portal-theme="dark"] textarea,
html[data-portal-theme="dark"] .input,
html[data-portal-theme="dark"] .field,
html[data-portal-theme="dark"] .multi-select-button,
html[data-portal-theme="dark"] .month-selector {
  background: #17171a !important;
  border-color: var(--portal-border) !important;
  color: var(--portal-text) !important;
}

html[data-portal-theme="dark"] input::placeholder,
html[data-portal-theme="dark"] textarea::placeholder {
  color: #777b84 !important;
}

html[data-portal-theme="dark"] .btn-secondary,
html[data-portal-theme="dark"] .btn-outline,
html[data-portal-theme="dark"] .btn.ghost,
html[data-portal-theme="dark"] .btn-light,
html[data-portal-theme="dark"] .btn-sair,
html[data-portal-theme="dark"] .portal-theme-toggle {
  background: #2a2b33 !important;
  border-color: var(--portal-border) !important;
  color: var(--portal-text) !important;
  box-shadow: none !important;
}

html[data-portal-theme="dark"] .btn-secondary:hover,
html[data-portal-theme="dark"] .btn-outline:hover,
html[data-portal-theme="dark"] .btn.ghost:hover,
html[data-portal-theme="dark"] .btn-light:hover,
html[data-portal-theme="dark"] .btn-sair:hover,
html[data-portal-theme="dark"] .portal-theme-toggle:hover {
  background: #353942 !important;
  border-color: var(--portal-border-strong) !important;
}

html[data-portal-theme="dark"] .module-tabs,
html[data-portal-theme="dark"] .portal-projects-nav,
html[data-portal-theme="dark"] .tabs,
html[data-portal-theme="dark"] .segmented {
  background: var(--portal-surface-soft) !important;
  border-color: var(--portal-border) !important;
}

html[data-portal-theme="dark"] .module-tabs a.active,
html[data-portal-theme="dark"] .module-tabs a[aria-current="page"],
html[data-portal-theme="dark"] .portal-projects-nav-item.active,
html[data-portal-theme="dark"] .tab.active,
html[data-portal-theme="dark"] .tab.is-active,
html[data-portal-theme="dark"] .segmented .active {
  background: #353942 !important;
  color: var(--portal-text) !important;
  box-shadow: none !important;
}

html[data-portal-theme="dark"] .kanban-col,
html[data-portal-theme="dark"] .kanban-card {
  border-color: var(--portal-border) !important;
}

html[data-portal-theme="dark"] .kanban-list::-webkit-scrollbar-thumb {
  background-color: var(--portal-border-strong);
}

html[data-portal-theme="dark"] table,
html[data-portal-theme="dark"] thead,
html[data-portal-theme="dark"] th {
  background: var(--portal-surface-soft) !important;
}

html[data-portal-theme="dark"] td,
html[data-portal-theme="dark"] th {
  border-color: var(--portal-border) !important;
}

html[data-portal-theme="dark"] tbody tr:hover {
  background: rgba(147, 153, 176, 0.1) !important;
}

html[data-portal-theme="dark"] .banner,
html[data-portal-theme="dark"] .status-card.loading,
html[data-portal-theme="dark"] .cobranca-loading,
html[data-portal-theme="dark"] .template-loading {
  background: #242a34 !important;
  border-color: #3d4654 !important;
  color: var(--portal-text) !important;
}

html[data-portal-theme="dark"] .assistant-bubble,
html[data-portal-theme="dark"] .inad-assistant-bubble {
  background: #2a2d35 !important;
  border-color: #3b414d !important;
  color: var(--portal-text) !important;
}

html[data-portal-theme="dark"] .status-card.error,
html[data-portal-theme="dark"] .cobranca-error,
html[data-portal-theme="dark"] .template-error {
  background: #35272b !important;
  border-color: #70404a !important;
  color: #fecdd3 !important;
}

html[data-portal-theme="dark"] .status-card.warning {
  background: #332d20 !important;
  border-color: #6f5520 !important;
  color: #fde68a !important;
}

html[data-portal-theme="dark"] .status-recebido,
html[data-portal-theme="dark"] .status-informar_supervisor,
html[data-portal-theme="dark"] .status-aguardando_confirmacao {
  background: #252b36 !important;
  border-color: #3d4654 !important;
}

html[data-portal-theme="dark"] .status-concluido {
  background: #21342b !important;
  border-color: #3f6d55 !important;
}

html[data-portal-theme="dark"] .status-reprovado,
html[data-portal-theme="dark"] .talent-reprovado {
  background: #35272b !important;
  border-color: #70404a !important;
}

html[data-portal-theme="dark"] .badge-success,
html[data-portal-theme="dark"] .pill.ok,
html[data-portal-theme="dark"] .status-ok {
  background: rgba(74, 222, 128, 0.14) !important;
}

html[data-portal-theme="dark"] .badge-warning,
html[data-portal-theme="dark"] .pill.warn,
html[data-portal-theme="dark"] .status-warning {
  background: rgba(251, 191, 36, 0.15) !important;
}

html[data-portal-theme="dark"] .badge-danger,
html[data-portal-theme="dark"] .pill.danger,
html[data-portal-theme="dark"] .status-error,
html[data-portal-theme="dark"] .status-critico {
  background: rgba(248, 113, 113, 0.15) !important;
}

.badge,
.pill,
.status-pill,
.tag,
.chip,
.selected-chip {
  border-radius: 999px !important;
  letter-spacing: 0;
}

.badge-success,
.pill.ok,
.status-ok {
  background: rgba(23, 128, 77, 0.12) !important;
  color: var(--portal-success) !important;
}

.badge-warning,
.pill.warn,
.status-warning {
  background: rgba(199, 119, 0, 0.14) !important;
  color: var(--portal-warning) !important;
}

.badge-danger,
.pill.danger,
.status-error,
.status-critico {
  background: rgba(180, 35, 24, 0.12) !important;
  color: var(--portal-danger) !important;
}

.sidebar {
  background: var(--portal-surface) !important;
  border-color: var(--portal-border) !important;
}

html[data-portal-projects-shell="standard"] body {
  background: var(--portal-bg) !important;
}

html[data-portal-module-shell="standard"] body {
  background: var(--portal-bg) !important;
}

html[data-portal-module-shell="standard"] .portal-standard-page {
  width: min(1280px, calc(100% - 48px)) !important;
  max-width: 1280px !important;
  margin: 0 auto !important;
  padding: 0 0 56px !important;
}

html[data-portal-module-shell="standard"] .portal-standard-module-header {
  width: 100vw !important;
  max-width: none !important;
  min-height: 70px !important;
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 12px 14px !important;
  margin: 0 calc(50% - 50vw) 24px !important;
  padding: 12px max(14px, calc((100vw - 1280px) / 2)) !important;
  background: var(--portal-surface) !important;
  border: 0 !important;
  border-bottom: 1px solid var(--portal-border) !important;
  border-radius: 0 !important;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06) !important;
}

html[data-portal-module-shell="standard"] .portal-standard-module-back {
  grid-column: 1;
  grid-row: 1;
}

html[data-portal-module-shell="standard"] .portal-standard-module-title {
  grid-column: 2;
  min-width: 0;
}

html[data-portal-module-shell="standard"] .portal-standard-module-title > .portal-back-button {
  display: none !important;
}

html[data-portal-module-shell="standard"] .portal-standard-module-header h1 {
  margin: 0 0 4px !important;
  font-size: clamp(22px, 2.2vw, 28px) !important;
  line-height: 1.12 !important;
  letter-spacing: 0 !important;
  color: var(--portal-text) !important;
}

html[data-portal-module-shell="standard"] .portal-standard-module-header .subtitle {
  max-width: 760px;
  color: var(--portal-muted) !important;
}

html[data-portal-module-shell="standard"] .portal-standard-module-header .subtitle:first-child,
html[data-portal-module-shell="standard"] .portal-standard-module-header .eyebrow {
  margin-bottom: 2px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  color: var(--portal-muted) !important;
  text-transform: uppercase;
  letter-spacing: 0 !important;
}

html[data-portal-module-shell="standard"] .portal-standard-module-header .header-actions {
  grid-column: 3;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  min-width: 0;
}

html[data-portal-module-shell="standard"] .portal-standard-module-header .header-actions > .portal-back-button {
  display: none !important;
}

html[data-portal-module-shell="standard"] .portal-standard-module-header .module-tabs {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  padding: 4px !important;
  border: 1px solid var(--portal-border) !important;
  border-radius: var(--portal-radius) !important;
  background: var(--portal-blue-soft) !important;
  max-width: min(100%, 560px);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

html[data-portal-module-shell="standard"] .portal-standard-module-header .module-tabs a {
  min-height: 34px;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 12px !important;
  border-radius: var(--portal-radius-sm) !important;
  color: var(--portal-blue) !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  box-shadow: none !important;
}

html[data-portal-module-shell="standard"] .portal-standard-module-header .module-tabs a.active {
  background: var(--portal-blue) !important;
  color: #ffffff !important;
  box-shadow: 0 6px 14px rgba(26, 72, 137, 0.18) !important;
}

.portal-fallback-topbar {
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px max(14px, calc((100vw - 1280px) / 2));
  background: var(--portal-surface);
  color: var(--portal-text);
  border-bottom: 1px solid var(--portal-border);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
}

.portal-fallback-title {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.portal-fallback-title strong {
  color: var(--portal-text);
  font-size: 20px;
  line-height: 1.15;
}

.portal-fallback-title span {
  color: var(--portal-muted);
  font-size: 12px;
}

.portal-enhanced-header-with-back {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

.portal-enhanced-header-with-back > .portal-injected-header-back,
.portal-fallback-topbar > .portal-fallback-back {
  flex: 0 0 38px !important;
}

.portal-enhanced-header-with-back > :not(.portal-injected-header-back) {
  min-width: 0;
}

@media print {
  .portal-fallback-topbar,
  .portal-injected-header-back,
  .portal-fallback-back {
    display: none !important;
  }
}

html[data-portal-projects-shell="standard"] .app {
  display: block !important;
  min-height: 100vh !important;
  height: auto !important;
  overflow: visible !important;
  background: var(--portal-bg) !important;
}

html[data-portal-projects-shell="standard"] .app > .sidebar {
  display: none !important;
}

html[data-portal-projects-shell="standard"] .main {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 100vh !important;
  overflow: visible !important;
  background: var(--portal-bg) !important;
}

html[data-portal-projects-shell="standard"] .main > .topbar {
  position: sticky !important;
  top: 0;
  z-index: 40;
  width: 100% !important;
  min-height: 70px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 14px !important;
  padding: 12px 32px !important;
  background: var(--portal-surface) !important;
  border-bottom: 1px solid var(--portal-border) !important;
}

html[data-portal-projects-shell="standard"] .topbar-left {
  min-width: min(340px, 36vw);
  flex: 1 1 360px !important;
}

html[data-portal-projects-shell="standard"] .topbar-left h1,
html[data-portal-projects-shell="standard"] .title-wrapper h1 {
  font-size: clamp(22px, 2vw, 28px) !important;
  line-height: 1.1 !important;
  margin: 0 0 4px !important;
}

html[data-portal-projects-shell="standard"] .breadcrumbs,
html[data-portal-projects-shell="standard"] .meta-row {
  color: var(--portal-muted) !important;
}

html[data-portal-projects-shell="standard"] .portal-projects-nav {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--portal-border);
  border-radius: var(--portal-radius);
  background: var(--portal-blue-soft);
  flex: 0 1 auto;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

html[data-portal-projects-shell="standard"] .portal-projects-nav-item {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border-radius: var(--portal-radius-sm);
  color: var(--portal-muted);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

html[data-portal-projects-shell="standard"] .portal-projects-nav-item .portal-svg-icon {
  width: 16px;
  height: 16px;
}

html[data-portal-projects-shell="standard"] .portal-projects-nav-item.is-active {
  background: var(--portal-surface);
  color: var(--portal-blue);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

html[data-portal-projects-shell="standard"] .topbar-right,
html[data-portal-projects-shell="standard"] .topbar-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  flex: 0 0 auto !important;
  flex-wrap: wrap !important;
  margin-left: auto !important;
}

html[data-portal-projects-shell="standard"] .content,
html[data-portal-projects-shell="standard"] .content-area {
  width: min(1320px, calc(100% - 48px)) !important;
  max-width: 1320px !important;
  min-width: 0 !important;
  margin: 24px auto 48px !important;
  padding: 0 !important;
  display: grid !important;
  gap: 18px !important;
  overflow: visible !important;
}

html[data-portal-projects-shell="standard"] .grid2 {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important;
  gap: 18px !important;
  margin-bottom: 0 !important;
}

html[data-portal-projects-shell="standard"] .panel,
html[data-portal-projects-shell="standard"] .dossie-card,
html[data-portal-projects-shell="standard"] .info-card,
html[data-portal-projects-shell="standard"] .task-card,
html[data-portal-projects-shell="standard"] .kanban-container {
  background: var(--portal-surface) !important;
  border: 1px solid var(--portal-border) !important;
  border-radius: var(--portal-radius) !important;
  box-shadow: var(--portal-shadow) !important;
  padding: 18px !important;
}

html[data-portal-projects-shell="standard"] .panel-head,
html[data-portal-projects-shell="standard"] .panel-header,
html[data-portal-projects-shell="standard"] .card-header,
html[data-portal-projects-shell="standard"] .kanban-header,
html[data-portal-projects-shell="standard"] .dossie-header {
  min-width: 0;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 14px !important;
  flex-wrap: wrap !important;
  margin-bottom: 14px !important;
  padding: 0 0 12px !important;
  border-bottom: 1px solid var(--portal-border) !important;
}

html[data-portal-projects-shell="standard"] .panel-head > div:last-child,
html[data-portal-projects-shell="standard"] .filters-bar,
html[data-portal-projects-shell="standard"] .kanban-actions,
html[data-portal-projects-shell="standard"] .actions,
html[data-portal-projects-shell="standard"] .filter-actions {
  min-width: 0;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}

html[data-portal-projects-shell="standard"] .panel-head .field,
html[data-portal-projects-shell="standard"] .filters-bar .input-group,
html[data-portal-projects-shell="standard"] .filters-bar select,
html[data-portal-projects-shell="standard"] .filters-bar input {
  min-width: 150px !important;
  width: auto !important;
  flex: 1 1 160px !important;
}

html[data-portal-projects-shell="standard"] .tabs-container {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

html[data-portal-projects-shell="standard"] .tabs {
  width: 100%;
  max-width: 100%;
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  padding: 4px !important;
  border: 1px solid var(--portal-border) !important;
  border-radius: var(--portal-radius) !important;
  background: var(--portal-blue-soft) !important;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

html[data-portal-projects-shell="standard"] .tab {
  flex: 0 0 auto !important;
  min-height: 34px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  padding: 0 12px !important;
  border: 0 !important;
  border-radius: var(--portal-radius-sm) !important;
  color: var(--portal-muted) !important;
  background: transparent !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
  box-shadow: none !important;
}

html[data-portal-projects-shell="standard"] .tab.active,
html[data-portal-projects-shell="standard"] .tab.is-active {
  background: var(--portal-surface) !important;
  color: var(--portal-blue) !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08) !important;
}

html[data-portal-projects-shell="standard"] .triagem-dashboard-grid,
html[data-portal-projects-shell="standard"] .dossie-grid,
html[data-portal-projects-shell="standard"] .discussion-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1.65fr) minmax(320px, 0.85fr) !important;
  gap: 18px !important;
}

html[data-portal-projects-shell="standard"] .dossie-card.full-width {
  grid-column: 1 / -1 !important;
}

html[data-portal-projects-shell="standard"] .table-wrap {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
}

html[data-portal-projects-shell="standard"] .table,
html[data-portal-projects-shell="standard"] table {
  width: 100% !important;
  min-width: 780px !important;
}

html[data-portal-projects-shell="standard"] .modal,
html[data-portal-projects-shell="standard"] .modal-backdrop {
  z-index: 90 !important;
}

html[data-portal-projects-shell="standard"] .modal-box,
html[data-portal-projects-shell="standard"] .modal-content,
html[data-portal-projects-shell="standard"] .pc-modal__panel {
  width: min(760px, calc(100vw - 32px)) !important;
  max-height: calc(100dvh - 32px) !important;
  overflow: auto !important;
  border-radius: var(--portal-radius) !important;
  background: var(--portal-surface) !important;
  color: var(--portal-text) !important;
}

.sidebar a.active,
.nav-link.active,
.tab-btn.active,
.detail-tab.active,
.module-tabs a.active {
  background: var(--portal-blue) !important;
  color: #ffffff !important;
  border-color: var(--portal-blue) !important;
}

html[data-portal-theme="dark"] .sidebar a.active,
html[data-portal-theme="dark"] .nav-link.active,
html[data-portal-theme="dark"] .tab-btn.active,
html[data-portal-theme="dark"] .detail-tab.active,
html[data-portal-theme="dark"] .module-tabs a.active,
html[data-portal-theme="dark"][data-portal-module-shell="standard"] .portal-standard-module-header .module-tabs a.active,
html[data-portal-theme="dark"][data-portal-projects-shell="standard"] .portal-projects-nav-item.is-active,
html[data-portal-theme="dark"][data-portal-projects-shell="standard"] .tab.active,
html[data-portal-theme="dark"][data-portal-projects-shell="standard"] .tab.is-active {
  background: #353942 !important;
  color: var(--portal-text) !important;
  border-color: var(--portal-border-strong) !important;
  box-shadow: none !important;
}

html[data-portal-theme="dark"][data-portal-projects-shell="standard"] .portal-projects-nav,
html[data-portal-theme="dark"][data-portal-projects-shell="standard"] .tabs,
html[data-portal-theme="dark"] .module-tabs {
  background: var(--portal-surface-soft) !important;
}

html[data-portal-theme="dark"][data-portal-projects-shell="standard"] .panel-head,
html[data-portal-theme="dark"][data-portal-projects-shell="standard"] .tag-picker-list,
html[data-portal-theme="dark"][data-portal-projects-shell="standard"] .tag-picker-selected {
  background: var(--portal-surface) !important;
  color: var(--portal-text) !important;
}

.module-tabs {
  background: var(--portal-blue-soft) !important;
}

html[data-portal-theme="dark"] aside,
html[data-portal-theme="dark"] body > header:not(.portal-appbar),
html[data-portal-theme="dark"] form,
html[data-portal-theme="dark"] .lab-view,
html[data-portal-theme="dark"] .assistant-dynamic-dashboard,
html[data-portal-theme="dark"] .chat-layout,
html[data-portal-theme="dark"] .status-box,
html[data-portal-theme="dark"] .export-alert,
html[data-portal-theme="dark"] .dash-status,
html[data-portal-theme="dark"] .dropzone,
html[data-portal-theme="dark"] .dz-file,
html[data-portal-theme="dark"] .captcha-box,
html[data-portal-theme="dark"] .selecionado,
html[data-portal-theme="dark"] .classic-section,
html[data-portal-theme="dark"] .comparison-toggle,
html[data-portal-theme="dark"] .chart-mode-toggle,
html[data-portal-theme="dark"] .chart,
html[data-portal-theme="dark"] .heatmap,
html[data-portal-theme="dark"] .cobranca-header,
html[data-portal-theme="dark"] .cobranca-status-pill,
html[data-portal-theme="dark"] .cobranca-refresh-panel,
html[data-portal-theme="dark"] .cobranca-toolbar,
html[data-portal-theme="dark"] .cobranca-board article,
html[data-portal-theme="dark"] .export-hero,
html[data-portal-theme="dark"] .export-card,
html[data-portal-theme="dark"] .export-link,
html[data-portal-theme="dark"] .gcard,
html[data-portal-theme="dark"] .meta-calendar,
html[data-portal-theme="dark"] .selector,
html[data-portal-theme="dark"] .fluxo-preview,
html[data-portal-theme="dark"] .filters-bar,
html[data-portal-theme="dark"] .view-tabs,
html[data-portal-theme="dark"] .calendar-main-head,
html[data-portal-theme="dark"] .calendar-board,
html[data-portal-theme="dark"] .template-status-pill,
html[data-portal-theme="dark"] .proposal-page,
html[data-portal-theme="dark"] .calc-toggle,
html[data-portal-theme="dark"] .auto__btn,
html[data-portal-theme="dark"] .total-item,
html[data-portal-theme="dark"] .perm-item,
html[data-portal-theme="dark"] .talent-metric,
html[data-portal-theme="dark"] .hero-panel,
html[data-portal-theme="dark"] .jobs-section,
html[data-portal-theme="dark"] .empty-state,
html[data-portal-theme="dark"] .mini,
html[data-portal-theme="dark"] .mini-card,
html[data-portal-theme="dark"] .pill,
html[data-portal-theme="dark"] .result-grid > div,
html[data-portal-theme="dark"] .talent-bank-cta,
html[data-portal-theme="dark"] .search-box,
html[data-portal-theme="dark"] .composer,
html[data-portal-theme="dark"] .prompt-btn,
html[data-portal-theme="dark"] .tag-picker-list,
html[data-portal-theme="dark"] .tag-picker-selected {
  background: var(--portal-surface) !important;
  color: var(--portal-text) !important;
  border-color: var(--portal-border) !important;
}

html[data-portal-theme="dark"] .comparison-toggle,
html[data-portal-theme="dark"] .chart-mode-toggle,
html[data-portal-theme="dark"] .calc-toggle,
html[data-portal-theme="dark"] .view-tabs,
html[data-portal-theme="dark"] .line-mode-btn.active,
html[data-portal-theme="dark"] .tab-btn.active,
html[data-portal-theme="dark"] .tab-btn.is-active {
  background: var(--portal-surface-soft) !important;
  color: var(--portal-text) !important;
  border-color: var(--portal-border) !important;
}

html[data-portal-theme="dark"] .adash-widget,
html[data-portal-theme="dark"] .adash-metric,
html[data-portal-theme="dark"] .adash-chart,
html[data-portal-theme="dark"] .adash-table-widget,
html[data-portal-theme="dark"] .adash-table-wrap,
html[data-portal-theme="dark"] .adash-empty-state,
html[data-portal-theme="dark"] .adash-kpi-item,
html[data-portal-theme="dark"] .cobranca-summary article,
html[data-portal-theme="dark"] .cobranca-column,
html[data-portal-theme="dark"] .cobranca-column-header,
html[data-portal-theme="dark"] .cobranca-column-description,
html[data-portal-theme="dark"] .cobranca-card,
html[data-portal-theme="dark"] .cobranca-card-metrics div,
html[data-portal-theme="dark"] .cobranca-detail-kv,
html[data-portal-theme="dark"] .cobranca-empty,
html[data-portal-theme="dark"] .cobranca-load-more {
  background: var(--portal-surface) !important;
  color: var(--portal-text) !important;
  border-color: var(--portal-border) !important;
  box-shadow: var(--portal-shadow) !important;
}

html[data-portal-theme="dark"] .adash-table th,
html[data-portal-theme="dark"] .adash-table th.adash-sticky-col,
html[data-portal-theme="dark"] .adash-table .adash-sticky-col,
html[data-portal-theme="dark"] .adash-table tr:hover td,
html[data-portal-theme="dark"] .cobranca-column-list,
html[data-portal-theme="dark"] .cobranca-card-agreement {
  background: var(--portal-surface-soft) !important;
  color: var(--portal-text) !important;
  border-color: var(--portal-border) !important;
}

html[data-portal-theme="dark"] .adash-widget-title,
html[data-portal-theme="dark"] .adash-metric-value,
html[data-portal-theme="dark"] .adash-kpi-item strong,
html[data-portal-theme="dark"] .adash-table td,
html[data-portal-theme="dark"] .cobranca-summary strong,
html[data-portal-theme="dark"] .cobranca-refresh-panel strong,
html[data-portal-theme="dark"] .cobranca-column h2,
html[data-portal-theme="dark"] .cobranca-column-total,
html[data-portal-theme="dark"] .cobranca-card h3,
html[data-portal-theme="dark"] .cobranca-card-metrics strong,
html[data-portal-theme="dark"] .cobranca-card-agreement strong,
html[data-portal-theme="dark"] .cobranca-card-meta,
html[data-portal-theme="dark"] .cobranca-card-titles ul {
  color: var(--portal-text) !important;
}

html[data-portal-theme="dark"] .adash-widget-label,
html[data-portal-theme="dark"] .adash-metric small,
html[data-portal-theme="dark"] .adash-kpi-item span,
html[data-portal-theme="dark"] .adash-list-item span,
html[data-portal-theme="dark"] .cobranca-summary span,
html[data-portal-theme="dark"] .cobranca-refresh-panel span[data-refresh-times],
html[data-portal-theme="dark"] .cobranca-column-description,
html[data-portal-theme="dark"] .cobranca-card-metrics span,
html[data-portal-theme="dark"] .cobranca-card-meta span,
html[data-portal-theme="dark"] .cobranca-card-titles span,
html[data-portal-theme="dark"] .cobranca-detail-kv span,
html[data-portal-theme="dark"] .cobranca-card-top > span,
html[data-portal-theme="dark"] .cobranca-card-agreement span,
html[data-portal-theme="dark"] .cobranca-card-agreement small {
  color: var(--portal-muted) !important;
}

html[data-portal-theme="dark"] button:not(.portal-back-button):not(.portal-theme-toggle):not(.btn-primary):not(.primary-btn):not(.primary):not(.cobranca-btn-primary),
html[data-portal-theme="dark"] .icon-btn,
html[data-portal-theme="dark"] .ghost-btn {
  background: #2a2b33 !important;
  border-color: var(--portal-border) !important;
  color: var(--portal-text) !important;
}

html[data-portal-theme="dark"] button:not(.portal-back-button):not(.portal-theme-toggle):not(.btn-primary):not(.primary-btn):not(.primary):not(.cobranca-btn-primary):hover,
html[data-portal-theme="dark"] .icon-btn:hover,
html[data-portal-theme="dark"] .ghost-btn:hover {
  background: #353942 !important;
  border-color: var(--portal-border-strong) !important;
}

html[data-portal-theme="dark"] .login-form button[type="submit"] {
  background: var(--portal-blue) !important;
  border-color: var(--portal-blue) !important;
  color: #ffffff !important;
  box-shadow: 0 8px 18px rgba(39, 129, 246, 0.18) !important;
}

.portal-local-back-hidden.portal-local-back-hidden {
  display: none !important;
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

.portal-page-heading.portal-page-heading {
  position: relative !important;
  width: min(var(--portal-content-max), calc(100% - (var(--portal-content-gutter) * 2))) !important;
  max-width: var(--portal-content-max) !important;
  margin: 24px auto 16px !important;
  padding: 20px 0 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.portal-page-heading.portal-page-heading.pc-topbar {
  min-height: auto !important;
  align-items: flex-end !important;
  gap: 16px !important;
}

.portal-page-heading.portal-page-heading.topbar,
.portal-page-heading.portal-page-heading.dash-header,
.portal-page-heading.portal-page-heading.pc-header,
.portal-page-heading.portal-page-heading.eq-header,
.portal-page-heading.portal-page-heading.dre-topbar,
.portal-page-heading.portal-page-heading.chat-topbar,
.portal-page-heading.portal-page-heading.despesas-topbar {
  min-height: auto !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: flex-end !important;
  justify-content: space-between !important;
  gap: 14px !important;
}

.portal-page-heading.portal-page-heading .pc-topbar__right,
.portal-page-heading.portal-page-heading .header-acoes,
.portal-page-heading.portal-page-heading .admin-actions,
.portal-page-heading.portal-page-heading .topbar-right,
.portal-page-heading.portal-page-heading .topbar-actions,
.portal-page-heading.portal-page-heading .header-actions {
  margin-left: auto;
}

body.portal-unified-header-shell:not(.viewer-body) > main,
body.portal-unified-header-shell:not(.viewer-body) > .page,
body.portal-unified-header-shell:not(.viewer-body) > .page-container,
body.portal-unified-header-shell:not(.viewer-body) > .module-menu-page,
body.portal-unified-header-shell:not(.viewer-body) > .container,
body.portal-unified-header-shell:not(.viewer-body) > .content,
body.portal-unified-header-shell:not(.viewer-body) > .content-area,
body.portal-unified-header-shell:not(.viewer-body) > .app-main,
body.portal-unified-header-shell:not(.viewer-body) > .main,
body.portal-unified-header-shell:not(.viewer-body) > .admin-page,
body.portal-unified-header-shell:not(.viewer-body) > .public-page,
body.portal-unified-header-shell:not(.viewer-body) > .cobranca-page,
body.portal-unified-header-shell:not(.viewer-body) > .export-page,
body.portal-unified-header-shell:not(.viewer-body) > .pc-container,
body.portal-unified-header-shell:not(.viewer-body) > .eq-main,
body.portal-unified-header-shell:not(.viewer-body) > .dre-shell,
body.portal-unified-header-shell:not(.viewer-body) main > .page-container,
body.portal-unified-header-shell:not(.viewer-body) main > .module-menu-page,
body.portal-unified-header-shell:not(.viewer-body) main > .container,
body.portal-unified-header-shell:not(.viewer-body) main > .content,
body.portal-unified-header-shell:not(.viewer-body) main > .content-area,
body.portal-unified-header-shell:not(.viewer-body) main > .app-main,
body.portal-unified-header-shell:not(.viewer-body) main > .main,
body.portal-unified-header-shell:not(.viewer-body) main > .admin-page,
body.portal-unified-header-shell:not(.viewer-body) main > .public-page,
body.portal-unified-header-shell:not(.viewer-body) main > .cobranca-page,
body.portal-unified-header-shell:not(.viewer-body) main > .export-page,
body.portal-unified-header-shell:not(.viewer-body) main > .pc-container,
body.portal-unified-header-shell:not(.viewer-body) main > .eq-main,
body.portal-unified-header-shell:not(.viewer-body) main > .dre-shell {
  width: min(var(--portal-content-max), calc(100% - (var(--portal-content-gutter) * 2))) !important;
  max-width: var(--portal-content-max) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

body.portal-unified-header-shell:not(.viewer-body) .page-container > .portal-page-heading,
body.portal-unified-header-shell:not(.viewer-body) .module-menu-page > .portal-page-heading,
body.portal-unified-header-shell:not(.viewer-body) .container > .portal-page-heading,
body.portal-unified-header-shell:not(.viewer-body) .content > .portal-page-heading,
body.portal-unified-header-shell:not(.viewer-body) .content-area > .portal-page-heading,
body.portal-unified-header-shell:not(.viewer-body) .app-main > .portal-page-heading,
body.portal-unified-header-shell:not(.viewer-body) .main > .portal-page-heading,
body.portal-unified-header-shell:not(.viewer-body) .pc-container > .portal-page-heading,
body.portal-unified-header-shell:not(.viewer-body) .eq-main > .portal-page-heading,
body.portal-unified-header-shell:not(.viewer-body) .dre-shell > .portal-page-heading {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

html[data-portal-projects-shell="standard"] .app > .main {
  width: min(var(--portal-content-max), calc(100% - (var(--portal-content-gutter) * 2))) !important;
  max-width: var(--portal-content-max) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

html[data-portal-projects-shell="standard"] .main > .topbar.portal-page-heading {
  position: relative !important;
  width: 100% !important;
  min-height: auto !important;
  padding: 20px 0 16px !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

body.portal-unified-header-shell .module-menu-hero {
  position: relative !important;
  margin: 24px 0 16px !important;
  padding: 20px 0 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

body.portal-unified-header-shell .module-menu-hero::before {
  content: "" !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 44px !important;
  height: 4px !important;
  border-radius: 999px !important;
  background: var(--portal-yellow) !important;
}

body.portal-unified-header-shell .module-menu-hero .module-menu-eyebrow,
body.portal-unified-header-shell .module-menu-hero p {
  display: none !important;
}

body.portal-unified-header-shell .module-menu-hero h1 {
  margin: 0 !important;
  color: var(--portal-text) !important;
  font-size: 24px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  letter-spacing: 0 !important;
}

body.portal-rh-index .page > .hero {
  display: none !important;
}

body.portal-rh-index .page {
  padding-top: 0 !important;
  padding-right: 0 !important;
  padding-left: 0 !important;
}

body.portal-despesas-index header.despesas-topbar {
  display: none !important;
}

body.portal-despesas-index .main-content {
  width: min(var(--portal-content-max), calc(100% - (var(--portal-content-gutter) * 2))) !important;
  max-width: var(--portal-content-max) !important;
  margin: 24px auto 0 !important;
  padding: 0 !important;
}

body.portal-despesas-index .main-content > h2 {
  position: relative !important;
  margin: 0 0 24px !important;
  padding: 20px 0 0 !important;
  color: var(--portal-text) !important;
  font-size: 24px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  letter-spacing: 0 !important;
  text-align: left !important;
}

body.portal-despesas-index .main-content > h2::before {
  content: "" !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 44px !important;
  height: 4px !important;
  border-radius: 999px !important;
  background: var(--portal-yellow) !important;
}

body.portal-despesas-index .filter-bar {
  justify-content: flex-start !important;
  align-items: flex-end !important;
  gap: 12px !important;
  margin: 0 0 20px !important;
}

body.portal-despesas-index .filter-bar input,
body.portal-despesas-index .filter-bar select {
  width: min(220px, 100%) !important;
  min-width: 0 !important;
  height: 42px !important;
  padding: 0 12px !important;
  border-radius: var(--portal-radius-sm) !important;
}

body.portal-despesas-index .btn-nova-viagem {
  margin: 0 0 24px !important;
}

@media (max-width: 760px) {
  body.portal-despesas-index .filter-bar {
    align-items: stretch !important;
  }

  body.portal-despesas-index .filter-bar input,
  body.portal-despesas-index .filter-bar select,
  body.portal-despesas-index .btn-nova-viagem {
    width: 100% !important;
    max-width: none !important;
  }
}

body.portal-despesas-index footer {
  display: none !important;
}

body.portal-unified-header-shell:not(.portal-legacy-page-heading) .portal-page-heading.portal-page-heading h1,
body.portal-unified-header-shell:not(.portal-legacy-page-heading) .portal-page-heading.portal-page-heading .topbar-left h1,
body.portal-unified-header-shell:not(.portal-legacy-page-heading) .portal-page-heading.portal-page-heading .pc-title h1,
body.portal-unified-header-shell:not(.portal-legacy-page-heading) .portal-page-heading.portal-page-heading .pc-topbar__left h1,
body.portal-unified-header-shell:not(.portal-legacy-page-heading) .portal-page-heading.portal-page-heading .brand h1,
body.portal-unified-header-shell:not(.portal-legacy-page-heading) .module-menu-hero h1 {
  margin: 0 !important;
  color: var(--portal-text) !important;
  font-size: 24px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  letter-spacing: 0 !important;
}

body.portal-unified-header-shell:not(.portal-legacy-page-heading) .portal-page-heading.portal-page-heading p,
body.portal-unified-header-shell:not(.portal-legacy-page-heading) .portal-page-heading.portal-page-heading .lead,
body.portal-unified-header-shell:not(.portal-legacy-page-heading) .portal-page-heading.portal-page-heading .subtitulo,
body.portal-unified-header-shell:not(.portal-legacy-page-heading) .portal-page-heading.portal-page-heading .muted,
body.portal-unified-header-shell:not(.portal-legacy-page-heading) .portal-page-heading.portal-page-heading .topbar-title span,
body.portal-unified-header-shell:not(.portal-legacy-page-heading) .portal-page-heading.portal-page-heading .eyebrow,
body.portal-unified-header-shell:not(.portal-legacy-page-heading) .portal-page-heading.portal-page-heading .module-menu-eyebrow,
body.portal-unified-header-shell:not(.portal-legacy-page-heading) .portal-page-heading.portal-page-heading .pc-title__kicker {
  display: none !important;
}

.table-responsive,
.table-wrap,
.tabela-wrapper,
.eq-table-wrap,
.dre-table-wrap,
.data-table-wrap,
.kanban-board,
.cobranca-board,
.board-scroll,
.chart-card,
.grid-scroll {
  max-width: 100%;
}

.table-wrap,
.tabela-wrapper,
.eq-table-wrap,
.dre-table-wrap,
.table-responsive,
.data-table-wrap,
.grid-scroll {
  overflow-x: auto !important;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
}

.table-wrap table,
.tabela-wrapper table,
.eq-table-wrap table,
.dre-table-wrap table,
.table-responsive table,
.data-table-wrap table {
  width: 100%;
}

.grid > *,
.grid2 > *,
.grid-2 > *,
.grid-3 > *,
.upload-grid > *,
.eq-main > *,
.dre-grid > *,
.content > *,
.content-area > *,
.module-grid > *,
.module-menu-grid > *,
.cards-grid > * {
  min-width: 0 !important;
}

.card,
.panel,
.pc-card,
.eq-panel,
.dre-panel,
.table-wrap,
.tabela-wrapper,
.eq-table-wrap,
.dre-table-wrap {
  min-width: 0 !important;
  max-width: 100% !important;
}

.dre-table,
.eq-table-wrap table,
#tabela-contratos,
#tabela-eventos,
#tabela-cidades,
#tabela {
  min-width: 720px;
}

.pc-container,
.eq-main,
.dre-shell {
  width: min(1320px, calc(100% - 48px)) !important;
  max-width: 1320px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.pc-card,
.eq-panel,
.dre-panel,
.dre-toolbar {
  padding: 18px !important;
}

.calendar-main.card,
.col-8.panel.card,
.col-4.panel.card,
.toolbar.card,
.obs-card.card,
.grid-wrap.card,
.totais.card {
  padding: 18px !important;
}

.pc-card__head,
.eq-panel__head,
.dre-panel-head,
.card-header-row {
  min-width: 0;
  gap: 12px !important;
  flex-wrap: wrap !important;
}

.pc-topbar__right,
.eq-filters,
.dre-filters,
.brand-actions,
.acoes,
.actions-row,
.pag-acoes {
  min-width: 0;
  flex-wrap: wrap !important;
  gap: 8px !important;
}

.dre-filters button,
.dre-actions a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid var(--portal-border);
  border-radius: var(--portal-radius-sm);
  background: var(--portal-blue);
  color: #ffffff;
  font-weight: 800;
  text-decoration: none;
}

.topbar.portal-enhanced-header-with-back {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar.portal-enhanced-header-with-back .topbar-title {
  flex: 1 1 260px;
  min-width: 0;
}

.topbar.portal-enhanced-header-with-back .spacer {
  flex: 1 1 auto;
  min-width: 8px;
}

.topbar.portal-enhanced-header-with-back > .btn:not(.portal-back-button),
.topbar.portal-enhanced-header-with-back > button.btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.proposal-page {
  max-width: min(1120px, calc(100vw - 32px)) !important;
  box-sizing: border-box;
  overflow: hidden;
}

.proposal-header {
  min-width: 0;
  flex-wrap: wrap;
}

.proposal-header > div:first-child {
  flex: 1 1 320px;
  min-width: 0;
}

.proposal-actions {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.proposal-actions button {
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
}

.proposal-table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

header.despesas-topbar ~ footer {
  display: none !important;
}

.portal-filter-toggle {
  display: none;
  width: 100%;
  min-height: 42px;
  margin: 0 0 10px;
  padding: 0 14px;
  border: 1px solid var(--portal-border);
  border-radius: var(--portal-radius-sm);
  background: var(--portal-surface);
  color: var(--portal-blue);
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.portal-filter-toggle::after {
  content: attr(data-state);
  float: right;
  color: var(--portal-muted);
  font-weight: 700;
}

@media (max-width: 920px) {
  .topbar.portal-enhanced-header-with-back {
    flex-wrap: wrap !important;
    align-items: center !important;
  }

  .topbar.portal-enhanced-header-with-back .spacer {
    display: none !important;
  }

  .topbar.portal-enhanced-header-with-back .topbar-title {
    flex: 1 1 calc(100% - 58px) !important;
  }

  .topbar.portal-enhanced-header-with-back > .btn:not(.portal-back-button),
  .topbar.portal-enhanced-header-with-back > button.btn {
    flex: 0 1 auto !important;
  }

  .talent-board {
    width: 100%;
    max-width: 100%;
    overflow-x: auto !important;
    overflow-y: visible;
    padding-bottom: 8px;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }

  .talent-board .talent-column {
    min-width: 260px;
  }

  .cards-grid,
  .module-menu-grid,
  .home-cards,
  .kpis,
  .summary-grid,
  .metrics,
  .info-grid {
    grid-template-columns: 1fr !important;
  }

  .grid-2,
  .grid-3,
  .filters-grid,
  .filtro-grid,
  .form-grid,
  .toolbar,
  .header-top {
    grid-template-columns: 1fr !important;
  }

  .btn.ghost,
  .btn-secondary,
  .btn-outline {
    height: auto !important;
    min-height: 38px !important;
    white-space: normal !important;
    line-height: 1.2 !important;
    overflow-wrap: anywhere !important;
  }
}

@media (max-width: 760px) {
  :root {
    --portal-appbar-x: 16px;
    --portal-content-gutter: 16px;
  }

  body {
    overflow-x: hidden;
  }

  .portal-appbar {
    min-height: 58px !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    padding: 10px var(--portal-appbar-x) !important;
  }

  .portal-appbar-logo,
  .portal-appbar-logo-img {
    width: 64px;
    height: 34px;
    flex-basis: 64px;
    font-size: 18px;
  }

  .portal-appbar-title strong {
    font-size: 20px;
    font-weight: 700;
  }

  .portal-appbar-title span {
    display: none;
  }

  .portal-appbar .module-menu-actions,
  .portal-appbar .topbar-right,
  .portal-appbar .topbar-actions,
  .portal-appbar .header-actions,
  .portal-appbar .header-acoes,
  .portal-appbar .pc-topbar__right,
  .portal-appbar .dre-actions,
  .portal-appbar .despesas-topbar-actions {
    width: auto;
    flex: 0 0 auto;
    margin-left: auto;
  }

  .portal-appbar.module-menu-topbar {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    align-items: center !important;
  }

  .portal-appbar.module-menu-topbar > div:first-of-type {
    width: auto !important;
    min-width: 0 !important;
    display: inline-flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 8px !important;
  }

  .portal-appbar .module-menu-user {
    display: none !important;
  }

  .portal-appbar .module-menu-actions {
    width: auto !important;
    flex-wrap: nowrap !important;
    justify-content: flex-end !important;
  }

  .portal-appbar .module-menu-back,
  .portal-appbar .module-menu-logout,
  .portal-appbar .topbar-back,
  .portal-appbar .btn,
  .portal-appbar button {
    width: auto !important;
    min-width: 38px !important;
    max-width: none !important;
    flex: 0 0 auto !important;
  }

  .portal-page-heading {
    width: min(var(--portal-content-max), calc(100% - (var(--portal-content-gutter) * 2))) !important;
    max-width: var(--portal-content-max) !important;
    margin: 16px auto 12px !important;
  }

  .portal-page-heading h1 {
    font-size: 23px !important;
  }

  .portal-page-heading.portal-page-heading.topbar,
  .portal-page-heading.portal-page-heading.dash-header,
  .portal-page-heading.portal-page-heading.pc-header,
  .portal-page-heading.portal-page-heading.eq-header,
  .portal-page-heading.portal-page-heading.dre-topbar,
  .portal-page-heading.portal-page-heading.chat-topbar,
  .portal-page-heading.portal-page-heading.despesas-topbar {
    align-items: flex-start !important;
  }

  .portal-page-heading.portal-page-heading .topbar-right,
  .portal-page-heading.portal-page-heading .topbar-actions,
  .portal-page-heading.portal-page-heading .header-actions,
  .portal-page-heading.portal-page-heading .admin-actions,
  .portal-page-heading.portal-page-heading .pc-topbar__right,
  .portal-page-heading.portal-page-heading .dre-actions {
    width: 100% !important;
    margin-left: 0 !important;
    justify-content: flex-start !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .topbar,
.module-menu-topbar,
.dash-header,
header.despesas-topbar,
.chat-topbar,
.pc-header,
.pc-topbar,
.eq-header,
.dre-topbar {
    min-height: 56px;
    padding: 10px 14px !important;
    gap: 10px !important;
    align-items: center !important;
    flex-wrap: wrap !important;
  }

  .topbar-left,
  .topbar-right,
  .module-menu-topbar > div,
  .module-menu-actions,
.dash-header .brand,
.dash-header .header-actions,
.pc-header .header-content,
.pc-topbar__left,
.pc-topbar__right,
.eq-header,
.dre-brand,
.dre-actions,
.despesas-topbar-left,
.header-buttons {
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  .topbar-logo,
  .module-menu-brand,
  .topbar-title strong,
  .brand h1 {
    font-size: 17px !important;
  }

  .topbar-user,
  .module-menu-user {
    max-width: 100%;
    font-size: 12px !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .page,
  .page-container,
  .module-menu-page,
  .container,
  main {
    width: auto !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  .module-menu-hero,
  .hero,
  .card,
  .panel,
  .filters-card,
  .filtro-card,
  .filter-card,
  .filters {
    padding: 16px !important;
  }

  .page-header h1,
  .module-menu-hero h1,
  .hero h1,
  .hero h2,
  .module-header h1 {
    font-size: clamp(22px, 7vw, 28px) !important;
    line-height: 1.15 !important;
  }

  .card.home-card,
  .module-menu-card {
    min-height: 88px !important;
    align-items: center !important;
    padding: 16px !important;
  }

  .card-icon,
  .module-menu-icon {
    width: 42px !important;
    height: 42px !important;
    flex: 0 0 42px !important;
  }

  .card-text h3,
  .module-menu-card-text strong {
    font-size: 16px !important;
    line-height: 1.25 !important;
  }

  .card-text p,
  .module-menu-card-text small {
    font-size: 12px !important;
    line-height: 1.35 !important;
    overflow-wrap: anywhere;
  }

  .portal-filter-toggle {
    display: block;
  }

  .portal-theme-toggle {
    flex: 0 0 auto;
  }

  .portal-back-button.portal-back-button,
  .btn.portal-back-button,
  .btn.ghost.portal-back-button,
  .btn-light.portal-back-button,
  .btn-voltar.portal-back-button,
  .module-menu-back.portal-back-button,
  .topbar-back.portal-back-button,
  .pc-back.portal-back-button {
    width: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    height: 42px !important;
    min-height: 42px !important;
    flex: 0 0 42px !important;
  }

  .pc-header {
    height: auto !important;
  }

  .pc-header .header-content {
    flex-wrap: nowrap !important;
  }

  .pc-header h1 {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .pc-header .pc-back,
  .pc-header .portal-theme-toggle {
    flex: 0 0 auto;
  }

  .portal-filter-panel {
    overflow: hidden;
    transition: max-height 0.18s ease, opacity 0.18s ease, padding 0.18s ease, margin 0.18s ease;
  }

  .portal-filter-panel.is-collapsed {
    max-height: 0 !important;
    opacity: 0;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    border-width: 0 !important;
  }

  .filters-actions,
  .filtro-footer,
  .header-actions,
  .module-menu-actions,
  .table-actions,
  .ranking-actions,
  .toolbar-actions,
  .job-actions {
    width: 100%;
    justify-content: stretch !important;
  }

  .filters-actions > *,
  .filtro-footer button,
  .module-menu-actions > *,
  .table-actions > *,
  .job-actions > * {
    flex: 1 1 140px;
  }

  .module-header .header-actions {
    align-items: stretch !important;
    gap: 8px !important;
  }

  .module-header .header-actions > .btn-secondary,
  .module-header .header-actions > .btn-primary,
  .module-header .header-actions > .btn-outline {
    width: auto;
    min-height: 38px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .module-header .module-tabs {
    width: 100%;
    min-height: 44px;
    display: flex !important;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .module-header .module-tabs a {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .table-responsive,
  .data-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table {
    min-width: 680px;
  }

  .kanban-board,
  .cobranca-board,
  .board-scroll {
    display: grid !important;
    grid-template-columns: none !important;
    grid-auto-flow: column;
    grid-auto-columns: minmax(280px, 84vw);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }

  .kanban-board > *,
  .cobranca-board > *,
  .board-scroll > * {
    min-width: min(84vw, 320px) !important;
  }

  html[data-portal-projects-shell="standard"] .main > .topbar {
    position: sticky !important;
    min-height: 58px !important;
    padding: 10px 14px !important;
    align-items: center !important;
  }

  html[data-portal-projects-shell="standard"] .topbar-left {
    min-width: 0;
    flex: 1 1 220px !important;
  }

  html[data-portal-projects-shell="standard"] .topbar-left h1,
  html[data-portal-projects-shell="standard"] .title-wrapper h1 {
    font-size: 18px !important;
  }

  html[data-portal-projects-shell="standard"] .portal-projects-nav {
    order: 3;
    width: 100%;
    flex: 1 0 100%;
  }

  html[data-portal-projects-shell="standard"] .portal-projects-nav-item {
    flex: 1 0 auto;
    justify-content: center;
  }

  html[data-portal-projects-shell="standard"] .topbar-right,
  html[data-portal-projects-shell="standard"] .topbar-actions {
    flex: 0 0 auto !important;
  }

  html[data-portal-projects-shell="standard"] .content,
  html[data-portal-projects-shell="standard"] .content-area {
    width: auto !important;
    max-width: 100% !important;
    margin: 16px auto 32px !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  html[data-portal-projects-shell="standard"] .panel,
  html[data-portal-projects-shell="standard"] .dossie-card,
  html[data-portal-projects-shell="standard"] .info-card,
  html[data-portal-projects-shell="standard"] .task-card,
  html[data-portal-projects-shell="standard"] .kanban-container {
    padding: 16px !important;
  }

  html[data-portal-projects-shell="standard"] .triagem-dashboard-grid,
  html[data-portal-projects-shell="standard"] .dossie-grid,
  html[data-portal-projects-shell="standard"] .discussion-layout {
    grid-template-columns: 1fr !important;
  }

  html[data-portal-projects-shell="standard"] .panel-head > div:last-child,
  html[data-portal-projects-shell="standard"] .filters-bar,
  html[data-portal-projects-shell="standard"] .kanban-actions,
  html[data-portal-projects-shell="standard"] .filter-actions {
    width: 100%;
    justify-content: stretch !important;
  }

  html[data-portal-projects-shell="standard"] .panel-head .field,
  html[data-portal-projects-shell="standard"] .filters-bar .input-group,
  html[data-portal-projects-shell="standard"] .filters-bar select,
  html[data-portal-projects-shell="standard"] .filters-bar input,
  html[data-portal-projects-shell="standard"] .kanban-actions .btn,
  html[data-portal-projects-shell="standard"] .filter-actions .btn {
    width: 100% !important;
    flex: 1 1 100% !important;
  }

  html[data-portal-module-shell="standard"] .portal-standard-page {
    width: auto !important;
    max-width: 100% !important;
    padding: 0 14px 36px !important;
  }

  html[data-portal-module-shell="standard"] .portal-standard-module-header {
    grid-template-columns: auto minmax(0, 1fr) !important;
    min-height: 58px !important;
    margin-left: -14px !important;
    margin-right: -14px !important;
    margin-bottom: 16px !important;
    padding: 10px 14px !important;
    align-items: center !important;
  }

  html[data-portal-module-shell="standard"] .portal-standard-module-header h1 {
    font-size: 20px !important;
  }

  html[data-portal-module-shell="standard"] .portal-standard-module-header .subtitle {
    font-size: 12px !important;
    line-height: 1.35 !important;
  }

  html[data-portal-module-shell="standard"] .portal-standard-module-header .header-actions {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: flex-start !important;
  }

  html[data-portal-module-shell="standard"] .portal-standard-module-header .module-tabs {
    width: 100%;
    max-width: 100%;
  }

  html[data-portal-module-shell="standard"] .portal-standard-module-header .module-tabs a {
    flex: 0 0 auto;
  }

  .portal-fallback-topbar {
    min-height: 56px;
    padding: 10px 14px;
  }

  .portal-fallback-title strong {
    font-size: 17px;
  }

  .proposal-page {
    width: auto !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 16px !important;
    border-radius: 0 !important;
  }

  .proposal-header {
    gap: 12px !important;
  }

  .proposal-header > div:first-child,
  .proposal-actions {
    flex: 1 1 100% !important;
    width: 100% !important;
  }

  .proposal-actions {
    justify-content: stretch !important;
  }

  .proposal-actions button {
    flex: 1 1 130px !important;
    min-width: 0 !important;
  }

  .proposal-meta {
    grid-template-columns: 1fr !important;
  }

  .proposal-total {
    align-items: flex-start !important;
    flex-direction: column !important;
    gap: 4px !important;
  }

  .pc-topbar__right,
  .eq-header,
  .dre-topbar,
  .dre-brand,
  .dre-actions {
    width: 100%;
  }

  .pc-card__head,
  .eq-panel__head,
  .dre-panel-head,
  .card-header-row {
    align-items: flex-start !important;
  }

  .eq-filters,
  .dre-filters,
  .brand-actions,
  .actions-row,
  .acoes {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .topbar-logo-img {
    width: 52px !important;
    height: auto !important;
  }

  .portal-theme-toggle {
    width: 38px;
    padding: 0;
  }

  .portal-theme-toggle-label {
    display: none;
  }

  .pc-header .pc-back:not(.portal-back-button) {
    width: 38px !important;
    min-width: 38px !important;
    padding: 0 !important;
    font-size: 0 !important;
  }

  .pc-header .pc-back:not(.portal-back-button)::before {
    content: "←";
    font-size: 18px;
    line-height: 1;
  }

  .btn,
  .button,
  .btn-primary,
  .btn-secondary,
  .btn-outline,
  .module-menu-back,
  .module-menu-logout,
  .topbar-back {
    width: 100%;
  }

  .portal-appbar .btn,
  .portal-appbar .button,
  .portal-appbar .btn-primary,
  .portal-appbar .btn-secondary,
  .portal-appbar .btn-outline,
  .portal-appbar .module-menu-back,
  .portal-appbar .module-menu-logout,
  .portal-appbar .topbar-back,
  .portal-appbar button {
    width: auto !important;
    min-width: 38px !important;
    max-width: none !important;
    flex: 0 0 auto !important;
  }

  .card.home-card,
  .module-menu-card {
    gap: 12px !important;
  }
}
