/* Source TEST356 table geometry; rebranded icons, palette and font. */
.reference-header { display: block; padding: 0; min-height: 0; }
.source-header-table { width: 100%; table-layout: auto; border-collapse: collapse; }
.source-header-table > tbody > tr > td { border: 0; padding: 1px; box-sizing: content-box; }
.source-header-brand .brand-icon { float: left; width: 36px; height: 38px; margin: 10px 0 0 20px; }
.reference-app .source-header-brand .product-badge { position:relative; isolation:isolate; background:transparent; border-radius:0; padding:0; overflow:visible; }
.reference-app .product-badge > img { position:absolute; left:calc(50% - 22.5px); top:calc(50% - 22.5px); width:45px; height:45px; max-width:none; object-fit:contain; pointer-events:none; }
.reference-app .product-badge::before,
.reference-app .product-badge::after {
  position:absolute; left:calc(50% - 20px); top:calc(50% - 20.5px); width:40px; height:40px;
  border-radius:50%; pointer-events:none;
  mask-image:radial-gradient(farthest-side, transparent 88%, #000 92%, #000 98%, transparent 100%);
}
.reference-app .product-badge::before {
  content:""; z-index:1; background:#24466f; opacity:.88;
}
@media screen and (prefers-reduced-motion:no-preference) {
  .reference-app .product-badge::after {
    content:""; z-index:2;
    background:conic-gradient(from 15deg, transparent 14deg, #4e9feb 48deg, #e3fbff 74deg, #fff 88deg, #a6dbff 103deg, transparent 128deg);
    animation:product-badge-flow 6s linear infinite;
  }
  .reference-app .product-badge[data-badge-hidden]::after { animation-play-state:paused; }
}
@keyframes product-badge-flow { to { transform:rotate(1turn); } }
.source-header-brand .brand-initial {
  position: relative;
  display: inline-block;
  width: var(--brand-initial-size);
  vertical-align: baseline;
}
.source-header-brand .brand-initial-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.source-header-brand .brand-initial > img {
  display: block;
  width: var(--brand-initial-size);
  height: var(--brand-initial-size);
  max-width: none;
  pointer-events: none;
}
.source-header-brand > h1 { float: left; margin: 3px 0 0; padding: 10px 8px 5px; font-size: 24px; line-height: normal; font-weight: 400; letter-spacing: 0; }
.source-header-table > tbody > tr > .source-header-account { width:1%; padding:8px 15px 8px 10px; text-align:right; }
.source-header-table .source-header-account:has(> .source-header-toolbar:empty) { display: none; }
.source-header-toolbar { display:flex; align-items:center; justify-content:flex-end; flex-wrap:nowrap; width:max-content; gap:8px; }
.source-header-icon { display: flex; align-items: center; justify-content: center; flex: 0 0 auto; padding: 4px; width: 28px; height: 28px; border: 0; border-radius: 8px; color: var(--ink); background: transparent; text-decoration: none; cursor: pointer; }
.source-header-icon:hover { background: #e3ece6; }
.source-header-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.source-header-icon.source-navigation-toggle {
  display: flex;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--choice-radius);
  background: var(--choice-fill);
  color: var(--primary);
}
.source-header-icon.source-navigation-toggle:hover { background: var(--choice-hover); }
.source-navigation-toggle .source-navigation-arrow { display: none; }
.source-header-brand-row {
  --brand-initial-size: calc(45px * 374 / 1254);
  display: flex;
  align-items: center;
  gap: 11px;
  margin-inline-start: 10px;
}
.reference-app .source-header-brand-row .brand-icon { float: none; flex: 0 0 36px; margin: 0; }
.source-header-brand-row > h1 { margin: 0; padding: 0; font-size: 24px; font-weight: 400; line-height: normal; letter-spacing: 0; }
.source-service-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding: 2px 12px;
  border-bottom: 1px solid var(--line);
}
.source-service-bar .header-change-access {
  flex: 0 0 auto;
  width: max-content;
  height: 26px;
  min-height: 26px;
  font-size: 12px;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
}
/* Keep logout in view when workplace or position names are long. */
.source-service-bar :is([data-action="change-access"], [data-action="choose-department"]) {
  flex-shrink: 1;
  min-width: 0;
  padding-inline: 8px;
}
.source-service-bar :is([data-action="change-access"], [data-action="choose-department"]) .header-action-label {
  overflow: hidden;
  text-overflow: ellipsis;
}
.source-service-bar button[aria-expanded="true"] { background: var(--header-choice-highlight); }
.source-service-bar .header-change-access .header-access-art { width: 18px; height: 18px; flex-basis: 18px; }
.source-service-bar .header-change-access .header-access-art img { width: 21px; height: 21px; }
@media screen and (min-width: 1250px) {
  .reference-header .source-service-bar {
    box-sizing: border-box;
    height: var(--reference-service-height);
    position: relative;
    border-bottom: 0;
  }
  .reference-header .source-service-bar::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    bottom: -.5px;
    height: 1px;
    background: var(--line);
    pointer-events: none;
  }
  /* The wide brand sits in the sidebar and does not need a row in the workspace. */
  .source-header-table > tbody > tr > .source-header-brand { padding: 0; }
  .reference-header .source-header-brand-row {
    --brand-initial-size: calc(56px * 374 / 1254);
    position: absolute;
    z-index: 31;
    inset-block-start: 0;
    inset-inline-start: 0;
    width: var(--reference-navigation-width);
    height: var(--reference-brand-height);
    margin: 0;
    gap: 7px;
  }
  .reference-app .source-header-brand-row .brand-icon {
    flex: 0 0 56px;
    height: 56px;
  }
  .reference-app .source-header-brand-row .product-badge > img {
    inset: 0;
    width: 56px;
    height: 56px;
  }
  .reference-app .source-header-brand-row .product-badge::before,
  .reference-app .source-header-brand-row .product-badge::after {
    inset: 3.5px;
    width: 49px;
    height: 49px;
  }
  .reference-header .source-header-brand-row > h1 {
    width: calc(100% - 63px);
    font-size: 20px;
    line-height: 1.1;
  }
  .reference-header .source-header-brand-row .product-tagline {
    max-width: calc(100% - 22px);
    line-height: 14px;
    white-space: normal;
  }
  .reference-app[data-navigation-collapsed] .source-header-brand-row > h1 {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .reference-app .reference-header .source-header-icon.source-navigation-toggle {
    position: absolute;
    inset-block-start: var(--reference-service-height);
    inset-inline-end: -22px;
    transform: translateY(-50%);
    padding: 0;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    /* The shared button lift and shadow must leave this invisible hit area fixed. */
    translate: none !important;
    box-shadow: none !important;
  }
  .reference-header .source-navigation-toggle::before {
    content: "";
    position: absolute;
    inset: 8px;
    border: 1px solid #9db8e3;
    border-radius: 50%;
    background: #fff;
  }
  .reference-header .source-navigation-toggle:hover::before { background: var(--choice-fill); }
  .reference-header .source-navigation-toggle:focus-visible { outline: none; }
  .reference-header .source-navigation-toggle:focus-visible::before {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
  }
  .reference-header .source-navigation-toggle .source-navigation-drawer-icon { display: none; }
  .reference-header .source-navigation-toggle .source-navigation-arrow {
    position: relative;
    display: block;
    width: 16px;
    height: 16px;
  }
  .reference-header .source-navigation-toggle[aria-expanded="false"] .source-navigation-arrow { transform: scaleX(-1); }
}
@media screen and (max-width: 1249px) {
  .reference-app .source-header-table,
  .reference-app .source-header-table > tbody,
  .reference-app .source-header-table > tbody > tr,
  .reference-app .source-header-table > tbody > tr > td { display: block; width: 100%; box-sizing: border-box; white-space: normal; }
  .reference-app .source-header-table > tbody > tr > td { padding: 8px 12px; }
  .reference-app .source-header-table > tbody > tr > .source-header-brand { display: flex; align-items: center; gap: 8px; }
  .reference-app .source-header-brand .brand-icon { flex: 0 0 36px; float: none; margin: 0; }
  .reference-app .source-header-brand-row { margin-inline-start: 0; gap: 8px; }
  .reference-app .source-header-brand-row > h1 { float: none; min-width: 0; margin: 0; padding: 0; overflow-wrap: anywhere; }
  .reference-app .source-header-icon.source-navigation-toggle { display: flex; }
  .reference-app .source-header-icon { width: 44px; height: 44px; }
  .reference-app .source-header-table > tbody > tr > .source-header-account { width:100%; padding:8px 12px; }
  .reference-app .source-header-toolbar { width:auto; flex-wrap:wrap; gap:8px; }
}

@media screen and (max-width: 420px) {
  .source-service-bar { padding-inline: 6px; }
}

/* Owner-requested four actions with current context; shared decorative motion owner. */
/* Context controls use the same height and icon size as the sidebar. */
.header-change-access { box-sizing:border-box; flex:0 0 206px; width:206px; display:inline-flex; align-items:center; justify-content:center; gap:8px; height:64px; min-height:64px; padding:4px 12px; border:1px solid var(--line); border-radius:8px; color:var(--primary); background:var(--primary-soft); font:inherit; font-size:13px; cursor:pointer; }
.header-change-access:not(:disabled):hover { background:#dce8fc; }
.header-change-access:disabled { opacity:.5; cursor:not-allowed; }
.header-action-copy { display:flex; flex-direction:column; align-items:flex-start; min-width:0; gap:2px; text-align:left; }
.header-action-label { white-space:nowrap; font-size:12px; line-height:14px; color:var(--primary); }
.header-action-value { white-space:normal; max-width:100%; font-size:12px; line-height:14px; color:var(--ink); font-weight:600; overflow-wrap:anywhere; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; }
.header-change-access .menu-art { width:32px; height:32px; flex-basis:32px; }
.header-change-access .menu-art img { width:44px; height:44px; }

.source-header-toolbar .header-change-access {
  height: var(--reference-menu-button-height);
  min-height: var(--reference-menu-button-height);
  padding-block: 2px;
  border-radius:var(--choice-radius);
  transition:transform 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}
.source-header-toolbar .header-change-access .menu-art {
  width: var(--reference-menu-icon-size);
  height: var(--reference-menu-icon-size);
  flex-basis: var(--reference-menu-icon-size);
}
.source-header-toolbar .header-change-access .menu-art img {
  width: var(--reference-menu-icon-size);
  height: var(--reference-menu-icon-size);
}
.source-header-toolbar [aria-haspopup="dialog"][aria-expanded="true"] { background:var(--header-choice-highlight); }

.header-choice-popover {
  --glass-ink:#112746;
  position:fixed;
  inset:auto;
  margin:0;
  box-sizing:border-box;
  display:none;
  width:max-content;
  overflow:auto;
  overscroll-behavior:contain;
  padding:6px;
  border:1px solid var(--choice-panel-border);
  border-radius:var(--choice-panel-radius);
  color:var(--glass-ink);
  background:var(--choice-glass-background);
  font:inherit;
  font-size:12px;
  font-weight:400;
  box-shadow:var(--choice-glass-shadow);
  backdrop-filter:var(--choice-glass-filter,none);
}
.header-choice-popover:popover-open { display:block; }
.header-choice-popover h2 { position:absolute; width:1px; height:1px; margin:0; overflow:hidden; clip-path:inset(50%); }
.header-choice-popover ul { display:grid; gap:4px; padding:3px; margin:0; list-style:none; }
.header-choice-popover ul:empty,.header-choice-popover p:empty { display:none; }
.header-choice-popover p { margin:5px 4px; }
.header-choice-popover input {
  contain:inline-size;
  width:calc(100% - 6px);
  margin:3px;
  padding:6px 10px;
  border:1px solid #abbfdb;
  border-radius:var(--choice-radius);
  color:inherit;
  background:#ffffffd9;
  font:inherit;
}
.header-choice-popover button {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  width:100%;
  min-height:34px;
  padding:5px 11px;
  border:1px solid var(--line);
  border-radius:var(--choice-radius);
  background:var(--choice-fill);
  color:inherit;
  font:inherit;
  text-align:left;
  overflow-wrap:break-word;
  cursor:pointer;
  box-shadow:inset 0 1px 0 #ffffffdc,inset 0 -1px 0 #547db92e,0 2px 4px #1c3d6415;
  transition:transform 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}
.header-choice-popover [hidden] { display:none; }
.header-choice-popover .header-choice-back { margin-bottom:4px; }
.header-choice-popover button:is([aria-current="true"], [aria-pressed="true"]) {
  background:var(--choice-selected);
  border-color:#a6bcde;
}
.header-choice-popover button:is([aria-current="true"], [aria-pressed="true"]) span { color:#1c57af; }
.header-choice-popover :is(button,input):focus-visible { outline:2px solid #245bc3; outline-offset:-2px; }
@media (pointer:coarse) {
  .header-choice-popover button { min-height:44px; }
  .header-choice-popover input { font-size:16px; }
}
@media (hover:hover) {
  .source-header-toolbar .header-change-access:not(:disabled):is(:hover,[aria-expanded="true"]) {
    transform:translateY(-2px);
    background:var(--header-choice-highlight);
    box-shadow:var(--choice-lift-shadow);
  }
  .source-header-toolbar [aria-haspopup="dialog"][aria-expanded="true"] { transition:none; }
  .header-choice-popover button:not(:disabled):hover {
    transform:translateY(-2px);
    background:var(--choice-hover);
    box-shadow:inset 0 1px 0 #fff,inset 0 -1px 0 #5079b536,0 6px 10px #183b692b;
  }
}
.header-choice-popover button:is([aria-current="true"], [aria-pressed="true"]):hover { background:var(--choice-selected); }
.header-choice-popover button:focus-visible { background:var(--choice-hover); }
.header-choice-popover button:is([aria-current="true"], [aria-pressed="true"]):focus-visible { background:var(--choice-selected); }
@media (prefers-reduced-motion:reduce) {
  .source-header-toolbar .header-change-access,
  .header-choice-popover button { transition:none; }
  .source-header-toolbar .header-change-access:not(:disabled):is(:hover,[aria-expanded="true"]),
  .header-choice-popover button:hover { transform:none; }
}

@media screen {
  .action-tooltip {
    position: fixed;
    z-index: 1200;
    max-width: min(18rem, calc(100vw - 16px));
    padding: 5px 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--ink);
    background: var(--choice-fill);
    box-shadow: var(--button-shadow);
    font-size: var(--ui-secondary);
    line-height: 1.3;
    overflow-wrap: anywhere;
    pointer-events: none;
  }
}

@media screen {
  .source-service-bar .menu-search {
    position: relative;
    flex: 0 1 268px;
    min-width: 0;
    margin-inline-end: auto;
  }
  .menu-search-field {
    display: flex;
    align-items: center;
    height: 26px;
    padding-inline-start: 8px;
    gap: 5px;
    border: 1px solid var(--line);
    border-radius: var(--choice-radius);
    background: var(--reference-canvas);
    color: var(--muted);
  }
  .menu-search-field svg { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
  .menu-search-field input {
    flex: 1;
    width: 0;
    min-width: 0;
    padding: 0 5px 0 0;
    border: 0;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: 13px;
    outline: none;
  }
  .source-service-bar .menu-search-field input:focus { outline: none; }
  .menu-search-field input::placeholder { color: var(--muted); }
  .menu-search-clear {
    display: grid;
    place-items: center;
    align-self: stretch;
    padding: 0 5px;
    margin-inline-end: 2px;
    border: 0;
    border-radius: var(--choice-radius);
    background: transparent;
    color: var(--primary);
    cursor: pointer;
  }
  .menu-search-clear:hover { background: var(--choice-hover); }
  .menu-search-popup {
    position: absolute;
    z-index: 50;
    inset: calc(100% + 4px) auto auto 0;
    box-sizing: border-box;
    width: max(100%, 250px);
    max-height: min(320px, 55vh);
    overflow: auto;
    overscroll-behavior: contain;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: var(--choice-panel-radius);
    background: var(--reference-canvas);
    box-shadow: var(--choice-glass-shadow);
  }
  .menu-search :is(.menu-search-clear, .menu-search-popup)[hidden] { display: none; }
  .menu-search-popup ul { list-style: none; padding: 0; margin: 0; }
  .menu-search-status { margin: 0; padding: 5px 8px; color: var(--muted); font-size: var(--ui-secondary); }
  .menu-search-popup [role="option"] { padding: 5px 8px; border-radius: var(--choice-radius); cursor: pointer; }
  .menu-search-popup [role="option"]:is(:hover, [aria-selected="true"]) { background: var(--choice-selected); }
  .menu-search-popup small { display: block; color: var(--muted); font-size: var(--ui-secondary); }
}
@media screen and (min-width: 1250px) {
  .source-service-bar .menu-search { margin-inline-start: 12px; }
}
@media screen and (max-width: 1249px) {
  .source-service-bar .menu-search { flex-basis: 240px; }
  .menu-search-popup { inset-block-start: calc(100% + 64px); width: min(320px, calc(100vw - 24px)); }
}
@media screen and (max-width: 420px) {
  .source-service-bar { gap: 4px; }
  .source-service-bar :is([data-action="change-access"], [data-action="choose-department"]) { padding-inline: 4px; }
  .source-service-bar [data-action="session-logout"] { padding-inline: 5px; }
  .source-service-bar .menu-search { flex-basis: 175px; min-width: 115px; }
  .source-service-bar .menu-search:not(:focus-within, :has(input:not(:placeholder-shown))) {
    flex: 0 0 28px;
    min-width: 0;
  }
  .menu-search:not(:focus-within, :has(input:not(:placeholder-shown))) .menu-search-field input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
  }
}
@media screen and (forced-colors: active) {
  .menu-search-popup [role="option"]:is(:hover, [aria-selected="true"]) { outline: 2px solid Highlight; outline-offset: -2px; }
}
