.oem-support-banner {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 6px 16px;
  background: var(--ui-active-bg);
  color: var(--ui-active-fg);
  font: 700 12px/1.3 var(--ui-font-mono);
}

.oem-support-banner > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.oem-support-banner form { margin: 0; }

.oem-support-banner button {
  min-height: 30px;
  margin: 0;
  padding: 0 10px;
  border: var(--ui-divider-width) solid var(--ui-active-fg);
  border-radius: var(--ui-radius);
  background: transparent;
  color: var(--ui-active-fg);
  font: 700 11px/1 var(--ui-font-mono);
  text-transform: capitalize;
  cursor: pointer;
}

.oem-support-banner button:focus-visible {
  outline-color: var(--ui-active-fg);
}

.oem-support-banner button:hover:not(:disabled),
.oem-support-banner button:focus-visible {
  background: var(--ui-active-fg) !important;
  color: var(--ui-active-bg);
}

.portal-header {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-width: 0;
  min-height: 48px;
  margin: calc(var(--shell-padding) * -1) calc(var(--shell-padding) * -1) 1.25rem;
  padding: 0 16px;
  border-bottom: var(--ui-divider-width) solid var(--ui-divider-color);
  background: var(--ui-header-bg);
  color: var(--ui-header-fg);
}

.portal-brand { min-width: 0; }

.portal-product {
  display: block;
  color: var(--ui-header-fg);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1;
}

.portal-company {
  display: block;
  margin-top: 4px;
  color: var(--ui-header-muted);
  font-size: 12px;
  line-height: 1;
}

.portal-header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.portal-logout { margin: 0; }

.portal-header .portal-dashboard,
.portal-header [data-theme-toggle],
.portal-header .portal-logout button {
  flex: 0 0 auto;
  height: 32px;
  min-height: 32px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: var(--ui-divider-width) solid var(--ui-header-muted);
  background: transparent;
  color: var(--ui-header-fg);
  font: 700 12px/1.2 var(--ui-font-primary);
  text-transform: capitalize;
  text-decoration: none;
  border-radius: var(--ui-radius);
  box-shadow: none;
  cursor: pointer;
}

.portal-header [data-theme-toggle][aria-pressed="true"] {
  background: var(--ui-active-bg);
  color: var(--ui-active-fg);
  border-color: var(--ui-active-bg);
}

.portal-header .portal-dashboard:focus-visible,
.portal-header [data-theme-toggle]:focus-visible,
.portal-header .portal-logout button:focus-visible {
  outline: 3px solid var(--brand-orange);
  outline-offset: 2px;
}

body.oem-portal-session {
  display: flex;
  flex-direction: column;
}

body.oem-portal-session div.graphtool {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
}

body.oem-portal-session .portal-header {
  flex: 0 0 auto;
  width: 100%;
  margin: 0;
}

@media (hover: hover) {
  .portal-header .portal-dashboard:hover,
  .portal-header [data-theme-toggle]:hover,
  .portal-header .portal-logout button:hover {
    border-color: var(--brand-orange);
    background: var(--ui-hover-bg);
    color: var(--ui-text);
  }

  .portal-header [data-theme-toggle][aria-pressed="true"]:hover {
    border-color: var(--ui-active-bg);
    background: var(--ui-active-bg);
    color: var(--ui-active-fg);
  }
}

@media (max-width: 40rem) {
  .oem-support-banner { align-items: flex-start; padding: 6px 14px; }
  .portal-header { padding-inline: 14px; }
}

@media (pointer: coarse) {
  .portal-header .portal-dashboard,
  .portal-header [data-theme-toggle],
  .portal-header .portal-logout button {
    height: auto;
    min-height: 44px;
  }
}
