/* ============================================================
   rmc-cp-header-200x.css — v3.62.8 / 2026-05-22
   Pixel contract: preview v8 200x + admin v1 200x header stack.
   Loaded after manager-cockpit-v7.css + rmc-cp-200x.css.
   ============================================================ */

[data-surface="control-plane"] .rmc-app-shell__header,
body.admin-manager-shell[data-rmc-nav-bridge-host="manager"] .rmc-app-shell__header {
  background:
    radial-gradient(900px 220px at 8% -10%, rgba(var(--cp-glow-indigo), 0.20), transparent 60%), /* off-token-allow: dark-chrome-header-radial */
    radial-gradient(700px 200px at 92% -20%, rgba(var(--cp-glow-emerald), 0.16), transparent 60%), /* off-token-allow: dark-chrome-header-radial */
    linear-gradient(180deg, #0a0d22 0%, var(--cp-chrome-bg) 100%); /* off-token-allow: dark-chrome-header-bg */
  color: var(--cp-chrome-text);
  border-bottom: 1px solid var(--cp-chrome-hairline);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

[data-surface="control-plane"] .rmc-app-shell__sidebar,
body.admin-manager-shell[data-rmc-nav-bridge-host="manager"] .rmc-app-shell__sidebar {
  background: linear-gradient(180deg, var(--cp-chrome-bg) 0%, var(--cp-chrome-bg-deep) 100%);
  color: var(--cp-chrome-text);
  border-right: 1px solid var(--cp-chrome-hairline);
}

.cp-header {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  pointer-events: auto;
}

.cp-header .rmc-control-plane-chrome {
  position: relative;
  top: auto;
  display: flex;
  flex-direction: column;
  width: 100%;
  pointer-events: auto;
}

.cp-header__row--utility .rmc-platform-header {
  width: 100%;
}

.cp-header__row--utility .rmc-platform-header__inner {
  display: grid;
  grid-template-columns: minmax(220px, auto) 1fr minmax(220px, auto);
  align-items: center;
  gap: 16px;
  padding: 10px 20px;
  min-height: 52px;
  width: 100%;
}

.cp-header__row--utility .rmc-platform-header__brand {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  flex-direction: column;
  align-items: flex-start;
}

.cp-header__row--utility .navbar-toggler {
  grid-column: 1;
  justify-self: end;
}

.cp-header__row--utility .rmc-platform-header__toolbar {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  max-width: none;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
}

.cp-header__row--utility .rmc-platform-header__command {
  grid-column: 1;
  max-width: 560px;
  width: 100%;
  justify-self: center;
}

.cp-header__row--utility .rmc-platform-header__actions {
  grid-column: 2;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cp-header__row--utility {
  border-bottom: 1px solid var(--cp-chrome-hairline);
}

.cp-header .cp-brand__tagline,
.cp-header .rmc-cockpit-tagline {
  display: block;
  margin-top: 2px;
  font-family: var(--serif, "Source Serif 4", Georgia, serif);
  font-style: italic;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--cp-chrome-text-muted);
  line-height: 1.2;
}

/* Live banner — preview cp-activity-ticker + live rmc-cockpit-ticker */
.cp-header .rmc-cockpit-ticker,
.cp-header .cp-activity-ticker {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 0 4px 20px;
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.04) 0%, transparent 30%, transparent 100%); /* off-token-allow: ticker-bg-danger-fade */
  border-bottom: 1px solid var(--cp-chrome-hairline);
  font-size: 11px;
  color: var(--cp-chrome-text);
  overflow: hidden;
  white-space: nowrap;
  pointer-events: auto;
}

.cp-header .rmc-cockpit-ticker__badge,
.cp-header .cp-activity-ticker__badge {
  font-size: 9px;
  letter-spacing: 0.1em;
}

.cp-header .rmc-cockpit-ticker__viewport,
.cp-header .cp-activity-ticker__viewport {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  min-height: 1.5rem;
  overflow: hidden;
  position: relative;
  contain: layout paint;
}

.cp-header .rmc-cockpit-ticker__track,
.cp-header .cp-activity-ticker__track {
  display: inline-flex;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  max-width: 100%;
  min-height: 100%;
  align-items: center;
  gap: 36px;
  overflow: hidden;
  /* motion-budget-allow: looping ambient animation (infinite); the global prefers-reduced-motion reset stops it */
  animation: rmc-cockpit-ticker-scroll var(--rmc-cockpit-ticker-seconds, 40s) linear infinite;
  will-change: transform;
}

.cp-header .rmc-cockpit-ticker:hover .rmc-cockpit-ticker__track,
.cp-header .rmc-cockpit-ticker:focus-within .rmc-cockpit-ticker__track,
.cp-header .cp-activity-ticker:hover .cp-activity-ticker__track,
.cp-header .cp-activity-ticker:focus-within .cp-activity-ticker__track {
  animation-play-state: paused;
}

.cp-header .rmc-cockpit-ticker__track > .rmc-cockpit-ticker__event:nth-child(n+2),
.cp-header .cp-activity-ticker__track > .cp-activity-ticker__event:nth-child(n+2) {
  display: none;
}

@media (min-width: 720px) {
  .cp-header .rmc-cockpit-ticker__track > .rmc-cockpit-ticker__event:nth-child(-n+2),
  .cp-header .cp-activity-ticker__track > .cp-activity-ticker__event:nth-child(-n+2) {
    display: inline-flex;
  }
}

@media (min-width: 1180px) {
  .cp-header .rmc-cockpit-ticker__track > .rmc-cockpit-ticker__event:nth-child(-n+4),
  .cp-header .cp-activity-ticker__track > .cp-activity-ticker__event:nth-child(-n+4) {
    display: inline-flex;
  }
}

.cp-header .cp-primary-nav {
  display: flex;
  gap: 4px;
  padding: 6px 20px 8px;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--cp-chrome-hairline);
  pointer-events: auto;
}

.cp-header .cp-primary-nav__pill {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  pointer-events: auto;
}

.cp-context-drawer:not(.show) {
  display: none !important;
}

.cp-header .cp-presence {
  flex-shrink: 0;
}

.cp-header a,
.cp-header button,
.cp-header input,
.cp-header [role="button"],
.cp-header .cp-primary-nav__pill {
  pointer-events: auto;
}

@media (max-width: 991.98px) {
  .cp-header__row--utility .rmc-platform-header__inner {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
  }

  .cp-header__row--utility .rmc-platform-header__brand {
    grid-column: 1;
  }

  .cp-header__row--utility .navbar-toggler {
    grid-column: 2;
    grid-row: 1;
  }

  .cp-header__row--utility .rmc-platform-header__toolbar {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

/* Phone: reclaim operator-header height so page content — and primary CTAs
   like the MFA "Verify" button — isn't pushed below the fold behind the
   bottom-anchored footer. On a 390px screen the consolidated header stacked to
   ~180px (utility-row wrap + live ticker + inline-chrome). The footer is
   anchored at viewport-bottom, so a shorter header lets the canvas grow upward
   and pulls the CTA up with it.
   NB: the live ticker / inline-chrome rows are force-shown by
   rmc-cockpit-skin-v8.css at specificity ~32 with no mobile breakpoint, so the
   hide selectors below are qualified to match (html[data-cockpit-skin] +
   body.control-plane-shell + .cp-header--consolidated) and win the cascade.
   No operator control is removed: the toolbar's command + action chips stay,
   just on single horizontally-scrollable lines instead of wrapping. */
@media (max-width: 991.98px) {
  html[data-cockpit-skin] body.control-plane-shell .cp-header--consolidated .cp-header__row--live,
  html[data-cockpit-skin] body.control-plane-shell .cp-header--consolidated .cp-header__row--inline-chrome,
  html[data-cockpit-skin] body.admin-manager-shell .cp-header--consolidated .cp-header__row--live,
  html[data-cockpit-skin] body.admin-manager-shell .cp-header--consolidated .cp-header__row--inline-chrome {
    display: none;
  }

  .cp-header__row--utility .rmc-platform-header__inner {
    padding-top: 6px;
    padding-bottom: 6px;
  }

  .cp-header__row--utility .rmc-platform-header__toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 6px;
  }

  .cp-header__row--utility .rmc-platform-header__command {
    min-width: 0;
  }

  .cp-header__row--utility .rmc-platform-header__actions {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    min-width: 0;
  }
}

/* v3.62.12 — /super/ header stack: utility → live strip → primary nav (v8 200x).
   /admin/ backoffice: utility → nav row → live strip (admin v1 200x preview). */
.cp-header .cp-nav-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 20px;
  border-bottom: 1px solid var(--cp-chrome-hairline);
}

/* v3.90.12 — full-bleed live ticker (preview v8 200x: edge-to-edge gradient band) */
.cp-header .cp-live-strip {
  display: flex;
  align-items: stretch;
  gap: 0;
  width: 100%;
  padding: 0;
  margin: 0;
  font-size: 12px;
  color: var(--cp-chrome-text-muted);
  border-bottom: 1px solid var(--cp-chrome-hairline);
  overflow: hidden;
  white-space: nowrap;
}

.cp-header .cp-live-strip .rmc-cockpit-ticker,
.cp-header .cp-live-strip .cp-activity-ticker {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  width: 100%;
  margin: 0;
  padding: 4px 0 4px 20px;
  border: 0;
  border-bottom: 0;
  background: linear-gradient(
    90deg,
    rgba(239, 68, 68, 0.04) 0%,
    transparent 30%,
    transparent 100%
  ); /* off-token-allow: ticker-bg-danger-fade */
  font-size: 11px;
  color: var(--cp-chrome-text);
  overflow: hidden;
}

.cp-header .cp-live-strip .rmc-cockpit-ticker__viewport,
.cp-header .cp-live-strip .cp-activity-ticker__viewport {
  flex: 1;
  min-width: 0;
  max-width: none;
  min-height: 0;
  overflow: hidden;
  position: relative;
  contain: none;
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0,
    var(--cp-chrome-bg, #07091a) 24px,
    var(--cp-chrome-bg, #07091a) calc(100% - 60px),
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0,
    var(--cp-chrome-bg, #07091a) 24px,
    var(--cp-chrome-bg, #07091a) calc(100% - 60px),
    transparent 100%
  );
}

.cp-header .cp-live-strip .rmc-cockpit-ticker__track,
.cp-header .cp-live-strip .cp-activity-ticker__track {
  display: inline-flex;
  position: relative;
  top: auto;
  left: auto;
  width: max-content;
  max-width: none;
  min-height: 0;
  align-items: center;
  gap: 36px;
  overflow: visible;
  /* motion-budget-allow: looping ambient animation (infinite); the global prefers-reduced-motion reset stops it */
  animation: rmc-cockpit-ticker-scroll var(--rmc-cockpit-ticker-seconds, 40s) linear infinite;
  will-change: transform;
}

.cp-header .cp-live-strip .rmc-cockpit-ticker__track > .rmc-cockpit-ticker__event,
.cp-header .cp-live-strip .cp-activity-ticker__track > .cp-activity-ticker__event,
.cp-header .cp-live-strip .rmc-cockpit-ticker__track > .rmc-cockpit-ticker__event:nth-child(n + 2),
.cp-header .cp-live-strip .cp-activity-ticker__track > .cp-activity-ticker__event:nth-child(n + 2) {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
}

.cp-header .cp-live-strip .rmc-cockpit-ticker:hover .rmc-cockpit-ticker__track,
.cp-header .cp-live-strip .rmc-cockpit-ticker:focus-within .rmc-cockpit-ticker__track,
.cp-header .cp-live-strip .cp-activity-ticker:hover .cp-activity-ticker__track,
.cp-header .cp-live-strip .cp-activity-ticker:focus-within .cp-activity-ticker__track {
  animation-play-state: paused;
}

/* v3.90.13 — v8 200x preview compact header density (/super/) */
body.control-plane-shell .cp-header .cp-navbar.statement-header,
body.control-plane-shell .cp-header .rmc-platform-header.rmc-control-plane-chrome__top {
  min-height: 0;
  padding: 0;
}

body.control-plane-shell .cp-header__row--utility {
  border-bottom: 1px solid var(--cp-chrome-hairline);
}

body.control-plane-shell .cp-header__row--utility .cp-navbar.statement-header {
  border-bottom: 0;
  padding-block: 0;
  background: transparent;
}

body.control-plane-shell .cp-header .rmc-platform-header {
  min-height: 0;
}

body.control-plane-shell .cp-header__row--utility .rmc-platform-header__inner {
  padding: 10px 20px;
  min-height: 52px;
}

body.control-plane-shell .cp-header .cp-nav-row {
  display: block;
  padding: 0;
  gap: 0;
  border-bottom: none;
}

body.control-plane-shell .cp-header .cp-nav-row .cp-primary-nav,
body.control-plane-shell .rmc-app-shell__canvas-chrome .cp-nav-row .cp-primary-nav {
  display: flex;
  gap: 4px;
  padding: 6px 20px;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  margin: 0;
  border-bottom: 1px solid var(--cp-chrome-hairline);
  /* v4.05.86 (2026-06-28): was `overflow-x:auto; overflow-y:hidden` — that made
     the nav a horizontal SCROLLER (reported "the More button is scrollable") AND
     a clip container that swallowed the "More ▾" menu (it dropped inside/behind
     the band). The nav already folds items >5 into the dropdown, so it must not
     scroll at all; visible overflow also lets the menu escape to overlay on top. */
  overflow: visible;
  flex-wrap: nowrap;
  max-width: 100%;
}

body.control-plane-shell .cp-header .cp-primary-nav,
body.control-plane-shell .rmc-app-shell__canvas-chrome .cp-primary-nav {
  justify-content: flex-start;
}

body.control-plane-shell .cp-header .rmc-app-shell__header,
body.admin-manager-shell .cp-header .rmc-app-shell__header,
body.control-plane-shell .cp-header,
body.admin-manager-shell .cp-header {
  /* v4.02.x (2026-06-06): was `overflow: hidden`, which clipped the primary-nav
     "More ▾" dropdown (it drops below the band) so the menu was invisible and the
     button read as "not clickable". Clip only the X axis (keep horizontal
     containment — no h-scroll) and let the Y axis overflow so the menu escapes. */
  overflow-x: clip;
  overflow-y: visible;
  max-width: 100%;
}

/* v4.04.x (2026-06-21): the `overflow-x: clip; overflow-y: visible` above is
   meant to let the primary-nav "More ▾" dropdown drop below the band, but
   Chromium can coerce `overflow-y: visible` back to clip when the X axis is
   `clip` — re-clipping the menu so it never appears and the button reads as
   inert ("nothing happens on click"). While the dropdown is actually OPEN,
   drop all clipping on the header so the menu is guaranteed to escape. :has()
   is live, so this engages the instant the native <details> toggles open and
   reverts on close — horizontal containment is untouched in the normal
   (closed) state, and the absolutely-positioned menu doesn't widen the header,
   so opening it can't introduce horizontal scroll. */
body.control-plane-shell .cp-header:has(.cp-primary-nav__more[open]),
body.admin-manager-shell .cp-header:has(.cp-primary-nav__more[open]),
body.control-plane-shell .cp-header:has(.cp-primary-nav__more .dropdown-menu.show),
body.admin-manager-shell .cp-header:has(.cp-primary-nav__more .dropdown-menu.show),
body.control-plane-shell .cp-header--consolidated .cp-header__unified-band:has(.cp-primary-nav__more .dropdown-menu.show),
body.admin-manager-shell .cp-header--consolidated .cp-header__unified-band:has(.cp-primary-nav__more .dropdown-menu.show) {
  overflow: visible;
}

/* v4.05.86 (2026-06-28) — the escape-hatch above lifted overflow on the band but
   NOT on the inner containers between it and the menu, so a child scroll/clip
   context (the nav's own row, the utility actions strip, OR .cp-primary-nav
   itself) still swallowed the "More ▾" panel — it read as "behind / inside the
   header". While the menu is open, lift clipping on EVERY container in the chain
   so the panel is guaranteed to overlay ON TOP, on both /super/ and /admin/.
   :has() is live → engages on open, reverts on close; the menu is absolutely
   positioned so it never widens the header (no horizontal scroll introduced). */
body.control-plane-shell .cp-header:has(.cp-primary-nav__more .dropdown-menu.show) .cp-header__consolidated-inner,
body.admin-manager-shell .cp-header:has(.cp-primary-nav__more .dropdown-menu.show) .cp-header__consolidated-inner,
body.control-plane-shell .cp-header:has(.cp-primary-nav__more .dropdown-menu.show) .rmc-control-plane-chrome,
body.admin-manager-shell .cp-header:has(.cp-primary-nav__more .dropdown-menu.show) .rmc-control-plane-chrome,
body.control-plane-shell .cp-header:has(.cp-primary-nav__more .dropdown-menu.show) .cp-header__row,
body.admin-manager-shell .cp-header:has(.cp-primary-nav__more .dropdown-menu.show) .cp-header__row,
body.control-plane-shell .cp-header:has(.cp-primary-nav__more .dropdown-menu.show) .cp-header__nav-slot,
body.admin-manager-shell .cp-header:has(.cp-primary-nav__more .dropdown-menu.show) .cp-header__nav-slot,
body.control-plane-shell .cp-header:has(.cp-primary-nav__more .dropdown-menu.show) .cp-nav-row,
body.admin-manager-shell .cp-header:has(.cp-primary-nav__more .dropdown-menu.show) .cp-nav-row,
body.control-plane-shell .cp-header:has(.cp-primary-nav__more .dropdown-menu.show) .rmc-platform-header__inner,
body.admin-manager-shell .cp-header:has(.cp-primary-nav__more .dropdown-menu.show) .rmc-platform-header__inner,
body.control-plane-shell .cp-header:has(.cp-primary-nav__more .dropdown-menu.show) .rmc-platform-header__actions,
body.admin-manager-shell .cp-header:has(.cp-primary-nav__more .dropdown-menu.show) .rmc-platform-header__actions,
body.control-plane-shell .cp-header:has(.cp-primary-nav__more .dropdown-menu.show) .cp-primary-nav,
body.admin-manager-shell .cp-header:has(.cp-primary-nav__more .dropdown-menu.show) .cp-primary-nav {
  overflow: visible !important;
}

/* The panel must paint ABOVE the sticky header chrome + copilot rail, never under it. */
body.control-plane-shell .cp-primary-nav__more-menu.dropdown-menu,
body.admin-manager-shell .cp-primary-nav__more-menu.dropdown-menu {
  z-index: 1060; /* > sticky header (1030) + copilot rail (1042) */
}

/* Closed-state guarantee: the primary nav never horizontally scrolls in the
   operator header, in ANY row placement (the shared .rmc-horizontal-nav-rail
   rule gives every rail overflow-x:auto; this body+header-scoped rule outranks
   it). Overflow folds into the "More ▾" dropdown, never a scroll track. */
body.control-plane-shell .cp-header .cp-primary-nav,
body.admin-manager-shell .cp-header .cp-primary-nav {
  overflow: visible;
  scroll-snap-type: none;
}

/* v4.05.x — primary-nav "More ▾" dropdown panel + items (super AND admin shells).
   The menu previously carried only Bootstrap `.dropdown-menu-dark` / `.dropdown-item`
   (specificity 0,2,0), so the platform pill grammar never applied — items read as a
   generic "workspace" list with drifting glyphs. These rules (body-shell scoped =
   higher specificity, and loaded after Bootstrap) restore the platform look: a
   panel that matches the pills, and each item as an aligned glyph + label with the
   indigo brand accent. Applies to BOTH control-plane (/super/) and admin shells. */
body.control-plane-shell .cp-primary-nav__more-menu,
body.admin-manager-shell .cp-primary-nav__more-menu {
  min-width: 232px;
  padding: 6px;
  border-radius: var(--radius-md, 12px);
  border: 1px solid var(--hairline);
  background: var(--surface-elevated, #0e1424);
  box-shadow: var(--elev-3, 0 18px 50px rgba(0, 0, 0, 0.55));
}

body.control-plane-shell .cp-primary-nav__more-menu .cp-primary-nav__more-item,
body.admin-manager-shell .cp-primary-nav__more-menu .cp-primary-nav__more-item {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 9px;
  border: 1px solid transparent;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.control-plane-shell .cp-primary-nav__more-menu .cp-primary-nav__more-item .cp-nav-pill__glyph,
body.admin-manager-shell .cp-primary-nav__more-menu .cp-primary-nav__more-item .cp-nav-pill__glyph,
body.control-plane-shell .cp-primary-nav__more-menu .cp-primary-nav__more-item .bi,
body.admin-manager-shell .cp-primary-nav__more-menu .cp-primary-nav__more-item .bi {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  font-size: 15px;
  line-height: 1;
  color: var(--brand-primary);
}

body.control-plane-shell .cp-primary-nav__more-menu .cp-primary-nav__more-item:hover,
body.admin-manager-shell .cp-primary-nav__more-menu .cp-primary-nav__more-item:hover,
body.control-plane-shell .cp-primary-nav__more-menu .cp-primary-nav__more-item:focus-visible,
body.admin-manager-shell .cp-primary-nav__more-menu .cp-primary-nav__more-item:focus-visible {
  background: color-mix(in srgb, var(--brand-primary) 14%, transparent);
  border-color: color-mix(in srgb, var(--brand-primary) 40%, var(--hairline));
  color: var(--text-primary);
}

body.control-plane-shell .cp-primary-nav__more-menu .cp-primary-nav__more-item--active,
body.admin-manager-shell .cp-primary-nav__more-menu .cp-primary-nav__more-item--active {
  background: color-mix(in srgb, var(--brand-primary) 18%, transparent);
  border-color: color-mix(in srgb, var(--brand-primary) 45%, transparent);
}

body.control-plane-shell .cp-primary-nav__more-menu .cp-primary-nav__more-item--active .cp-nav-pill__glyph,
body.admin-manager-shell .cp-primary-nav__more-menu .cp-primary-nav__more-item--active .cp-nav-pill__glyph,
body.control-plane-shell .cp-primary-nav__more-menu .cp-primary-nav__more-item--active .bi,
body.admin-manager-shell .cp-primary-nav__more-menu .cp-primary-nav__more-item--active .bi {
  color: var(--text-primary);
}

body.control-plane-shell .rmc-app-shell__canvas-chrome .cp-nav-row .cp-primary-nav {
  border-bottom: none;
}

body.control-plane-shell #cp-main-content > .container-fluid.cp-layout {
  padding-top: 0.25rem;
}

body.control-plane-shell [data-shell-chrome="breadcrumb-row"]:has([data-shell-chrome="breadcrumb-slot"]:empty) {
  display: none;
  margin: 0;
  padding: 0;
  min-height: 0;
}

@media (prefers-reduced-motion: reduce) {
  .cp-header .rmc-cockpit-ticker__track,
  .cp-header .cp-activity-ticker__track {
    animation: none;
  }
}

/* /super/ primary nav pills (mirror admin backoffice grammar) */
body.control-plane-shell .cp-primary-nav--control-plane {
  justify-content: flex-start;
  gap: 6px;
  width: 100%;
}

body.control-plane-shell .cp-nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-pill, 999px);
  background: rgba(255, 255, 255, 0.03); /* off-token-allow: fixed-shell-accent */
  border: 1px solid transparent;
  color: var(--cp-chrome-text-muted, var(--text-secondary));
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background var(--motion-fast, 150ms), color var(--motion-fast, 150ms);
  flex: 0 0 auto;
}

body.control-plane-shell .cp-nav-pill:hover {
  background: rgba(255, 255, 255, 0.06); /* off-token-allow: fixed-shell-accent */
  color: var(--cp-chrome-text, var(--text-primary));
}

body.control-plane-shell .cp-nav-pill--active,
body.control-plane-shell .cp-nav-pill[data-active] {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(139, 92, 246, 0.18)); /* off-token-allow: fixed-shell-accent */
  border-color: rgba(99, 102, 241, 0.4); /* off-token-allow: fixed-shell-accent */
  color: #fff; /* off-token-allow: fixed-shell-accent */
}

body.control-plane-shell .cp-nav-pill__glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.1em;
  font-size: 0.95em;
  line-height: 1;
  flex-shrink: 0;
}

/* =================================================================
   v4.00.24 (2026-05-29) — Manager header rebalance.

   Customer feedback: the manager/control-plane header is stretched
   across the full width with too much empty space between groups
   (search · weather · pills · icons · workspace · bell · theme ·
   avatar). The Studio chip was already removed in the template.
   This block:
     1. Replaces the 1fr stretch with a content-width flex row so the
        items pack together at the right (search owns the left-stretch).
     2. Caps the command/search bar at min(420px, 35vw) so it never
        eats the room the actions need.
     3. Compacts every action chip / icon-btn to a uniform 32px hit
        target with 4px gap.
     4. Hides the most secondary chips (operator-presence labels) to
        icon-only at lg, reveals text at xl+.
   ================================================================= */

/* Outer 3-column grid: brand | toolbar | (none) -> brand auto / toolbar
   takes the rest. Same as before but no awkward stretch. */
.cp-header__row--utility .rmc-platform-header__inner,
body.admin-manager-shell .cp-header__row--utility .rmc-platform-header__inner,
body.control-plane-shell .cp-header__row--utility .rmc-platform-header__inner {
  grid-template-columns: minmax(220px, auto) 1fr !important; /* style-allow: header-rebalance-grid */
  gap: 12px !important; /* style-allow: header-rebalance-gap */
  padding: 8px 16px !important; /* style-allow: header-rebalance-pad */
  min-height: 56px;
}

/* Inner toolbar: search on the LEFT, packed actions on the RIGHT, gap 6px,
   no stretch in the middle. */
.cp-header__row--utility .rmc-platform-header__toolbar,
body.admin-manager-shell .cp-header__row--utility .rmc-platform-header__toolbar,
body.control-plane-shell .cp-header__row--utility .rmc-platform-header__toolbar {
  display: flex !important; /* style-allow: header-rebalance-flex */
  flex-wrap: nowrap !important; /* style-allow: header-rebalance-flex */
  align-items: center;
  justify-content: flex-end;
  gap: 6px !important; /* style-allow: header-rebalance-flex */
  min-width: 0;
}

/* Search bar gets a fixed max-width; never grows past 35% of viewport */
.cp-header__row--utility .rmc-platform-header__command,
body.admin-manager-shell .cp-header__row--utility .rmc-platform-header__command,
body.control-plane-shell .cp-header__row--utility .rmc-platform-header__command {
  flex: 1 1 320px;
  max-width: min(420px, 35vw) !important; /* style-allow: header-rebalance-search */
  margin-right: auto; /* pushes everything else to the right */
  justify-self: start;
}

/* Weather/context strip stays compact (no horizontal padding) */
.cp-header__row--utility .rmc-platform-header__context,
body.admin-manager-shell .cp-header__row--utility .rmc-platform-header__context,
body.control-plane-shell .cp-header__row--utility .rmc-platform-header__context {
  flex: 0 0 auto;
  gap: 6px;
}

/* Actions cluster packs tight, never wraps */
.cp-header__row--utility .rmc-platform-header__actions,
body.admin-manager-shell .cp-header__row--utility .rmc-platform-header__actions,
body.control-plane-shell .cp-header__row--utility .rmc-platform-header__actions {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px !important; /* style-allow: header-rebalance-actions-gap */
  margin: 0;
}

/* Every icon-button in the manager header normalised to 32x32 so the
   row reads as a clean strip of pills instead of mismatched lumps. */
body.admin-manager-shell .cp-header__row--utility .rmc-platform-header__icon-btn,
body.control-plane-shell .cp-header__row--utility .rmc-platform-header__icon-btn,
body.admin-manager-shell .cp-header__row--utility .cp-topbar-bell,
body.control-plane-shell .cp-header__row--utility .cp-topbar-bell {
  /* v4.01.08: .cp-topbar-theme-toggle selectors removed — toggle is now
     `.rmc-header-theme-chip` (templates/components/header_theme_chip.html). */
  width: 32px !important; /* style-allow: header-rebalance-icon */
  height: 32px !important; /* style-allow: header-rebalance-icon */
  padding: 0 !important; /* style-allow: header-rebalance-icon */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

/* Pill-style chips (Config, Workspace) compress: smaller padding, font 12,
   only show their text labels at >= xl. */
body.admin-manager-shell .cp-header__row--utility .rmc-platform-header__chip,
body.control-plane-shell .cp-header__row--utility .rmc-platform-header__chip {
  padding: 4px 10px !important; /* style-allow: header-rebalance-chip */
  font-size: 12px !important; /* style-allow: header-rebalance-chip */
  height: 32px;
  border-radius: 999px;
  flex: 0 0 auto;
}

/* Operator-presence pills (1 operator online / All systems handling well)
   compact to small dot+text format and hide label below xl */
body.control-plane-shell .cp-header__row--utility .rmc-platform-header__actions .cp-operator-presence,
body.control-plane-shell .cp-header__row--utility .rmc-platform-header__actions [data-rmc-operator-presence],
body.admin-manager-shell .cp-header__row--utility .rmc-platform-header__actions .cp-operator-presence,
body.admin-manager-shell .cp-header__row--utility .rmc-platform-header__actions [data-rmc-operator-presence] {
  font-size: 11px;
  padding: 4px 8px;
  gap: 4px;
  height: 28px;
}
@media (max-width: 1279.98px) {
  body.control-plane-shell .cp-header__row--utility .rmc-platform-header__actions .cp-operator-presence__label,
  body.admin-manager-shell .cp-header__row--utility .rmc-platform-header__actions .cp-operator-presence__label,
  body.control-plane-shell .cp-header__row--utility .rmc-platform-header__actions [data-rmc-operator-presence-label],
  body.admin-manager-shell .cp-header__row--utility .rmc-platform-header__actions [data-rmc-operator-presence-label] {
    display: none;
  }
}

/* Brand wordmark — keep compact, never wrap, ellipsis if needed */
body.admin-manager-shell .cp-header__row--utility .cp-brand,
body.control-plane-shell .cp-header__row--utility .cp-brand {
  max-width: 320px;
  flex: 0 0 auto;
}
body.admin-manager-shell .cp-header__row--utility .cp-brand__crumb,
body.control-plane-shell .cp-header__row--utility .cp-brand__crumb {
  font-size: 10px;
  opacity: 0.7;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================================
   v4.02.x — COMPACT OPERATOR BAND (2026-06-06, owner-approved)
   ------------------------------------------------------------
   Collapse the former 3-row /super/ header into ONE band that
   mirrors /admin/: search trimmed ~50%, clock/weather relocated
   to the live row, operator presence + profile compacted, the
   primary nav inlined as the icon rail (rail CSS already lives
   in rmc-cockpit-skin-v8.css). Reclaims a whole nav row of
   vertical height so pages start higher. Dark chrome only.
   ============================================================ */

/* (1) Command search trimmed ~50% (was min(420px, 35vw)). Explicit
   width keeps it deterministic whether or not the :has(rail) rule
   in rmc-cockpit-skin-v8.css has flipped the flex basis to auto. */
body.control-plane-shell .cp-header__row--utility .rmc-platform-header__command,
body.admin-manager-shell .cp-header__row--utility .rmc-platform-header__command {
  flex: 0 1 auto;
  width: clamp(180px, 22vw, 280px);
  max-width: 280px !important; /* style-allow: header-compact-search-2026-06-06 */
  margin-right: var(--space-2, 8px);
}

/* (2) Clock / weather relocated to the right edge of the LIVE row. */
.cp-header__row--live {
  display: flex;
  align-items: center;
  gap: var(--space-2, 8px);
}
.cp-header__row--live .rmc-cp-landing-ticker {
  flex: 1 1 auto;
  min-width: 0;
}
.cp-header__live-context {
  flex: 0 0 auto;
  margin-left: auto;
  padding-right: 4px;
  display: inline-flex;
  align-items: center;
}
.cp-header__live-context .header-context-dock__trigger {
  padding: 2px 8px;
  font-size: 11px;
}
@media (max-width: 991.98px) {
  .cp-header__live-context { display: none; }
}

/* (3) Operator presence shrunk: avatars + count stay; the verbose
   "All systems handling well" status collapses to its pulse dot
   (full text remains in the capsule title + aria-label). */
body.control-plane-shell .cp-header__row--utility .cp-presence {
  gap: 7px;
  padding: 3px 9px 3px 5px;
}
body.control-plane-shell .cp-header__row--utility .cp-presence__avatar {
  width: 19px;
  height: 19px;
  font-size: 9px;
  margin-left: -7px;
}
body.control-plane-shell .cp-header__row--utility .cp-presence__count {
  font-size: 11px;
}
body.control-plane-shell .cp-header__row--utility .cp-presence__status {
  padding-left: 0;
  border-left: 0;
  gap: 0;
  font-size: 0; /* hide the verbose text; the px-sized ::before pulse dot stays */
}

/* (4) Profile trigger compacted to avatar + chevron on the band
   (name/role move into the menu's identity header). */
.cp-header__row--utility .user-dropdown-trigger {
  padding: 3px 8px 3px 4px;
  gap: 4px;
}
.cp-header__row--utility .user-dropdown-trigger .user-info {
  display: none;
}
.cp-header__row--utility .user-dropdown-trigger .user-avatar {
  width: 32px;
  height: 32px;
}
.cp-header__row--utility .user-dropdown-trigger .user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Identity header at the top of the user dropdown menu (theme-aware —
   the menu surface flips light/dark, so use semantic ink tokens). */
.user-dropdown-identity {
  padding: 10px 14px 4px;
}
.user-dropdown-identity__name {
  font-size: var(--type-size-md, 15px);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}
.user-dropdown-identity__role {
  font-size: var(--type-size-sm, 12px);
  color: var(--text-secondary);
  margin-top: 1px;
}

/* ============================================================
   Operator/admin More parity (2026-07-04)
   ------------------------------------------------------------
   Match the tenant header's More grammar on both /super/ and
   /admin/: compact pill, literal ellipsis, same active/hover
   treatment, and no "workspace" visual language in the header.
   ============================================================ */
body.control-plane-shell .cp-header__row--utility .rmc-platform-header__more-chip,
body.admin-manager-shell .cp-header__row--utility .rmc-platform-header__more-chip,
body.control-plane-shell .cp-header .cp-primary-nav__more-trigger,
body.admin-manager-shell .cp-header .cp-primary-nav__more-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 72px;
  height: 32px;
  padding: 0 13px !important; /* style-allow: operator-more-tenant-parity */
  border-radius: var(--radius-pill, 999px);
  border: 1px solid var(--cp-chrome-hairline, var(--hairline));
  background: rgba(255, 255, 255, 0.05); /* off-token-allow: dark-chrome-header-chip */
  color: var(--cp-chrome-text, var(--text-primary));
  font-size: 12px !important; /* style-allow: operator-more-tenant-parity */
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

body.control-plane-shell .cp-header__row--utility .rmc-platform-header__more-chip:hover,
body.admin-manager-shell .cp-header__row--utility .rmc-platform-header__more-chip:hover,
body.control-plane-shell .cp-header__row--utility .rmc-platform-header__more-chip:focus-visible,
body.admin-manager-shell .cp-header__row--utility .rmc-platform-header__more-chip:focus-visible,
body.control-plane-shell .cp-header .cp-primary-nav__more-trigger:hover,
body.admin-manager-shell .cp-header .cp-primary-nav__more-trigger:hover,
body.control-plane-shell .cp-header .cp-primary-nav__more-trigger:focus-visible,
body.admin-manager-shell .cp-header .cp-primary-nav__more-trigger:focus-visible {
  background: color-mix(in srgb, var(--brand-primary) 16%, transparent);
  border-color: color-mix(in srgb, var(--brand-primary) 42%, var(--cp-chrome-hairline, var(--hairline)));
  color: var(--cp-chrome-text, var(--text-primary));
}

body.control-plane-shell .cp-header__row--utility .rmc-platform-header__more-chip::after,
body.admin-manager-shell .cp-header__row--utility .rmc-platform-header__more-chip::after,
body.control-plane-shell .cp-header .cp-primary-nav__more-trigger::after,
body.admin-manager-shell .cp-header .cp-primary-nav__more-trigger::after {
  margin-left: 0;
  opacity: 0.75;
}

body.control-plane-shell .cp-header__row--utility .rmc-operator-workspace-dropdown .dropdown-menu,
body.admin-manager-shell .cp-header__row--utility .rmc-operator-workspace-dropdown .dropdown-menu {
  min-width: 240px;
  padding: 6px;
  border-radius: var(--radius-md, 12px);
  border: 1px solid var(--cp-chrome-hairline, var(--hairline));
  background: var(--surface-elevated, #0e1424);
  box-shadow: var(--elev-3, 0 18px 50px rgba(0, 0, 0, 0.55));
}

body.control-plane-shell .cp-header__row--utility .rmc-operator-workspace-dropdown .dropdown-item,
body.admin-manager-shell .cp-header__row--utility .rmc-operator-workspace-dropdown .dropdown-item {
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
}

