.global {
  height: var(--header-height);
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 0 22px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(16, 24, 40, .02);
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  transition: transform .2s ease, box-shadow .2s ease;
}

html[data-context-popout-window="1"] {
  --header-height: 0px;
  --global-header-height: 0px;
}
html[data-context-popout-window="1"] body > .global {
  display: none !important;
}

.global-brand {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-lg);
  font-weight: 800;
  white-space: nowrap;
  text-decoration: none;
  letter-spacing: 0;
}

.global-brand-area { display:flex; align-items:center; gap:8px; min-width:0; }
.global-navigation-open { display:none; }

.global-brand span:last-child { color: var(--brand); font-weight: 720; }
.global-brand-logo { width: 28px; height: 28px; flex: 0 0 28px; margin-right: 4px; border-radius: 8px; object-fit: cover; }

.global-navigation {
  min-width: 0;
  align-self: stretch;
}
.global-navigation-slot { min-width: 0; align-self: stretch; }

.global-navigation > header,
.global-navigation > footer { display: none; }
.global-navigation-context { display: none; }

.global-navigation > nav {
  height: var(--header-height);
  display: flex;
  align-items: center;
  gap: 3px;
  overflow-x: auto;
  scrollbar-width: none;
}

.global-navigation > nav::-webkit-scrollbar { display: none; }
.global-navigation > nav a {
  height: var(--control-height);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: var(--text-control);
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}
.global-navigation > nav a > svg { display: none; }
.global-navigation > nav a:hover { color: var(--text); background: var(--surface-hover); }
.global-navigation > nav a.active { color: var(--accent); background: var(--accent-soft); }
.global-navigation > nav a.is-pending { color: var(--accent); background: var(--accent-soft); }
.global-navigation-backdrop { display: none; }

body.is-global-navigating::before {
  content: "";
  position: fixed;
  z-index: calc(var(--z-header) + 2);
  top: var(--header-height);
  left: 0;
  width: 32%;
  height: 2px;
  border-radius: 0 999px 999px 0;
  background: var(--accent);
  box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 42%, transparent);
  pointer-events: none;
  animation: global-navigation-progress 1.05s ease-in-out infinite;
}
@media (max-width:1023px) {
  body.global-header-hidden:not(.global-mobile-open):not(.sidebar-open):not(.app-dialog-open).is-global-navigating::before { top:0; }
}
@keyframes global-navigation-progress {
  0% { transform: translateX(-105%); }
  58% { width: 46%; }
  100% { transform: translateX(315%); width: 32%; }
}

.global-actions { display: flex; gap: 6px; align-items: center; justify-self: end; white-space: nowrap; }
.global-user { color: var(--text); font-size: var(--text-xs); max-width: 100px; overflow: hidden; text-overflow: ellipsis; }
.app-shell-full { grid-template-columns: minmax(0, 1fr); }
.app-shell-full > .main { width: 100%; }
.main { padding: var(--page-gutter-top) var(--page-gutter-inline) var(--page-gutter-bottom); }
