/* Shared Alvo Pré-Moldados header. Scoped to PM pages; all actions remain in their original DOM nodes. */
body.pm-page {
  --pm-header-shell-max: 1420px;
  --pm-header-shell-half: 710px;
  --pm-header-gutter: 32px;
  --pm-header-profile-inline: 12px;
}
body.pm-page .topbar {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  height: auto;
  min-height: 44px;
  padding-inline: max(var(--pm-header-gutter), calc(50% - var(--pm-header-shell-half) + var(--pm-header-gutter)));
  background: #082e6b;
  color: #fff;
}
body.pm-page .topbar .brand {
  position: static;
  inset: auto;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  max-width: 100%;
  transform: none;
  color: #fff;
  font-size: 15px;
  line-height: 1.25;
}
body.pm-page .topbar .brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  padding: 4px 7px;
  border: 1px solid #a6c4e6;
  border-radius: 5px;
  background: transparent;
  color: #fff;
  font-size: 12px;
  letter-spacing: .08em;
}
body.pm-page .topbar .brand > span:last-child { display: inline; }
body.pm-page .topbar .back-link {
  position: static;
  inset: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  max-width: 100%;
  transform: none;
  color: #fff;
  font-size: 14px;
  line-height: 1.3;
  text-align: right;
}
body.pm-page #alvoProfileBar {
  box-sizing: border-box;
  width: calc(100% - var(--pm-header-gutter) - var(--pm-header-gutter));
  min-height: 46px;
  align-items: center;
  flex-wrap: wrap;
  margin: 4px auto !important;
  max-width: calc(var(--pm-header-shell-max) - var(--pm-header-gutter) - var(--pm-header-gutter)) !important;
  padding: 0 var(--pm-header-profile-inline) !important;
  gap: 8px !important;
  border-color: #d5deeb;
  border-radius: 10px;
  color: #17375e;
  font-size: 14px;
  line-height: 1.4;
}
body.pm-page #alvoProfileBar > span:first-child {
  flex: 1 1 260px;
  min-width: 0;
  overflow-wrap: anywhere;
}
body.pm-page #alvoProfileBar > span:last-child {
  display: flex;
  flex: 0 1 auto;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}
body.pm-page #alvoProfileBar a,
body.pm-page #alvoProfileBar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 6px 10px;
  border-radius: 7px;
  font: inherit;
  font-weight: 700;
  line-height: 1.25;
}
body.pm-page #alvoProfileBar a { color: #0b4d8f; }
body.pm-page #alvoProfileBar button { cursor: pointer; }
body.pm-page .pm-company-shell {
  box-sizing: border-box;
  width: 100%;
  max-width: var(--pm-header-shell-max);
  margin: 0 auto;
  padding-inline: var(--pm-header-gutter);
  padding-block: 0;
  color: #17375e;
}
body.pm-page .pm-company-identity {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid #cbd9eb;
  border-radius: 10px 10px 0 0;
  background: #f7faff;
}
body.pm-page .pm-company-identity > div { display: grid; gap: 2px; min-width: 0; line-height: 1.2; }
body.pm-page .pm-company-identity b { color: #082e6b; font-size: 17px; font-weight: 700; }
body.pm-page .pm-company-identity small { color: #53667e; font-size: 13px; }
body.pm-page .pm-company-chip {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  background: #082e6b;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
}
body.pm-page .pm-company-identity > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-left: auto;
  color: #0b4d8f;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  text-align: right;
}
body.pm-page .pm-company-nav {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 4px;
  padding: 0 5px;
  border: 1px solid #cbd9eb;
  border-top: 0;
  border-radius: 0 0 10px 10px;
  background: #fff;
}
body.pm-page .pm-company-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 4px 8px;
  border-radius: 7px;
  color: #31445e;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  white-space: normal;
}
body.pm-page .pm-company-nav a:hover,
body.pm-page .pm-company-nav a.is-active { background: #e8f1ff; color: #082e6b; }
body.pm-page .topbar a:focus-visible,
body.pm-page #alvoProfileBar a:focus-visible,
body.pm-page #alvoProfileBar button:focus-visible,
body.pm-page .pm-company-identity > a:focus-visible,
body.pm-page .pm-company-nav a:focus-visible {
  outline: 3px solid #f4b942;
  outline-offset: 2px;
  position: relative;
  z-index: 1;
}
body.pm-page.pm-stock-pilot-page,
body.pm-page.pm-equipe-pilot-page {
  --pm-header-gutter: 18px;
  --pm-header-profile-inline: 12px;
}
body.pm-page.pm-fabrication-pilot-page {
  --pm-header-shell-max: 1280px;
  --pm-header-shell-half: 640px;
  --pm-header-gutter: 18px;
  --pm-header-profile-inline: 12px;
}
@media (max-width: 700px) {
  body.pm-page { --pm-header-gutter: 15px; --pm-header-profile-inline: 8px; }
  body.pm-page .topbar { gap: 6px; }
  body.pm-page .topbar .brand { gap: 6px; font-size: 14px; }
  body.pm-page .topbar .back-link { font-size: 14px; }
  body.pm-page .pm-company-identity { align-items: flex-start; }
  body.pm-page .pm-company-identity > a { margin-left: 0; }
  body.pm-page.pm-stock-pilot-page,
  body.pm-page.pm-equipe-pilot-page,
  body.pm-page.pm-fabrication-pilot-page {
    --pm-header-gutter: 10px;
    --pm-header-profile-inline: 8px;
  }
}
@media print {
  body.pm-page .topbar { display: none; }
}
