:root {
  --pessoal-superficie: #f4f6fa;
  --pessoal-superficie-elevada: #ffffff;
  --pessoal-superficie-hover: #edf1f7;
  --pessoal-superficie-ativa: #e6ebfb;
  --pessoal-borda: #d8dee8;
  --pessoal-destaque: #3f5fc7;
  --pessoal-destaque-forte: #2946a6;
  --pessoal-texto: #172033;
  --pessoal-texto-suave: #536176;
  --pessoal-icone: #3b4658;
  --pessoal-grad: linear-gradient(180deg, var(--pessoal-superficie-elevada) 0%, var(--pessoal-superficie) 22%);
  --pessoal-grad2: var(--pessoal-superficie);
  --pessoal-ciano: var(--pessoal-destaque);
  --pessoal-branco: var(--pessoal-texto);
  --pessoal-cinza: #8190a6;
  --pessoal-fonte: 'IBM Plex Sans', 'Segoe UI Variable Text', 'Segoe UI', Arial, sans-serif;
  --pessoal-menu-fonte: 'IBM Plex Sans', 'Segoe UI Variable Text', 'Segoe UI', Arial, sans-serif;
  --pessoal-util-fonte: 'IBM Plex Mono', Consolas, monospace;
  --pessoal-menu-inset: 4px;
  --pessoal-menu-largura: 272px;
  --pessoal-menu-espaco: 286px;
  --pessoal-menu-curva: 36px;
  --pessoal-sidebar-toggle: 36px;
  --tc-scroll-track: #eef1f5;
  --tc-scroll-thumb: #aeb8c7;
  --tc-scroll-thumb-hover: #8390a3;
  --tc-scroll-thumb-active: #69778b;
  --tc-scroll-grid-track: #ffffff;
  --tc-scroll-grid-thumb: #dedee4;
  --tc-scroll-grid-thumb-hover: #c7c8d0;
  --tc-scroll-grid-thumb-active: #b3b5c0;
  --tc-z-header: 1500;
  --tc-z-backdrop: 1650;
  --tc-z-drawer: 1700;
  --tc-z-toast: 2200;
  --tc-z-task-panel: 4050;
  --tc-z-task-dropdown: 4300;
}

html,
body,
body * {
  scrollbar-width: thin;
  scrollbar-color: var(--tc-scroll-thumb) var(--tc-scroll-track);
}

/* Superficies arredondadas podem preservar a scrollbar nativa do navegador. */
.tc-native-scrollbar {
  scrollbar-width: auto;
  scrollbar-color: auto;
}

/* Excecoes de geometria; a baseline visual continua sendo global. */
.tc-scrollbar-surface-compact,
.task-form-configured {
  scrollbar-width: thin;
  scrollbar-color: var(--tc-scroll-thumb) transparent;
}

.tc-scrollbar-data-grid {
  scrollbar-width: auto;
  scrollbar-color: var(--tc-scroll-grid-thumb) var(--tc-scroll-grid-track);
}

/*
 * Chrome/Edge atuais priorizam scrollbar-width e scrollbar-color sobre os
 * pseudo-elementos WebKit. O reset precisa vencer declaracoes locais para que
 * toda superficie rolavel use a baseline personalizada. As excecoes abaixo
 * preservam somente as regioes cuja barra ja era intencionalmente oculta.
 */
@supports selector(::-webkit-scrollbar) {
  html,
  body,
  body * {
    scrollbar-width: auto !important;
    scrollbar-color: auto !important;
  }

  #form-nova:not(.task-form-configured),
  .box-detalhes,
  .task-page .task-table-headers {
    scrollbar-width: none !important;
  }

  #form-nova:not(.task-form-configured)::-webkit-scrollbar,
  .box-detalhes::-webkit-scrollbar {
    display: none;
  }

  /* Mantem a faixa compacta nativa: fina, tonal e com setas do sistema. */
  .tc-scrollbar-surface-compact,
  .task-form-configured {
    scrollbar-width: thin !important;
    scrollbar-color: var(--tc-scroll-thumb) transparent !important;
  }
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
body *:not(.tc-native-scrollbar):not(.tc-scrollbar-surface-compact):not(.task-form-configured):not(.tc-scrollbar-data-grid)::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track,
body *:not(.tc-native-scrollbar):not(.tc-scrollbar-surface-compact):not(.task-form-configured):not(.tc-scrollbar-data-grid)::-webkit-scrollbar-track {
  background: var(--tc-scroll-track);
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb,
body *:not(.tc-native-scrollbar):not(.tc-scrollbar-surface-compact):not(.task-form-configured):not(.tc-scrollbar-data-grid)::-webkit-scrollbar-thumb {
  background: var(--tc-scroll-thumb);
  border: 0;
  border-radius: 0;
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover,
body *:not(.tc-native-scrollbar):not(.tc-scrollbar-surface-compact):not(.task-form-configured):not(.tc-scrollbar-data-grid)::-webkit-scrollbar-thumb:hover {
  background: var(--tc-scroll-thumb-hover);
}

html::-webkit-scrollbar-thumb:active,
body::-webkit-scrollbar-thumb:active,
body *:not(.tc-native-scrollbar):not(.tc-scrollbar-surface-compact):not(.task-form-configured):not(.tc-scrollbar-data-grid)::-webkit-scrollbar-thumb:active {
  background: var(--tc-scroll-thumb-active);
}

html::-webkit-scrollbar-button,
body::-webkit-scrollbar-button,
body *:not(.tc-native-scrollbar):not(.tc-scrollbar-surface-compact):not(.task-form-configured):not(.tc-scrollbar-data-grid)::-webkit-scrollbar-button {
  -webkit-appearance: none;
  display: none;
  width: 0;
  height: 0;
  background: transparent;
}

html::-webkit-scrollbar-corner,
body::-webkit-scrollbar-corner,
body *:not(.tc-native-scrollbar):not(.tc-scrollbar-surface-compact):not(.task-form-configured):not(.tc-scrollbar-data-grid)::-webkit-scrollbar-corner {
  background: var(--tc-scroll-track);
}

.tc-scrollbar-data-grid::-webkit-scrollbar {
  width: 14px;
  height: 14px;
  background: var(--tc-scroll-grid-track);
}

.tc-scrollbar-data-grid::-webkit-scrollbar-track,
.tc-scrollbar-data-grid::-webkit-scrollbar-corner {
  background: var(--tc-scroll-grid-track);
}

.tc-scrollbar-data-grid::-webkit-scrollbar-thumb {
  background: var(--tc-scroll-grid-thumb);
  border: 0;
  border-radius: 0;
}

.tc-scrollbar-data-grid::-webkit-scrollbar-thumb:hover {
  background: var(--tc-scroll-grid-thumb-hover);
}

.tc-scrollbar-data-grid::-webkit-scrollbar-thumb:active {
  background: var(--tc-scroll-grid-thumb-active);
}

.tc-scrollbar-data-grid::-webkit-scrollbar-button {
  -webkit-appearance: none;
  display: none;
  width: 0;
  height: 0;
  background: transparent;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#app-content {
  width: 100%;
  min-width: 0;
  flex: 1 1 auto;
  box-sizing: border-box;
  transition: width .28s cubic-bezier(.4, 0, .2, 1), margin-left .28s cubic-bezier(.4, 0, .2, 1);
}

/* ===== NAV SUPERIOR ===== */
.nav-pessoal {
  top: 0;
  position: sticky;
  height: 50px;
  background: var(--pessoal-grad2);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(52, 79, 121, 0.08);
  z-index: 1500;
}

.nav-pessoal #logo-pessoal {
  width: 150px;
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  cursor: default;
}

.nav-pessoal #logo-pessoal[role="button"] {
  cursor: pointer;
}

.nav-pessoal h1 {
  color: var(--pessoal-texto);
  font-size: 26px;
  font-family: var(--pessoal-fonte);
  font-weight: 600;
  letter-spacing: -0.3px;
  margin: 0;
}

.nav-pessoal .nav-pessoal-subtitulo {
  position: absolute;
  left: 170px;
  bottom: 16px;
  color: var(--pessoal-texto-suave);
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  font-size: 12px;
}

@media only screen and (max-width: 430px) {
  .nav-pessoal h1 {
    display: none
  }
}

#btn-menu-pessoal {
  position: absolute;
  right: 0;
  top: 0;
  border: none;
  background: none;
  height: 50px;
  padding: 0 1rem;
  border-left: 1px solid transparent;
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease;
}

#btn-menu-pessoal:hover,
#btn-menu-pessoal:focus-visible {
  background: var(--pessoal-superficie-hover);
  border-left-color: var(--pessoal-borda);
  outline: none;
}

#imgMenu-pessoal {
  width: 30px;
  filter: brightness(0) saturate(100%);
  opacity: .7;
  transition: .3s ease;
}

#imgMenu-pessoal.rotate {
  transform: rotate(180deg);
}

/* ===== MENU DE TABELAS/QUADROS (ESQUERDA) ===== */
#menu-pessoal {
  position: fixed;
  left: var(--pessoal-menu-inset);
  top: 50px;
  width: min(var(--pessoal-menu-largura), calc(100vw - 16px));
  height: calc(100vh - 50px);
  box-sizing: border-box;
  padding: 8px 0 14px;
  overflow: hidden;
  visibility: hidden;
  background: linear-gradient(90deg, #f3f7fb 57%, var(--pessoal-superficie) 100%);
  border: 0;
  border-radius: 16px 16px 0 0;
  box-shadow:
    -15px 0 0 var(--pessoal-superficie),
    8px 0 24px rgba(52, 79, 121, .07);
  opacity: 0;
  transform: translateX(calc(-100% - 16px));
  transform-origin: top left;
  transition:
    transform .28s cubic-bezier(.4, 0, .2, 1),
    opacity .2s ease,
    visibility 0s linear .28s;
  z-index: 1600;
  font-family: var(--pessoal-menu-fonte);
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  white-space: nowrap;
  pointer-events: none;
  overscroll-behavior: contain;
}

#menu-pessoal.active,
html.pessoal-sidebar-aberta #menu-pessoal {
  z-index: 1700;
  visibility: visible;
  overflow-y: auto;
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
  transition-delay: 0s;
  scrollbar-width: thin;
  scrollbar-color: rgba(73, 101, 143, .34) transparent;
}

#menu-pessoal::-webkit-scrollbar {
  width: 5px;
}

#menu-pessoal::-webkit-scrollbar-thumb {
  background: rgba(73, 101, 143, .34);
  border-radius: 0;
}

#menu-pessoal .menu-pessoal-controles {
  display: flex;
  min-height: 40px;
  box-sizing: border-box;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 12px 8px;
  padding: 0 0 4px 8px;
  list-style: none;
}

#menu-pessoal .menu-pessoal-titulo {
  overflow: hidden;
  color: var(--pessoal-texto-suave);
  font-family: var(--pessoal-menu-fonte);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .035em;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#btn-recolher-menu-pessoal {
  display: inline-grid;
  width: var(--pessoal-sidebar-toggle);
  height: var(--pessoal-sidebar-toggle);
  flex: 0 0 var(--pessoal-sidebar-toggle);
  place-items: center;
  padding: 0;
  color: var(--pessoal-texto-suave);
  background: var(--pessoal-superficie-elevada);
  border: 1px solid var(--pessoal-borda);
  border-radius: 8px;
  box-shadow: 0 2px 7px rgba(23, 32, 51, .07);
  cursor: pointer;
  transition:
    background-color .2s ease,
    border-color .2s ease,
    box-shadow .2s ease,
    color .2s ease,
    transform .2s ease;
}

#btn-recolher-menu-pessoal i {
  font-size: 11px;
  transition: transform .2s ease;
}

#btn-recolher-menu-pessoal:hover,
#btn-recolher-menu-pessoal:focus-visible {
  color: var(--pessoal-destaque-forte);
  background: var(--pessoal-superficie-hover);
  border-color: color-mix(in srgb, var(--pessoal-destaque) 36%, var(--pessoal-borda));
  box-shadow: 0 4px 11px rgba(23, 32, 51, .1);
  outline: none;
  transform: translateX(-1px);
}

#btn-recolher-menu-pessoal:hover i,
#btn-recolher-menu-pessoal:focus-visible i {
  transform: translateX(-1px);
}

#btn-recolher-menu-pessoal:active {
  box-shadow: 0 1px 4px rgba(23, 32, 51, .08);
  transform: scale(.96);
}

/* ===== LINKS ===== */
#menu-pessoal a {
  display: flex;
  position: relative;
  align-items: center;
  flex-wrap: nowrap;
  gap: 9px;
  min-height: 40px;
  box-sizing: border-box;
  margin: 2px 10px;
  color: var(--pessoal-icone);
  font-family: var(--pessoal-menu-fonte);
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -.1px;
  padding: 8px 11px;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 11px;
  transition:
    background-color .2s ease,
    border-color .2s ease,
    box-shadow .2s ease,
    transform .2s ease;
}



#menu-pessoal a:hover,
#menu-pessoal a:focus-visible {
  background: var(--pessoal-superficie-hover);
  color: var(--pessoal-icone);
  border-color: transparent;
  box-shadow: none;
  transform: none;
  outline: none;
}

#menu-pessoal a:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(73, 101, 143, .24);
}

#menu-pessoal a.disabled {
  color: var(--pessoal-cinza);
  pointer-events: none;
  opacity: 0.72;
}

#menu-pessoal a.disabled i {
  color: var(--pessoal-cinza);
}

#menu-pessoal a i {
  width: 20px;
  flex: 0 0 20px;
  color: var(--pessoal-icone);
  font-size: 17px;
  text-align: center;
  opacity: 0.9;
}

#menu-pessoal .ativo > a,
#menu-pessoal a.ativo {
  background: var(--pessoal-superficie-ativa);
  color: var(--pessoal-icone);
  border-color: transparent;
  box-shadow: none;
}

/* ===== SEÇÕES ===== */
#menu-pessoal .titulo-secao {
  font-weight: 400;
  font-size: 11.5px;
  line-height: 1.25;
  color: var(--pessoal-icone);
  margin: 8px 14px 4px;
  padding: 9px 2px 8px;
  text-transform: uppercase;
  letter-spacing: .55px;
  border-bottom: 1px solid var(--pessoal-borda);
}

#menu-pessoal .titulo-secao > i {
  color: var(--pessoal-icone);
}

#menu-pessoal hr {
  margin: 8px 16px;
  border: 0;
  border-top: 1px solid var(--pessoal-borda);
}

#tabelas-pessoal {
  margin-left: 0;
  transition: .2s ease;
}

#tabelas-pessoal a {
  margin-left: 14px;
}

/* ===== MENU DE DEPARTAMENTOS (DIREITA) ===== */
#menu-departamentos-pessoal {
  position: fixed;
  right: 0;
  top: 50px;
  height: calc(100vh - 50px);
  width: 260px;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: hidden;
  overflow-y: auto;
  background:
    radial-gradient(circle at 100% 0, rgba(73, 101, 143, 0.1), transparent 36%),
    var(--pessoal-grad);
  border-left: 1px solid var(--pessoal-borda);
  box-shadow: -12px 0 30px rgba(52, 79, 121, 0.12);
  transform: translateX(100%);
  visibility: hidden;
  pointer-events: none;
  transition:
    transform .28s cubic-bezier(.4, 0, .2, 1),
    visibility 0s linear .28s;
  will-change: transform;
  z-index: 1600;
  scrollbar-width: thin;
  scrollbar-color: rgba(73, 101, 143, 0.42) transparent;
}

#menu-departamentos-pessoal.active {
  transform: translateX(0);
  z-index: 1700;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

#menu-departamentos-pessoal::-webkit-scrollbar {
  width: 5px;
}

#menu-departamentos-pessoal::-webkit-scrollbar-thumb {
  background: rgba(73, 101, 143, 0.42);
  border-radius: 0;
}

#menu-departamentos-pessoal li {
  margin: 0;
  padding: 0;
}

#menu-departamentos-pessoal .departamentos-cabecalho {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 14px 8px;
  padding: 18px 4px 14px;
  color: #000;
  border-bottom: 1px solid var(--pessoal-borda);
  font-family: var(--pessoal-fonte);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .25px;
  text-transform: uppercase;
}

#menu-departamentos-pessoal .departamentos-cabecalho > i {
  color: var(--pessoal-icone);
  font-size: 17px;
}

#menu-departamentos-pessoal .departamentos-cabecalho span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

#menu-departamentos-pessoal .departamentos-cabecalho small {
  color: #000;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .15px;
  text-transform: none;
}

#menu-departamentos-pessoal a {
  position: relative;
  display: flex;
  box-sizing: border-box;
  align-items: center;
  gap: 11px;
  min-height: 46px;
  margin: 2px 10px;
  color: #000;
  font-family: var(--pessoal-fonte);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 10px;
  transition:
    color .2s ease,
    background-color .2s ease,
    border-color .2s ease,
    transform .2s ease;
}

#menu-departamentos-pessoal a:hover,
#menu-departamentos-pessoal a:focus-visible {
  background: var(--pessoal-superficie-hover);
  color: #000;
  border-color: var(--pessoal-borda);
  transform: translateX(-3px);
  outline: none;
}

#menu-departamentos-pessoal .departamento-icone {
  display: grid;
  box-sizing: border-box;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  color: var(--pessoal-icone);
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid var(--pessoal-borda);
  border-radius: 9px;
  transition: color .2s ease, background-color .2s ease;
}

#menu-departamentos-pessoal a:hover .departamento-icone,
#menu-departamentos-pessoal a:focus-visible .departamento-icone {
  color: var(--pessoal-icone);
  background: var(--pessoal-superficie-elevada);
}

#menu-departamentos-pessoal .departamento-nome {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

#menu-departamentos-pessoal .departamento-seta {
  color: var(--pessoal-icone);
  font-size: 10px;
  transition: color .2s ease, transform .2s ease;
}

#menu-departamentos-pessoal a:hover .departamento-seta,
#menu-departamentos-pessoal a:focus-visible .departamento-seta {
  color: var(--pessoal-icone);
  transform: translateX(-2px);
}

#menu-departamentos-pessoal a.ativo {
  color: #000;
  background: linear-gradient(270deg, var(--pessoal-superficie-ativa), rgba(247, 249, 254, 0.7));
  border-color: #bdcae3;
}

#menu-departamentos-pessoal a.ativo::before {
  position: absolute;
  right: -11px;
  width: 3px;
  height: 24px;
  background: var(--pessoal-destaque);
  border-radius: 4px 0 0 4px;
  content: "";
}

#menu-departamentos-pessoal a.ativo .departamento-icone {
  color: var(--pessoal-icone);
  background: var(--pessoal-superficie-elevada);
  border-color: var(--pessoal-destaque);
}

#menu-departamentos-pessoal .disabled {
  color: var(--pessoal-cinza);
  pointer-events: none;
  opacity: .62;
}

#menu-departamentos-pessoal .disabled .departamento-seta {
  font-size: 9px;
}

/* === SUBMENU DE TABELAS === */
.dropdown-tabelas {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding-right: 1rem;
}

.dropdown-tabelas:hover {
  color: #000;
}

.seta-tabelas {
  font-size: 12px;
  transition: transform 0.2s ease;
}

.seta-tabelas.rotate {
  transform: rotate(180deg);
}

/* Oculta inicialmente */
.submenu-tabelas {
  height: 0;
  overflow: hidden;
  visibility: hidden;
  transition: all 0.25s ease;
  opacity: 0;
}

/* Mostra quando ativo */
.submenu-tabelas.active {
  height: auto;
  visibility: visible;
  opacity: 1;
  padding-bottom: 0.5rem;
}

.global-logout {
  position: fixed;
  top: 10px;
  right: 14px;
  z-index: 1100;
  margin: 0;
}

.tc-notifications {
  position: fixed;
  top: 8px;
  right: 58px;
  z-index: 2100;
  font-family: var(--pessoal-fonte);
}

.tc-notifications-trigger {
  position: relative;
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  color: var(--pessoal-texto);
  background: rgba(247, 249, 254, .96);
  border: 1px solid var(--pessoal-borda);
  border-radius: 9px;
  box-shadow: 0 2px 8px rgba(52, 79, 121, .1);
  cursor: pointer;
}

.tc-notifications-trigger:hover,
.tc-notifications-trigger:focus-visible,
.tc-notifications-trigger[aria-expanded="true"] {
  color: var(--pessoal-destaque-forte);
  background: var(--pessoal-superficie-hover);
  border-color: var(--pessoal-destaque);
  outline: none;
}

.tc-notifications-trigger.has-unread i {
  animation: tc-notification-ring .55s ease-in-out 1;
}

.tc-notifications-badge {
  position: absolute;
  top: -6px;
  right: -7px;
  min-width: 18px;
  height: 18px;
  box-sizing: border-box;
  padding: 0 5px;
  color: #fff;
  background: #c73e4b;
  border: 2px solid #f7f9fe;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
}

.tc-notifications-panel {
  position: absolute;
  top: 43px;
  right: 0;
  width: min(390px, calc(100vw - 20px));
  max-height: min(610px, calc(100vh - 64px));
  overflow: hidden;
  color: #1d2939;
  background: #fff;
  border: 1px solid #d7deea;
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(31, 42, 68, .22);
}

.tc-notifications-panel[hidden] {
  display: none;
}

.tc-notifications-panel > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 16px 12px;
  border-bottom: 1px solid #e6eaf0;
}

.tc-notifications-panel > header div {
  display: grid;
  gap: 2px;
}

.tc-notifications-panel > header strong {
  font-size: 16px;
}

.tc-notifications-panel > header small,
.tc-notifications-push-box span {
  color: #667085;
  font-size: 11px;
  line-height: 1.35;
}

.tc-notifications-panel button {
  font: inherit;
}

#tc-notifications-read-all {
  padding: 3px 0;
  color: #49658f;
  background: transparent;
  border: 0;
  font-size: 11px;
  cursor: pointer;
}

#tc-notifications-read-all:disabled {
  color: #98a2b3;
  cursor: default;
}

.tc-notifications-push-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 16px;
  background: #f7f9fc;
  border-bottom: 1px solid #e6eaf0;
}

#tc-notifications-push {
  flex: 0 0 auto;
  padding: 6px 9px;
  color: #344f79;
  background: #fff;
  border: 1px solid #b9c7db;
  border-radius: 7px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.tc-notifications-list {
  max-height: 430px;
  overflow-y: auto;
}

.tc-notification-item {
  display: grid;
  width: 100%;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  padding: 12px 15px;
  color: inherit;
  background: #fff;
  border: 0;
  border-bottom: 1px solid #edf0f4;
  text-align: left;
  cursor: pointer;
}

.tc-notification-item:hover,
.tc-notification-item:focus-visible {
  background: #f4f7fb;
  outline: none;
}

.tc-notification-item.is-unread {
  background: #eef5ff;
  box-shadow: inset 3px 0 #49658f;
}

.tc-notification-item-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #49658f;
  background: #e2eaf7;
  border-radius: 10px;
}

.tc-notification-item-content {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.tc-notification-item-content strong {
  overflow: hidden;
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tc-notification-item-content > span {
  color: #475467;
  font-size: 11px;
  line-height: 1.4;
}

.tc-notification-item-content small {
  color: #98a2b3;
  font-size: 10px;
}

.tc-notifications-empty {
  margin: 0;
  padding: 30px 18px;
  color: #667085;
  font-size: 12px;
  text-align: center;
}

.tc-notifications-toasts {
  position: fixed;
  top: 62px;
  right: 16px;
  z-index: 2200;
  display: grid;
  width: min(360px, calc(100vw - 32px));
  gap: 8px;
  pointer-events: none;
}

.tc-notification-toast {
  display: grid;
  gap: 4px;
  padding: 13px 15px;
  color: #eef5ff;
  background: #253a59;
  border: 1px solid #49658f;
  border-radius: 11px;
  box-shadow: 0 12px 30px rgba(18, 31, 49, .28);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .2s ease, transform .2s ease;
  text-align: left;
  pointer-events: auto;
  cursor: pointer;
}

.tc-notification-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.tc-notification-toast span {
  color: #cfdced;
  font-size: 12px;
  line-height: 1.35;
}

@keyframes tc-notification-ring {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(13deg); }
  75% { transform: rotate(-13deg); }
}

html[data-theme="escuro"] .tc-notifications-trigger {
  color: #d8e1eb;
  background: #172231;
  border-color: #34465d;
}

html[data-theme="escuro"] .tc-notifications-panel,
html[data-theme="escuro"] .tc-notification-item {
  color: #dce5ef;
  background: #151f2c;
  border-color: #2b3a4c;
}

html[data-theme="escuro"] .tc-notifications-push-box {
  background: #111a25;
  border-color: #2b3a4c;
}

html[data-theme="escuro"] .tc-notification-item:is(:hover, :focus-visible),
html[data-theme="escuro"] .tc-notification-item.is-unread {
  background: #1c3045;
}

html[data-theme="escuro"] .tc-notification-item-content > span,
html[data-theme="escuro"] .tc-notifications-panel > header small,
html[data-theme="escuro"] .tc-notifications-push-box span {
  color: #a8b5c5;
}

@media (max-width: 600px) {
  .tc-notifications {
    right: 58px;
  }

  .global-logout {
    top: 8px;
    right: 6px;
  }

  .global-logout button {
    width: 36px;
    height: 36px;
    min-height: 0;
    justify-content: center;
    padding: 0;
  }

  .global-logout button span {
    display: none;
  }

  .tc-notifications-panel {
    position: fixed;
    top: 52px;
    right: 8px;
    left: 8px;
    width: auto;
  }
}

.global-logout button {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  color: var(--pessoal-texto);
  background: rgba(247, 249, 254, 0.94);
  border: 1px solid var(--pessoal-borda);
  border-radius: 7px;
  box-shadow: 0 2px 8px rgba(52, 79, 121, 0.1);
  cursor: pointer;
}

.global-logout button:hover,
.global-logout button:focus-visible {
  color: var(--pessoal-destaque-forte);
  background: var(--pessoal-superficie-hover);
  border-color: var(--pessoal-destaque);
  outline: none;
}

@media only screen and (min-width: 901px) {
  #menu-pessoal {
    border-top-right-radius: 0;
  }

  /* Prolonga o topo do menu e fecha a lateral com uma curva concava. */
  .nav-pessoal.tem-menu-pessoal::after {
    content: '';
    position: fixed;
    top: 50px;
    left: calc(var(--pessoal-menu-largura) + var(--pessoal-menu-inset));
    width: 20px;
    height: 20px;
    visibility: hidden;
    background: radial-gradient(
      circle at 100% 100%,
      transparent calc(20px - 1px),
      #E9EBF4 20px
    );
    opacity: 0;
    transform: translateX(calc(0px - var(--pessoal-menu-largura) - 16px));
    transition:
      transform .28s cubic-bezier(.4, 0, .2, 1),
      opacity .2s ease,
      visibility 0s linear .28s;
    z-index: 1750;
    pointer-events: none;
  }

  html.pessoal-sidebar-aberta .nav-pessoal.tem-menu-pessoal::after {
    visibility: visible;
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0s;
  }

  html.pessoal-sidebar-aberta .nav-pessoal.tem-menu-pessoal ~ #app-content {
    width: calc(100% - var(--pessoal-menu-espaco));
    margin-left: var(--pessoal-menu-espaco);
  }

  html.pessoal-sidebar-aberta .nav-pessoal.tem-menu-pessoal ~ #app-content > main,
  html.pessoal-sidebar-aberta .nav-pessoal.tem-menu-pessoal ~ #app-content > section,
  html.pessoal-sidebar-aberta .nav-pessoal.tem-menu-pessoal ~ #app-content > div {
    max-width: 100%;
  }

  /* A faixa de tarefas ocupa também o respiro entre a sidebar e o push layout.
     O padding compensatório mantém títulos, campos e tabelas no eixo original. */
  html.pessoal-sidebar-aberta .nav-pessoal.tem-menu-pessoal ~ #app-content .task-page {
    --task-command-sidebar-bleed: calc(var(--pessoal-menu-espaco) - var(--pessoal-menu-largura) - var(--pessoal-menu-inset));
    --task-command-content-inset: calc(12px + var(--task-command-sidebar-bleed));
    width: calc(100% + var(--task-command-sidebar-bleed));
    max-width: calc(100% + var(--task-command-sidebar-bleed));
    margin-left: calc(0px - var(--task-command-sidebar-bleed));
    padding-left: var(--task-command-sidebar-bleed);
    box-sizing: border-box;
  }

  html.pessoal-sidebar-aberta .nav-pessoal.tem-menu-pessoal ~ #app-content .task-page #form_filtros {
    width: calc(100% + var(--task-command-sidebar-bleed));
    margin-left: calc(0px - var(--task-command-sidebar-bleed));
    padding-left: var(--task-command-content-inset);
  }

  /* Centraliza a edicao na area util, sem deixar o menu lateral cobrir o modal. */
  html.pessoal-sidebar-aberta .nav-pessoal.tem-menu-pessoal ~ #app-content .task-page #box-editar {
    position: fixed;
    right: 0;
    left: var(--pessoal-menu-espaco);
    width: min(900px, calc(100vw - var(--pessoal-menu-espaco) - 24px));
    max-width: calc(100vw - var(--pessoal-menu-espaco) - 24px);
    margin-right: auto;
    margin-left: auto;
    box-sizing: border-box;
    transform: translateY(-50%);
  }

  /* Os quadros de tarefas conservam a largura anterior a sidebar. O #box
     continua limitado a area visivel e oferece sua propria rolagem horizontal. */
  html.pessoal-sidebar-aberta .nav-pessoal.tem-menu-pessoal ~ #app-content .task-page .task-table {
    min-width: max(
      var(--task-grid-min-width, 100%),
      calc(100% + var(--pessoal-menu-espaco))
    );
  }

  html.pessoal-sidebar-aberta .nav-pessoal.tem-menu-pessoal ~ #loader {
    left: var(--pessoal-menu-espaco);
  }
}

@media (prefers-reduced-motion: reduce) {
  #app-content,
  #menu-pessoal,
  .nav-pessoal.tem-menu-pessoal::after {
    transition-duration: 0s;
  }
}

/* ===== SELETOR DE APARENCIA ===== */
.menu-tema-interface {
  box-sizing: border-box;
  margin: 10px 14px 0;
  padding: 12px 2px 0;
  list-style: none;
  border-top: 1px solid var(--pessoal-borda);
  font-family: var(--pessoal-menu-fonte);
}

.tema-interface-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--pessoal-icone);
  font-size: 12px;
}

.tema-interface-titulo {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
}

.tema-interface-titulo i {
  width: 20px;
  flex: 0 0 20px;
  color: var(--pessoal-icone);
  font-size: 16px;
  text-align: center;
}

.tema-interface-select {
  position: relative;
  width: 126px;
  min-width: 126px;
  color: var(--pessoal-texto);
}

#seletor-tema-interface {
  width: 126px;
  height: 30px;
  box-sizing: border-box;
  padding: 3px 25px 3px 9px;
  color: var(--pessoal-texto);
  background: var(--pessoal-superficie-elevada);
  border: 1px solid var(--pessoal-borda);
  border-radius: 8px;
  font: inherit;
  cursor: pointer;
}

#seletor-tema-interface:hover,
#seletor-tema-interface:focus-visible {
  border-color: var(--pessoal-destaque);
  outline: none;
}

#seletor-tema-interface:focus-visible {
  box-shadow: 0 0 0 3px rgba(73, 101, 143, .2);
}

#seletor-tema-interface:disabled {
  cursor: wait;
  opacity: .66;
}

#seletor-tema-interface.tema-interface-select-native {
  position: absolute !important;
  width: 1px !important;
  min-width: 0 !important;
  height: 1px !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden;
  border: 0 !important;
  opacity: 0;
  pointer-events: none;
  clip-path: inset(50%);
}

.tema-interface-trigger {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 10px;
  gap: 7px;
  align-items: center;
  width: 100%;
  height: 34px;
  box-sizing: border-box;
  padding: 4px 9px 4px 7px;
  color: var(--pessoal-texto);
  background: var(--pessoal-superficie-elevada);
  border: 1px solid var(--pessoal-borda);
  border-radius: 9px;
  box-shadow: 0 2px 8px rgba(23, 32, 51, .07);
  font: inherit;
  font-weight: 550;
  text-align: left;
  cursor: pointer;
  transition:
    color .16s ease,
    background-color .16s ease,
    border-color .16s ease,
    box-shadow .16s ease;
}

.tema-interface-trigger-preview {
  display: grid;
  width: 22px;
  height: 22px;
  box-sizing: border-box;
  place-items: center;
  overflow: hidden;
  background: #fff;
  border: 1px solid color-mix(in srgb, var(--pessoal-borda) 80%, var(--pessoal-texto));
  border-radius: 6px;
}

.tema-interface-trigger-preview span {
  width: 7px;
  height: 7px;
  background: var(--pessoal-destaque);
  border-radius: 50%;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--pessoal-destaque) 14%, transparent);
}

.menu-tema-interface[data-theme-active="misto"] .tema-interface-trigger-preview {
  background: linear-gradient(135deg, #f8fafc 0 48%, #1b2634 52% 100%);
}

.menu-tema-interface[data-theme-active="misto"] .tema-interface-trigger-preview span {
  background: #72a8dc;
  box-shadow: 0 0 0 2px rgba(114, 168, 220, .2);
}

.menu-tema-interface[data-theme-active="escuro"] .tema-interface-trigger-preview {
  background: #1b2634;
  border-color: #49617e;
}

.menu-tema-interface[data-theme-active="escuro"] .tema-interface-trigger-preview span {
  background: #72a8dc;
  box-shadow: 0 0 0 2px rgba(114, 168, 220, .2);
}

.tema-interface-valor {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tema-interface-seta {
  color: var(--pessoal-texto-suave);
  font-size: 9px;
  transition: color .16s ease, transform .18s ease;
}

.tema-interface-trigger:hover,
.tema-interface-trigger:focus-visible,
.menu-tema-interface.is-open .tema-interface-trigger {
  color: var(--pessoal-destaque-forte);
  background: var(--pessoal-superficie-hover);
  border-color: var(--pessoal-destaque);
  outline: none;
}

.tema-interface-trigger:focus-visible,
.menu-tema-interface.is-open .tema-interface-trigger {
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--pessoal-destaque) 20%, transparent),
    0 4px 12px rgba(23, 32, 51, .09);
}

.menu-tema-interface.is-open .tema-interface-seta {
  color: var(--pessoal-destaque-forte);
  transform: rotate(180deg);
}

.tema-interface-trigger:active {
  background: var(--pessoal-superficie-ativa);
}

.tema-interface-trigger:disabled {
  cursor: wait;
  opacity: .68;
}

.tema-interface-lista {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  z-index: calc(var(--tc-z-drawer) + 10);
  width: 100%;
  max-height: min(164px, calc(100vh - 24px));
  box-sizing: border-box;
  padding: 5px;
  overflow-x: hidden;
  overflow-y: auto;
  color: var(--pessoal-texto);
  background: color-mix(in srgb, var(--pessoal-superficie-elevada) 97%, transparent);
  border: 1px solid var(--pessoal-borda);
  border-radius: 10px;
  box-shadow:
    0 18px 42px rgba(23, 32, 51, .2),
    0 3px 10px rgba(23, 32, 51, .09);
  scrollbar-gutter: stable;
  transform-origin: top right;
  animation: tema-interface-lista-in .16s ease-out both;
}

.menu-tema-interface.opens-up .tema-interface-lista {
  top: auto;
  bottom: calc(100% + 7px);
  transform-origin: bottom right;
}

.tema-interface-lista[hidden] {
  display: none;
}

.tema-interface-opcao {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 11px;
  gap: 7px;
  align-items: center;
  width: 100%;
  min-height: 38px;
  box-sizing: border-box;
  padding: 5px 7px;
  color: var(--pessoal-texto);
  background: transparent;
  border: 0;
  border-radius: 7px;
  outline: none;
  font: inherit;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: color .14s ease, background-color .14s ease;
}

.tema-interface-opcao:hover,
.tema-interface-opcao:focus-visible {
  color: var(--pessoal-destaque-forte);
  background: var(--pessoal-superficie-hover);
}

.tema-interface-opcao:focus-visible {
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--pessoal-destaque) 38%, transparent);
}

.tema-interface-opcao[aria-selected="true"] {
  color: var(--pessoal-destaque-forte);
  background: var(--pessoal-superficie-ativa);
  font-weight: 650;
}

.tema-interface-opcao-icone {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  color: #2946a6;
  background: #f8fafc;
  border: 1px solid #d8dee8;
  border-radius: 7px;
  font-size: 11px;
}

.tema-interface-opcao-icone.is-misto {
  color: #a8cef2;
  background: linear-gradient(135deg, #f8fafc 0 48%, #1b2634 52% 100%);
  border-color: #8090a4;
}

.tema-interface-opcao-icone.is-escuro {
  color: #a8cef2;
  background: #1b2634;
  border-color: #49617e;
}

.tema-interface-check {
  color: var(--pessoal-destaque-forte);
  font-size: 9px;
  opacity: 0;
}

.tema-interface-opcao[aria-selected="true"] .tema-interface-check {
  opacity: 1;
}

@keyframes tema-interface-lista-in {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.tema-interface-feedback {
  display: block;
  min-height: 12px;
  margin-top: 4px;
  color: var(--pessoal-texto-suave);
  font-size: 9px;
  line-height: 1.2;
  text-align: right;
}

@media (prefers-reduced-motion: reduce) {
  .tema-interface-lista {
    animation: none;
  }

  .tema-interface-seta {
    transition-duration: 0s;
  }
}

/* ===== SHELL DE NAVEGACAO CORPORATIVO ===== */
.nav-pessoal {
  z-index: var(--tc-z-header);
  background: color-mix(in srgb, var(--pessoal-superficie) 94%, white);
  box-shadow: 0 4px 18px rgba(23, 32, 51, .06);
}

.nav-pessoal-contexto {
  display: grid;
  justify-items: center;
  gap: 1px;
  min-width: 0;
  padding: 0 220px;
}

.nav-pessoal h1 {
  max-width: min(42vw, 560px);
  overflow: hidden;
  color: var(--pessoal-texto);
  font-family: var(--pessoal-fonte);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.32px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-pessoal .nav-pessoal-subtitulo {
  position: static;
  margin: 0;
  color: var(--pessoal-texto-suave);
  font-family: var(--pessoal-util-fonte);
  font-size: 9px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.nav-pessoal-brand-toggle {
  position: absolute;
  top: 4px;
  left: 10px;
  display: inline-flex;
  height: 42px;
  align-items: center;
  gap: 8px;
  padding: 0 8px 0 6px;
  color: var(--pessoal-texto-suave);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9px;
  cursor: pointer;
  transition: color .18s ease, background-color .18s ease, border-color .18s ease;
}

.nav-pessoal-brand-toggle #logo-pessoal {
  position: static;
  width: 150px;
  display: block;
  transform: none;
}

.nav-brand-toggle-icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  font-size: 12px;
  border: 1px solid var(--pessoal-borda);
  border-radius: 7px;
}

.nav-pessoal-brand-toggle:hover {
  color: var(--pessoal-destaque-forte);
  background: var(--pessoal-superficie-hover);
  border-color: var(--pessoal-borda);
}

.nav-pessoal-brand-toggle:focus-visible,
#btn-menu-pessoal:focus-visible,
#btn-recolher-menu-pessoal:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--pessoal-destaque) 34%, transparent);
  outline-offset: 2px;
}

#btn-menu-pessoal {
  right: 4px;
  width: 46px;
  padding: 0;
  border-right: 1px solid transparent;
  border-left: 1px solid transparent;
}

#btn-menu-pessoal:hover,
#btn-menu-pessoal:focus-visible,
#btn-menu-pessoal[aria-expanded="true"] {
  background: var(--pessoal-superficie-hover);
  border-color: var(--pessoal-borda);
}

#imgMenu-pessoal {
  width: 25px;
  opacity: .66;
}

#menu-pessoal {
  padding: 10px 0 max(18px, env(safe-area-inset-bottom));
  list-style: none;
  background: linear-gradient(90deg, #fff 0%, var(--pessoal-superficie) 100%);
  box-shadow:
    -15px 0 0 var(--pessoal-superficie),
    10px 0 30px rgba(23, 32, 51, .08);
  scrollbar-gutter: stable;
}

#menu-pessoal.active,
html.pessoal-sidebar-aberta #menu-pessoal {
  z-index: var(--tc-z-drawer);
}

.menu-nav-group {
  margin: 0 0 13px;
  padding: 0;
  list-style: none;
}

.menu-group-title {
  display: block;
  margin: 0 16px 5px;
  color: var(--pessoal-texto-suave);
  font-family: var(--pessoal-util-fonte);
  font-size: 9.5px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.menu-nav-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

#menu-pessoal :is(a.menu-nav-link, button.menu-nav-link, .menu-nav-link.disabled) {
  display: flex;
  position: relative;
  min-height: 44px;
  box-sizing: border-box;
  align-items: center;
  gap: 10px;
  margin: 2px 10px;
  padding: 9px 11px;
  overflow: hidden;
  color: var(--pessoal-icone);
  font-family: var(--pessoal-menu-fonte);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -.05px;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 10px;
  transition: color .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}

#menu-pessoal a.menu-nav-link:hover {
  color: var(--pessoal-texto);
  background: var(--pessoal-superficie-hover);
  border-color: color-mix(in srgb, var(--pessoal-borda) 72%, transparent);
}

#menu-pessoal a.menu-nav-link:active {
  background: color-mix(in srgb, var(--pessoal-superficie-ativa) 74%, var(--pessoal-superficie-hover));
  transform: translateY(1px);
}

#menu-pessoal a.menu-nav-link:focus-visible {
  color: var(--pessoal-texto);
  background: var(--pessoal-superficie-hover);
  border-color: var(--pessoal-destaque);
  outline: 3px solid color-mix(in srgb, var(--pessoal-destaque) 24%, transparent);
  outline-offset: 1px;
  box-shadow: none;
}

#menu-pessoal a.menu-nav-link:is(.ativo, [aria-current="page"]) {
  color: var(--pessoal-destaque-forte);
  background: var(--pessoal-superficie-ativa);
  border-color: color-mix(in srgb, var(--pessoal-destaque) 22%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pessoal-destaque) 7%, transparent);
  font-weight: 600;
}

#menu-pessoal a.menu-nav-link:is(.ativo, [aria-current="page"])::before {
  position: absolute;
  top: 9px;
  bottom: 9px;
  left: 0;
  width: 3px;
  background: var(--pessoal-destaque);
  border-radius: 0 4px 4px 0;
  content: "";
}

#menu-pessoal :is(a.menu-nav-link, button.menu-nav-link, .menu-nav-link.disabled) > i {
  width: 20px;
  flex: 0 0 20px;
  color: currentColor;
  font-size: 16px;
  text-align: center;
  opacity: .9;
}

.menu-nav-label {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

#menu-pessoal .menu-nav-link.disabled {
  color: var(--pessoal-cinza);
  background: transparent;
  cursor: not-allowed;
  opacity: .82;
}

.menu-nav-restriction {
  flex: 0 0 auto;
  padding: 2px 5px;
  color: var(--pessoal-texto-suave);
  background: color-mix(in srgb, var(--pessoal-borda) 44%, transparent);
  border-radius: 5px;
  font-family: var(--pessoal-util-fonte);
  font-size: 8px;
  line-height: 1.3;
  letter-spacing: .02em;
  text-transform: uppercase;
}

#menu-pessoal .titulo-secao {
  display: flex;
  width: calc(100% - 20px);
  min-height: 48px;
  box-sizing: border-box;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 10px 4px;
  padding: 8px 11px;
  color: var(--pessoal-texto);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  transition: color .18s ease, background-color .18s ease, border-color .18s ease;
}

#menu-pessoal .titulo-secao:hover,
#menu-pessoal .titulo-secao[aria-expanded="true"] {
  color: var(--pessoal-destaque-forte);
  background: color-mix(in srgb, var(--pessoal-superficie-hover) 78%, transparent);
  border-color: color-mix(in srgb, var(--pessoal-borda) 70%, transparent);
}

#menu-pessoal .titulo-secao:focus-visible {
  color: var(--pessoal-destaque-forte);
  border-color: var(--pessoal-destaque);
  outline: 3px solid color-mix(in srgb, var(--pessoal-destaque) 24%, transparent);
  outline-offset: 1px;
}

.menu-group-heading {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.menu-group-heading > span {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.menu-group-heading small {
  color: var(--pessoal-texto-suave);
  font-family: var(--pessoal-menu-fonte);
  font-size: 10px;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0;
  text-transform: none;
}

#tabelas-pessoal a {
  margin-left: 10px;
}

.submenu-tabelas {
  max-height: 0;
  height: auto;
  overflow: hidden;
  visibility: hidden;
  opacity: 0;
  transition: max-height .24s cubic-bezier(.4, 0, .2, 1), opacity .18s ease, visibility 0s linear .24s;
}

.submenu-tabelas.active {
  max-height: 520px;
  height: auto;
  visibility: visible;
  opacity: 1;
  padding-bottom: 2px;
  transition-delay: 0s;
}

.menu-account-group {
  margin-top: 18px;
  padding-top: 13px;
  border-top: 1px solid var(--pessoal-borda);
}

.menu-logout-item,
.department-logout-item {
  list-style: none;
}

.menu-logout-item {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid color-mix(in srgb, var(--pessoal-borda) 70%, transparent);
}

.menu-logout-form {
  margin: 0;
}

#menu-pessoal button.menu-logout-button {
  width: calc(100% - 20px);
  appearance: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

#menu-pessoal button.menu-logout-button:hover {
  color: var(--pessoal-texto);
  background: var(--pessoal-superficie-hover);
  border-color: color-mix(in srgb, var(--pessoal-borda) 72%, transparent);
}

#menu-pessoal button.menu-logout-button:active {
  background: color-mix(in srgb, var(--pessoal-superficie-ativa) 74%, var(--pessoal-superficie-hover));
  transform: translateY(1px);
}

#menu-pessoal button.menu-logout-button:focus-visible {
  color: var(--pessoal-texto);
  background: var(--pessoal-superficie-hover);
  border-color: var(--pessoal-destaque);
  outline: 3px solid color-mix(in srgb, var(--pessoal-destaque) 24%, transparent);
  outline-offset: 1px;
}

#menu-departamentos-pessoal .department-logout-item {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid color-mix(in srgb, var(--pessoal-borda) 70%, transparent);
}

#menu-departamentos-pessoal button.department-logout-button {
  width: calc(100% - 20px);
  appearance: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

#menu-departamentos-pessoal button.department-logout-button > i {
  width: 34px;
  flex: 0 0 34px;
  color: var(--pessoal-destaque-forte);
  text-align: center;
}

#menu-departamentos-pessoal button.department-logout-button:hover,
#menu-departamentos-pessoal button.department-logout-button:focus-visible {
  color: var(--pessoal-texto);
  background: var(--pessoal-superficie-hover);
  border-color: var(--pessoal-borda);
  outline: none;
}

#menu-pessoal .menu-tema-interface {
  box-sizing: border-box;
  margin: 8px 10px 0;
  padding: 10px 10px 0;
  list-style: none;
  border-top: 1px solid color-mix(in srgb, var(--pessoal-borda) 70%, transparent);
}

#menu-pessoal .tema-interface-label {
  min-height: 38px;
  font-size: 12px;
  font-weight: 500;
}

#menu-pessoal #seletor-tema-interface {
  min-height: 34px;
  padding: 6px 28px 6px 9px;
  color: var(--pessoal-texto);
  background-color: var(--pessoal-superficie-elevada);
  border: 1px solid var(--pessoal-borda);
  border-radius: 8px;
}

#menu-departamentos-pessoal {
  z-index: calc(var(--tc-z-drawer) - 100);
  scrollbar-gutter: stable;
}

#menu-departamentos-pessoal.active {
  z-index: var(--tc-z-drawer);
}

#menu-departamentos-pessoal .departamento-link {
  position: relative;
  display: flex;
  box-sizing: border-box;
  align-items: center;
  gap: 11px;
  min-height: 46px;
  margin: 2px 10px;
  padding: 6px 12px;
  overflow: hidden;
  color: #172033;
  font-family: var(--pessoal-fonte);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 10px;
}

#menu-departamentos-pessoal span.departamento-link.disabled {
  cursor: not-allowed;
}

.nav-drawer-backdrop {
  position: fixed;
  inset: 50px 0 0;
  z-index: var(--tc-z-backdrop);
  background: rgba(15, 23, 42, .38);
  backdrop-filter: blur(2px);
}

.nav-drawer-backdrop[hidden] {
  display: none;
}

body.nav-drawer-modal-open {
  overflow: hidden;
}

.global-logout {
  z-index: calc(var(--tc-z-header) + 50);
}

.tc-notifications-toasts {
  z-index: var(--tc-z-toast);
}

@media (max-width: 900px) {
  #menu-pessoal {
    width: min(288px, calc(100vw - 20px));
    height: calc(100vh - 50px);
    height: calc(100dvh - 50px);
  }

  #menu-departamentos-pessoal {
    width: min(320px, calc(100vw - 20px));
    height: calc(100vh - 50px);
    height: calc(100dvh - 50px);
    padding-bottom: max(14px, env(safe-area-inset-bottom));
  }

  .nav-pessoal-contexto {
    padding: 0 180px;
  }
}

@media (max-width: 760px) {
  .nav-pessoal-contexto {
    padding: 0 150px;
  }

  .nav-pessoal .nav-pessoal-subtitulo {
    display: none;
  }

  .nav-pessoal h1 {
    font-size: 18px;
  }
}

@media (max-width: 600px) {
  .nav-pessoal-brand-toggle {
    left: 4px;
    padding-right: 5px;
  }

  .nav-pessoal-brand-toggle #logo-pessoal {
    width: 130px;
  }

  .nav-brand-toggle-icon {
    width: 22px;
    height: 22px;
  }

  #btn-menu-pessoal {
    right: 4px;
  }
}

@media (max-width: 430px) {
  .nav-pessoal-contexto {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-pessoal-brand-toggle,
  #btn-menu-pessoal,
  #btn-recolher-menu-pessoal,
  #menu-pessoal :is(a.menu-nav-link, button.menu-nav-link, .menu-nav-link.disabled),
  #menu-pessoal .titulo-secao,
  .submenu-tabelas {
    transition-duration: 0s;
  }
}

@media (forced-colors: active) {
  #btn-recolher-menu-pessoal,
  #menu-pessoal a.menu-nav-link:is(.ativo, [aria-current="page"]),
  #menu-pessoal .titulo-secao,
  .nav-pessoal-brand-toggle {
    border-color: CanvasText;
  }

  #menu-pessoal a.menu-nav-link:is(.ativo, [aria-current="page"])::before {
    background: Highlight;
  }

  .nav-drawer-backdrop {
    background: Canvas;
    opacity: .82;
  }
}

/* O modo claro permanece definido exclusivamente pelas regras originais acima. */
html[data-theme="misto"] .nav-pessoal {
  --pessoal-superficie: #111923;
  --pessoal-superficie-elevada: #1b2634;
  --pessoal-superficie-hover: #243246;
  --pessoal-superficie-ativa: #2b3c53;
  --pessoal-borda: #35465b;
  --pessoal-destaque: #72a8dc;
  --pessoal-destaque-forte: #a8cef2;
  --pessoal-texto: #f4f7fb;
  --pessoal-texto-suave: #a9b7c9;
  --pessoal-icone: #dbe5f0;
  --pessoal-grad: linear-gradient(180deg, #182331 0%, #111923 28%);
  --pessoal-grad2: #111923;
  --pessoal-ciano: #72a8dc;
  --pessoal-branco: #f4f7fb;
  --pessoal-cinza: #8290a2;
  box-shadow: 0 2px 14px rgba(2, 8, 18, .28);
}

html[data-theme="misto"] #menu-pessoal {
  background: linear-gradient(90deg, #151f2c 57%, #111923 100%);
  box-shadow:
    -15px 0 0 #111923,
    8px 0 24px rgba(2, 8, 18, .24);
  scrollbar-color: rgba(169, 183, 201, .36) transparent;
}

html[data-theme="misto"] #menu-pessoal::-webkit-scrollbar-thumb,
html[data-theme="misto"] #menu-departamentos-pessoal::-webkit-scrollbar-thumb {
  background: rgba(169, 183, 201, .36);
}

html[data-theme="misto"] #btn-recolher-menu-pessoal {
  color: #a9b7c9;
  background: rgba(255, 255, 255, .06);
  border-color: #35465b;
  box-shadow: 0 2px 8px rgba(2, 8, 18, .22);
}

html[data-theme="misto"] #btn-recolher-menu-pessoal:is(:hover, :focus-visible) {
  color: #a8cef2;
  background: #243246;
  border-color: #49617e;
}

html[data-theme="misto"] #menu-departamentos-pessoal {
  background:
    radial-gradient(circle at 100% 0, rgba(114, 168, 220, .12), transparent 36%),
    var(--pessoal-grad);
  box-shadow: -12px 0 30px rgba(2, 8, 18, .3);
  scrollbar-color: rgba(169, 183, 201, .36) transparent;
}

html[data-theme="misto"] #menu-departamentos-pessoal .departamentos-cabecalho,
html[data-theme="misto"] #menu-departamentos-pessoal .departamentos-cabecalho small,
html[data-theme="misto"] #menu-departamentos-pessoal a,
html[data-theme="misto"] #menu-departamentos-pessoal span.departamento-link,
html[data-theme="misto"] #menu-departamentos-pessoal a:hover,
html[data-theme="misto"] #menu-departamentos-pessoal a:focus-visible,
html[data-theme="misto"] #menu-departamentos-pessoal a.ativo,
html[data-theme="misto"] .dropdown-tabelas:hover {
  color: var(--pessoal-texto);
}

html[data-theme="misto"] #menu-departamentos-pessoal .departamento-icone {
  background: rgba(255, 255, 255, .06);
}

html[data-theme="misto"] #menu-departamentos-pessoal a.ativo {
  background: linear-gradient(270deg, var(--pessoal-superficie-ativa), rgba(27, 38, 52, .84));
  border-color: #49617e;
}

html[data-theme="misto"] #imgMenu-pessoal {
  filter: brightness(0) invert(1);
  opacity: .82;
}

html[data-theme="misto"] #seletor-tema-interface {
  color-scheme: dark;
}

html[data-theme="misto"] .global-logout button {
  color: #f4f7fb;
  background: rgba(27, 38, 52, .96);
  border-color: #35465b;
  box-shadow: 0 2px 8px rgba(2, 8, 18, .28);
}

html[data-theme="misto"] .global-logout button:hover,
html[data-theme="misto"] .global-logout button:focus-visible {
  color: #fff;
  background: #243246;
  border-color: #72a8dc;
}

@media only screen and (min-width: 901px) {
  html[data-theme="misto"] .nav-pessoal.tem-menu-pessoal::after {
    background: radial-gradient(
      circle at 100% 100%,
      transparent calc(20px - 1px),
      #111923 20px
    );
  }
}
