body:has(.enterprise-shell) {
  --en-frame: var(--enterprise-canvas);
  --en-surface: var(--enterprise-surface);
  --en-raised: var(--enterprise-surface-subtle);
  --en-ink: var(--enterprise-text);
  --en-muted: var(--enterprise-text-muted);
  --en-accent: var(--enterprise-primary);
  --en-accent-wash: var(--enterprise-primary-soft);
  --en-line: var(--enterprise-border);
  --en-control: var(--enterprise-control-border);
  --en-focus: var(--enterprise-primary);
  --en-success: var(--enterprise-success);
  --en-success-wash: var(--enterprise-success-soft);
  --en-warning: var(--enterprise-warning);
  --en-warning-wash: var(--enterprise-warning-soft);
  --en-danger: var(--enterprise-danger);
  --en-danger-wash: var(--enterprise-danger-soft);
  --gy-blue: var(--enterprise-info);
  --gy-blue-wash: var(--enterprise-info-soft);
  --brand-strong: var(--enterprise-primary-hover);
  --ops-primary-hover: var(--enterprise-primary-hover);
  --gy-sidebar: var(--enterprise-rail);
  --gy-sidebar-line: var(--enterprise-rail-border);
  --gy-nav-text: var(--enterprise-rail-text);
  --gy-nav-active: var(--enterprise-rail-highlight);
  --gy-nav-wash: var(--enterprise-rail-selected);
  background: var(--en-frame);
}

.ops-shell.enterprise-shell {
  --enterprise-rail-width: 226px;
  --enterprise-gutter: clamp(20px, 2.2vw, 36px);
  grid-template-columns: var(--enterprise-rail-width) minmax(0, 1fr);
}

.enterprise-shell .ops-sidebar {
  height: 100dvh;
  overflow: hidden;
  border-right: 0;
}

.enterprise-sidebar-head {
  position: relative;
  flex: none;
  border-bottom: 1px solid var(--gy-sidebar-line);
}

.enterprise-shell .ops-sidebar .geyao-app-brand {
  min-height: 72px;
  height: auto;
  padding: 14px 16px;
  gap: 11px;
  border: 0;
}

.enterprise-shell .ops-sidebar .geyao-app-brand > img {
  display: block;
  width: 36px;
  height: 36px;
  padding: 6px;
  background: var(--enterprise-rail-hover);
  border-radius: 11px;
  box-sizing: border-box;
}

.enterprise-shell .ops-sidebar .geyao-app-brand strong {
  color: var(--enterprise-rail-highlight);
  font-size: 16px;
  font-weight: 650;
  letter-spacing: .045em;
}

.enterprise-shell .ops-sidebar .geyao-app-brand small {
  color: var(--enterprise-rail-muted);
  font-size: 11px;
  letter-spacing: .08em;
}

.enterprise-shell .ops-sidebar nav {
  min-height: 0;
  padding: 8px 9px 12px;
  overscroll-behavior: contain;
  scrollbar-color: var(--enterprise-rail-selected-border) transparent;
}

.enterprise-shell .ops-nav-group,
.enterprise-shell .ops-nav-group + .ops-nav-group {
  margin: 0 0 7px;
}

.enterprise-shell .ops-nav-heading {
  color: var(--enterprise-rail-muted);
  padding: 8px 10px 4px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .035em;
}

.enterprise-shell .ops-nav-item {
  position: relative;
  width: 100%;
  min-height: 39px;
  margin: 0;
  padding: 7px 9px;
  gap: 10px;
  color: var(--gy-nav-text);
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
}

.enterprise-shell .ops-nav-item .ops-icon {
  width: 17px;
  height: 17px;
  color: var(--enterprise-rail-muted);
}

.enterprise-shell .ops-nav-item.active,
.enterprise-shell .ops-nav-item.active:hover {
  color: var(--gy-nav-active);
  background: var(--gy-nav-wash);
  border-color: var(--enterprise-rail-selected-border);
  box-shadow: none;
}

.enterprise-shell .ops-nav-item.active::after {
  content: "";
  width: 5px;
  height: 5px;
  margin-inline-start: auto;
  flex: none;
  border-radius: 50%;
  background: var(--enterprise-primary-on-dark);
}

.enterprise-shell .ops-nav-item.active .ops-icon { color: var(--enterprise-primary-on-dark); }

.enterprise-shell .ops-nav-item b {
  color: var(--enterprise-rail);
  background: var(--enterprise-primary-on-dark);
  border-radius: 20px;
  padding: 0 6px;
}

.enterprise-shell .ops-nav-item:has(b).active::after { display: none; }

.enterprise-sidebar-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 3px;
  padding: 8px;
  border-top: 1px solid var(--gy-sidebar-line);
}

.enterprise-exhibit-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 9px;
  border-radius: 8px;
  color: var(--gy-nav-text);
  text-decoration: none;
}

.enterprise-exhibit-link:hover {
  background: var(--enterprise-rail-hover);
  color: var(--enterprise-rail-highlight);
}

.enterprise-exhibit-link .ops-icon { width: 15px; height: 15px; }
.enterprise-exhibit-link span { font-size: 12px; }

.enterprise-shell .ops-main-wrap {
  min-height: 100dvh;
  overflow: clip;
}

.enterprise-shell .ops-topbar {
  height: 68px;
  min-height: 68px;
  padding-inline: var(--enterprise-gutter);
  background: #fff;
  gap: 12px;
}

.enterprise-shell .ops-breadcrumb { gap: 8px; flex: 1 1 auto; }
.enterprise-shell .ops-breadcrumb strong { font-weight: 650; }
.enterprise-shell .ops-breadcrumb strong,
.enterprise-shell .ops-breadcrumb > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

.enterprise-shell .ops-top-actions { gap: 8px; }
.enterprise-shell .ops-topbar .ops-icon-button,
.enterprise-shell .ops-topbar .ops-search-trigger { height: 44px; min-height: 44px; cursor: pointer; }

.enterprise-shell .ops-topbar .ops-icon-button { width: 44px; min-width: 44px; color: var(--en-ink); }
.enterprise-shell .ops-topbar .enterprise-rail-toggle { padding: 0; margin-inline-start: -8px; color: var(--en-muted); }
.enterprise-shell .ops-topbar .ops-icon-button:hover { background: var(--en-accent-wash); color: var(--en-accent); }
.enterprise-shell .ops-topbar .ops-icon-button > .ops-icon { width: 18px; height: 18px; }
.enterprise-shell .enterprise-notifications i { inset: 9px 10px auto auto; width: 7px; height: 7px; }

.enterprise-shell .ops-topbar .ops-search-trigger {
  width: clamp(192px, 23vw, 310px);
  padding-inline: 12px;
  gap: 8px;
  background: var(--en-frame);
  border: 1px solid var(--en-line);
  border-radius: 8px;
  color: var(--en-muted);
}

.enterprise-shell .ops-search-trigger:hover {
  background: var(--en-accent-wash);
  border-color: var(--en-control);
}

.enterprise-shell .ops-search-trigger > .ops-icon { width: 16px; }
.enterprise-shell .ops-search-trigger > span { display: inline; }
.enterprise-shell .ops-search-trigger kbd { background: #fff; border-color: var(--en-control); }
.enterprise-shell .enterprise-preview { color: var(--enterprise-primary-hover); background: var(--enterprise-primary-soft); border-radius: 6px; padding: 4px 7px; font-weight: 550; }

.enterprise-account { position: relative; padding-left: 8px; border-left: 1px solid var(--en-line); }
.enterprise-account-summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 4px 5px;
  gap: 8px;
  border-radius: 8px;
  cursor: pointer;
  list-style: none;
}

.enterprise-account-summary::-webkit-details-marker { display: none; }
.enterprise-account-summary:hover,
.enterprise-account[open] .enterprise-account-summary { background: var(--en-raised); }

.enterprise-shell .enterprise-account-summary .ops-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  flex: none;
  background: var(--en-accent-wash);
  color: var(--enterprise-primary-hover);
  border-color: var(--enterprise-primary-border);
  font-weight: 650;
}

.enterprise-account-info { display: grid; gap: 3px; min-width: 0; }
.enterprise-account-info strong {
  max-width: 90px;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.25;
  color: var(--en-ink);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.enterprise-role { color: var(--en-muted); font-size: 12px; line-height: 1.25; white-space: nowrap; }
.enterprise-account-summary .enterprise-account-chevron { color: var(--en-muted); width: 12px; height: 12px; transform: rotate(90deg); }
.enterprise-account[open] .enterprise-account-chevron { transform: rotate(-90deg); }

.enterprise-account-panel {
  position: absolute;
  inset: calc(100% + 8px) 0 auto auto;
  z-index: 1;
  width: min(216px, 85vw);
  padding: 6px;
  border: 1px solid var(--en-line);
  border-radius: 12px;
  color: var(--en-ink);
  background: #fff;
  box-shadow: 0 8px 22px var(--enterprise-shadow-raised);
}

.enterprise-account-profile {
  display: grid;
  gap: 4px;
  padding: 7px 8px 10px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--en-line);
  overflow-wrap: anywhere;
}

.enterprise-account-profile strong { font-size: 13px; font-weight: 650; }
.enterprise-account-profile span { color: var(--en-muted); font-size: 12px; }
.enterprise-account-panel button {
  width: 100%;
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border: 0;
  border-radius: 6px;
  background: #fff;
  color: var(--en-ink);
  text-align: left;
  cursor: pointer;
}

.enterprise-account-panel button:hover { background: var(--en-accent-wash); }
.enterprise-account-panel button .ops-icon { width: 16px; height: 16px; color: var(--en-accent); }
.enterprise-shell .ops-content { padding-inline: var(--enterprise-gutter); }
.enterprise-shell .ops-footer {
  min-height: auto;
  width: auto;
  margin: 2px var(--enterprise-gutter) 0;
  padding: 12px 0 16px;
  border-top: 1px solid var(--en-line);
}

.enterprise-shell .ops-skip:focus { z-index: 70; }

@media (min-width: 1101px) {
  .ops-shell.enterprise-shell.enterprise-compact { --enterprise-rail-width: 66px; }
  .enterprise-compact .ops-sidebar .geyao-app-brand { padding-inline: 14px; }
  .enterprise-compact .ops-sidebar .geyao-app-brand > span,
  .enterprise-compact .enterprise-nav-label,
  .enterprise-compact .ops-nav-heading,
  .enterprise-compact .enterprise-exhibit-link span,
  .enterprise-compact .ops-nav-item.active::after { display: none; }
  .enterprise-compact .ops-sidebar nav { padding-inline: 6px; }
  .enterprise-compact .ops-nav-item { justify-content: center; padding-inline: 0; }
  .enterprise-compact .ops-nav-item b { position: absolute; inset: 2px 1px auto auto; padding-inline: 3px; line-height: 1.3; }
  .enterprise-compact .ops-nav-group + .ops-nav-group { border-top: 1px solid var(--gy-sidebar-line); padding-top: 5px; margin-top: 5px; }
  .enterprise-compact .enterprise-sidebar-footer { display: grid; place-content: center; }
  .enterprise-compact .enterprise-exhibit-link { justify-content: center; min-width: 44px; }
}

@media (max-width: 1100px) {
  .enterprise-shell .ops-sidebar { visibility: hidden; }
  .enterprise-shell.ops-nav-open .ops-sidebar { visibility: visible; }
  .enterprise-shell .ops-sidebar .geyao-app-brand { padding-right: 58px; }
  .enterprise-shell .ops-topbar .enterprise-rail-toggle { display: none; }
  .enterprise-shell .ops-nav-item { min-height: 44px; }
  .enterprise-shell .iw-nav-close { min-width: 44px; min-height: 44px; cursor: pointer; }
  .enterprise-shell .ops-nav-scrim { width: 100%; height: 100%; border-radius: 0; }
  .enterprise-shell .ops-topbar { padding-inline: max(12px, calc(var(--enterprise-gutter) - 4px)); }
}

@media (max-width: 760px) {
  .ops-shell.enterprise-shell { --enterprise-gutter: 16px; }
  .enterprise-shell .ops-topbar { height: 58px; min-height: 58px; gap: 4px; }
  .enterprise-shell .ops-breadcrumb { gap: 4px; }
  .enterprise-shell .ops-top-actions { gap: 2px; }
  .enterprise-shell .ops-topbar .ops-search-trigger { width: 44px; min-width: 44px; justify-content: center; padding: 0; }
  .enterprise-shell .ops-topbar .ops-search-trigger > span,
  .enterprise-shell .ops-topbar .ops-search-trigger kbd { display: none; }
  .enterprise-shell .enterprise-account { padding-left: 2px; border: 0; }
  .enterprise-shell .enterprise-account-summary { min-width: 44px; justify-content: center; padding: 0; }
  .enterprise-shell .enterprise-account-info,
  .enterprise-shell .enterprise-account-summary .enterprise-account-chevron { display: none; }
}

@media (max-width: 380px) {
  .enterprise-shell .ops-breadcrumb strong { font-size: 12px; }
  .enterprise-shell .enterprise-preview { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .enterprise-shell .ops-sidebar { transition: none; }
}

.enterprise-shell :is(.primary-btn,.pw-button-primary),
body:has(.enterprise-shell) .modal :is(.primary-btn,.pw-button-primary) {
  background: var(--en-accent);
  color: #fff;
  border-color: var(--en-accent);
}
.enterprise-shell :is(.primary-btn,.pw-button-primary):hover:not(:disabled),
body:has(.enterprise-shell) .modal :is(.primary-btn,.pw-button-primary):hover:not(:disabled) {
  background: var(--brand-strong);
  border-color: var(--brand-strong);
}
.enterprise-shell :is(.secondary-btn,.pw-button:not(.pw-button-primary)):hover:not(:disabled) {
  background: var(--en-accent-wash);
  border-color: var(--enterprise-primary-border);
}
.enterprise-shell :is(.ghost-btn,.pw-button-quiet):hover:not(:disabled) { color: var(--brand-strong); }
.enterprise-shell .pw-workspace { --pw-primary-dark: var(--brand-strong); }
.enterprise-shell .enterprise-chart-switch-button.is-active { color: var(--en-accent); box-shadow: 0 0 0 1px var(--enterprise-primary-border); }
.enterprise-shell .enterprise-chart-bar:not(.is-negative) { background: var(--enterprise-chart-series); }

.enterprise-shell .ops-topbar {
  position: sticky;
  min-block-size: 64px;
  block-size: auto;
  border-bottom-color: var(--enterprise-border);
  box-shadow: 0 1px 3px var(--enterprise-shadow-subtle);
}

.enterprise-shell .ops-breadcrumb strong {
  color: var(--enterprise-text);
  font-size: .9375rem;
  font-weight: 680;
}

.enterprise-shell .ops-search-trigger kbd {
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: .015em;
}

.enterprise-shell .ops-nav-item.active,
.enterprise-shell .ops-nav-item.active:hover {
  border-inline-start: 3px solid var(--enterprise-primary-on-dark);
  padding-inline-start: 7px;
}

.enterprise-shell .ops-search-trigger:focus-visible,
.enterprise-shell .enterprise-account-summary:focus-visible {
  outline: 2px solid var(--enterprise-primary);
  outline-offset: 3px;
}

.enterprise-command {
  inset: 0;
  inline-size: min(36rem, calc(100% - 24px));
  max-inline-size: 100%;
  max-block-size: calc(100dvh - min(9dvh, 72px) - 12px);
  margin: min(9dvh, 72px) auto auto;
  padding: 0;
  border: 1px solid var(--enterprise-border);
  border-radius: 16px;
  color: var(--enterprise-text);
  background: var(--enterprise-surface);
  box-shadow: 0 18px 50px var(--enterprise-shadow-raised);
  overflow: auto;
}

.enterprise-command[open] {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.enterprise-command:modal { overscroll-behavior: contain; }

.enterprise-command::backdrop {
  overflow: hidden;
  overscroll-behavior: contain;
  background: rgb(16 30 52 / 52%);
}

.enterprise-command-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px 4px 16px;
  gap: 8px;
}

.enterprise-command-header h2 {
  margin: 0;
  color: var(--enterprise-text);
  font-size: 1rem;
  font-weight: 650;
}

.enterprise-command-header .ops-icon-button {
  inline-size: 44px;
  block-size: 44px;
  cursor: pointer;
}

.enterprise-command-query {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 16px 6px;
  border-radius: 8px;
  border: 1px solid var(--enterprise-control-border);
  background: var(--enterprise-surface-subtle);
  color: var(--enterprise-primary-icon);
  padding-inline: 10px;
}

.enterprise-command-query:focus-within { outline: 2px solid var(--enterprise-primary); outline-offset: 1px; }

.enterprise-shell .enterprise-command-query #ops-command-input {
  min-inline-size: 0;
  inline-size: 100%;
  block-size: 44px;
  margin: 0;
  padding: 0 4px 0 0;
  color: var(--enterprise-text);
  background: transparent;
  font-size: 1rem;
  border: 0;
  outline: 0;
  box-shadow: none;
}

.enterprise-command #ops-command-results {
  min-block-size: 0;
  max-block-size: 55dvh;
  padding: 6px 12px 10px;
  overflow: auto;
  overscroll-behavior: contain;
}

.enterprise-command #ops-command-results > button {
  min-block-size: 44px;
  padding-inline: 9px;
  color: var(--enterprise-text);
  border-radius: 8px;
}

.enterprise-command #ops-command-results > button:is(:hover, :focus-visible) {
  color: var(--enterprise-text);
  background: var(--enterprise-primary-soft);
  outline-offset: -2px;
}

.enterprise-command #ops-command-results .ops-search-group {
  padding-inline: 8px;
  color: var(--enterprise-text-muted);
  font-weight: 650;
}

.enterprise-command footer {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 14px;
  padding: 10px 16px;
  border-top: 1px solid var(--enterprise-border);
  color: var(--enterprise-text-muted);
  font-size: .75rem;
}

.enterprise-search-status {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (min-width: 1101px) {
  .enterprise-compact .ops-nav-item.active,
  .enterprise-compact .ops-nav-item.active:hover { padding-inline: 0 2px; }
}

@media (pointer: coarse) {
  .enterprise-shell .ops-nav-item { min-block-size: 44px; }
  .enterprise-command footer { display: none; }
}

@media (max-width: 760px) {
  .enterprise-shell .ops-topbar { min-block-size: 56px; }
  .enterprise-shell .ops-breadcrumb strong { font-size: .8125rem; }
}

@media (max-width: 360px) {
  .enterprise-shell .ops-breadcrumb strong { white-space: normal; line-height: 1.33; }
}
