/* Canonical workspace header. Scoped to the mounted shell; legacy/mobile surfaces
   keep their own layout. Important declarations bridge the legacy CSS cascade. */
#vidu-pipeline-dashboard.has-corvion-workspace-header {
  --header-glass: linear-gradient(165deg, rgba(255,255,255,.085), rgba(255,255,255,.025) 48%, rgba(255,255,255,.045));
  --header-edge: rgba(255,255,255,.09);
  --header-shadow: 0 3px 9px rgba(0,0,0,.12), 0 10px 24px rgba(0,0,0,.07), inset 0 1px 0 rgba(255,255,255,.08);
}
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-header-host {
  width: 100% !important; max-width: 100% !important; top: 0 !important;
  padding: 0 !important; margin: 0 0 12px !important;
}
#vidu-pipeline-dashboard.has-corvion-workspace-header .vidu-topbar.corvion-workspace-header {
  display: grid !important; grid-template-columns: minmax(0,1fr) !important;
  grid-template-rows: 48px 42px; gap: 0 !important;
  width: 100% !important; max-width: none !important; min-width: 0;
  padding: 4px 12px 6px !important; margin: 0 !important; top: 0 !important;
  border: 0 !important; border-radius: 0 !important; overflow: visible !important;
  background: transparent !important; box-shadow: none !important;
  backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
}
.corvion-header-primary { display:grid; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr); align-items:center; gap:12px; min-width:0; }
.corvion-header-context { display:flex; align-items:center; justify-content:space-between; gap:16px; min-width:0; }
.corvion-header-identity, .corvion-header-context-start { display:flex; align-items:center; min-width:0; }
.corvion-header-identity { gap:8px; }
.corvion-header-primary > .corvion-header-identity { grid-column:1; grid-row:1; }
.corvion-header-primary > :is(.vidu-dashboard-view-switch,.corvion-header-view-select) { grid-column:2; grid-row:1; }
.corvion-header-primary > .vidu-topbar-actions { grid-column:3 !important; grid-row:1; }
.corvion-header-context-start { flex:1 1 auto; }
/* Keep the shell height stable while revealing contextual controls on desktop. */
@media (hover:hover) and (pointer:fine) {
  .corvion-workspace-header > .corvion-header-primary {
    transform:translateY(var(--header-primary-rest-offset,21px));
    transition:transform 240ms cubic-bezier(.2,.8,.2,1);
  }
  .corvion-workspace-header > .corvion-header-context {
    opacity:0;
    pointer-events:none;
    transform:translateY(-6px);
    transition:opacity 180ms ease,transform 240ms cubic-bezier(.2,.8,.2,1);
  }
  .corvion-workspace-header:is(:hover,[data-header-pointer="true"],:has(input:focus,textarea:focus,details[open],.vidu-topbar-divisions-toggle[aria-expanded='true'],[data-corvion-apps-trigger][aria-expanded='true'],#vidu-topbar-profile-toggle[aria-expanded='true']),[data-header-keyboard='true']:focus-within) > .corvion-header-primary {
    transform:translateY(0);
  }
  .corvion-workspace-header:is(:hover,[data-header-pointer="true"],:has(input:focus,textarea:focus,details[open],.vidu-topbar-divisions-toggle[aria-expanded='true'],[data-corvion-apps-trigger][aria-expanded='true'],#vidu-topbar-profile-toggle[aria-expanded='true']),[data-header-keyboard='true']:focus-within) > .corvion-header-context {
    opacity:1;
    pointer-events:auto;
    transform:translateY(0);
  }
}
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-workspace-header :is(.vidu-topbar-organization-switcher,.vidu-topbar-workspace-switcher,.vidu-topbar-search-field) {
  transform:none !important; height:34px !important; min-height:34px !important; margin:0 !important;
}
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-workspace-header :is(.vidu-topbar-organization-switcher,.vidu-topbar-workspace-switcher) {
  flex:0 1 auto !important; width:auto !important; gap:6px; align-items:center;
}
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-workspace-header .vidu-topbar-organization-switcher {
  display:grid; grid-template-columns:minmax(0,1fr); max-width:180px;
}
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-workspace-header .vidu-topbar-workspace-switcher {
  grid-template-columns:minmax(90px,170px) 28px 28px;
}
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-workspace-header :is(.vidu-topbar-organization-switcher,.vidu-topbar-workspace-switcher,.vidu-topbar-search-field) > label {
  position:absolute !important; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap;
}
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-workspace-header :is(.vidu-topbar-organization-switcher select,.vidu-topbar-workspace-switcher select,.vidu-topbar-search-field input,.vidu-dashboard-view-switch,.vidu-topbar-divisions-toggle,.vidu-lobby-topbar-group),
.corvion-header-overflow > summary, .corvion-header-view-select {
  box-sizing:border-box; height:34px !important; min-height:34px !important;
  border:1px solid var(--header-edge) !important; border-radius:18px !important;
  background:var(--header-glass) !important; box-shadow:var(--header-shadow) !important;
  backdrop-filter:blur(16px) saturate(1.08); -webkit-backdrop-filter:blur(16px) saturate(1.08);
  color:var(--vidu-text-primary, #ededee); font:500 12px/1.2 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
}
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-workspace-header :is(.vidu-topbar-workspace-switcher select,.vidu-topbar-organization-switcher select) {
  width:100%; min-width:0; max-width:100%; text-overflow:ellipsis; padding:0 24px 0 12px !important;
}
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-workspace-header .has-company-logo select { padding-left:36px !important; }
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-workspace-header .vidu-organization-switcher-logo { width:18px !important; height:18px !important; left:11px !important; top:8px !important; bottom:auto !important; }
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-workspace-header .vidu-dashboard-view-switch {
  display:flex !important; flex:none !important; gap:2px; padding:3px !important; margin:0 !important; width:auto !important;
}
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-workspace-header .vidu-dashboard-view-switch::before { display:none !important; }
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-workspace-header .vidu-view-btn {
  height:26px !important; min-height:26px !important; padding:0 14px !important; border:0 !important; border-radius:15px !important;
  background:transparent !important; box-shadow:none !important; color:var(--vidu-text-muted,#b5b5bc) !important; font:500 12px/1 -apple-system,BlinkMacSystemFont,sans-serif; white-space:nowrap;
}
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-workspace-header .vidu-view-btn.is-active {
  background:linear-gradient(rgba(255,255,255,.22),rgba(255,255,255,.12)) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 2px 5px rgba(0,0,0,.1) !important;
  color:var(--vidu-text-primary,#fff) !important;
}
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-workspace-header .vidu-topbar-actions {
  display:flex !important; justify-content:flex-end !important; align-items:center; gap:6px !important;
  grid-column:3 !important; width:auto !important; min-width:0; margin:0 !important; padding:0 !important;
  flex:none !important; overflow:visible !important; position:relative;
}
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-workspace-header :is(.vidu-topbar-icon-btn,.vidu-topbar-avatar-btn) { width:32px !important; height:32px !important; min-width:32px !important; min-height:32px !important; padding:6px !important; }
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-workspace-header .vidu-topbar-avatar-btn { padding:0 !important; }
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-workspace-header .vidu-topbar-icon-btn svg { width:18px !important; height:18px !important; }
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-workspace-header .vidu-topbar-filters {
  display:grid; grid-template-columns:minmax(0,1fr) 34px !important; flex:0 1 340px !important;
  width:auto !important; min-width:150px; gap:8px !important; margin:0 !important;
}
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-workspace-header .vidu-topbar-search-field input { width:100%; padding:0 12px !important; }
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-workspace-header .vidu-detail-filters > summary { width:34px !important; min-width:34px !important; height:34px !important; min-height:34px !important; }
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-workspace-header .vidu-detail-filters > summary:has([data-detail-filter-count]) > :is(svg,span) { display:none !important; }
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-workspace-header .vidu-detail-filters > summary strong[data-detail-filter-count] {
  display:grid; place-items:center; padding:0; margin:0; min-width:0;
  background:transparent; border:0; box-shadow:none; color:inherit;
  font:600 13px/1 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  font-variant-numeric:tabular-nums;
}
/* Permission hiding always wins; hover is a separate presentation state. */
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-workspace-header [hidden] { display:none !important; }
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-workspace-header :is(.vidu-workspace-switcher-edit,.vidu-workspace-switcher-delete) {
  width:28px !important; min-width:28px !important; height:32px !important; border:0 !important; background:transparent !important; box-shadow:none !important;
  opacity:0; pointer-events:none; transform:translate(-6px,3px);
  transition:opacity 190ms ease 100ms,transform 210ms cubic-bezier(.2,.8,.2,1) 100ms;
}
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-workspace-header .vidu-topbar-workspace-switcher:is(:hover,:focus-within,[data-workspace-pointer]) :is(.vidu-workspace-switcher-edit,.vidu-workspace-switcher-delete) {
  opacity:.85; pointer-events:auto; transform:translate(0,0); transition-delay:0s;
}
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-workspace-header :is(button,select,input,summary):focus-visible { outline:2px solid var(--vidu-text-primary,#ddd) !important; outline-offset:3px !important; }
.corvion-header-overflow { position:relative; display:none; }
.corvion-header-overflow > summary { display:grid; place-items:center; width:34px; list-style:none; cursor:pointer; }
.corvion-header-overflow > summary::-webkit-details-marker { display:none; }
.corvion-header-overflow-panel { position:absolute; top:calc(100% + 8px); right:0; width:200px; max-width:calc(100vw - 24px); max-height:calc(100dvh - 110px); overflow:auto; padding:6px; border:1px solid var(--header-edge); border-radius:14px; background:var(--vidu-surface-2,#222326); box-shadow:0 12px 30px #0005; z-index:100; }
.corvion-header-overflow-panel button { display:block; width:100%; text-align:left; border:0; border-radius:8px; padding:10px; background:transparent; color:var(--vidu-text-primary,#eee); font:inherit; cursor:pointer; }
.corvion-header-overflow-panel button:hover { background:#8882; }
.corvion-header-view-select { display:none; width:110px; padding:0 10px; }
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-workspace-header :is(.vidu-detail-filter-panel,.vidu-topbar-divisions-menu,.vidu-profile-dropdown,.corvion-app-launcher-panel) { max-width:calc(100vw - 24px) !important; max-height:calc(100dvh - 120px) !important; overflow-y:auto; }
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-workspace-header .vidu-lobby-topbar-group { gap:5px; margin:0 !important; padding:0 6px !important; }
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-workspace-header .vidu-lobby-topbar-group button { width:28px; height:28px; min-width:28px; }
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-workspace-header .vidu-lobby-topbar-view { min-width:80px; max-width:180px; }
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-workspace-header .vidu-lobby-topbar-divider { display:none; }
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-workspace-header[data-header-size='compact'] .corvion-header-secondary-action,
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-workspace-header[data-header-size='small'] .corvion-header-secondary-action { display:none !important; }
.corvion-workspace-header:is([data-header-size='compact'],[data-header-size='small']) .corvion-header-overflow:not([hidden]) { display:block; }
.corvion-workspace-header:is([data-header-size='compact'],[data-header-size='small']) [data-header-divisions-toggle] > :not(.vidu-topbar-divisions-icon) { display:none; }
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-workspace-header:is([data-header-size='compact'],[data-header-size='small']) .vidu-topbar-divisions-toggle { width:34px; padding:6px !important; }
.corvion-workspace-header[data-header-size='small'] .corvion-header-primary { grid-template-columns:minmax(0,1fr) auto auto; gap:6px; }
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-workspace-header[data-header-size='small'] .vidu-dashboard-view-switch { display:none !important; }
.corvion-workspace-header[data-header-size='small'] .corvion-header-view-select { display:block; }
.corvion-workspace-header[data-header-size='small'] .corvion-header-context { gap:6px; }
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-workspace-header[data-header-size='small'] .vidu-topbar-workspace-switcher { grid-template-columns:minmax(62px,100px) 22px 22px; gap:2px; }
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-workspace-header[data-header-size='small'] .vidu-topbar-filters { flex-basis:180px !important; min-width:100px; gap:4px !important; }
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-workspace-header[data-header-size='small'] .vidu-topbar-organization-switcher { max-width:100px; }
@media (hover:none) {
  #vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-workspace-header :is(.vidu-workspace-switcher-edit,.vidu-workspace-switcher-delete) { opacity:.85; pointer-events:auto; transform:none; }
}
@media (prefers-reduced-motion:reduce) {
  #vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-workspace-header * { transition:none !important; animation:none !important; }
}
@media (prefers-reduced-transparency:reduce) {
  #vidu-pipeline-dashboard.has-corvion-workspace-header { --header-glass:var(--vidu-surface-2,#26272a); }
  .corvion-workspace-header * { backdrop-filter:none !important; -webkit-backdrop-filter:none !important; }
}
[data-vidu-theme='light'] #vidu-pipeline-dashboard.has-corvion-workspace-header,
#vidu-pipeline-dashboard.has-corvion-workspace-header[data-vidu-theme='light'] {
  --header-glass:linear-gradient(160deg,rgba(255,255,255,.85),rgba(255,255,255,.55)); --header-edge:rgba(0,0,0,.08);
  --header-shadow:0 3px 12px #0000000a,inset 0 1px 0 #ffffffb3;
}
/* A narrow mouse window is still desktop; preserve the dedicated touch shell. */
@media (max-width:767px) and (hover:none) and (pointer:coarse) {
  #vidu-pipeline-dashboard.has-corvion-workspace-header .vidu-topbar.corvion-workspace-header { display:none !important; }
}
/* Integrate only the main desktop workspace, never detached application titlebars. */
html.corvion-native-chrome[data-corvion-window-kind='corvion'] .corvion-workspace-header { -webkit-app-region:drag; }
html.corvion-native-chrome[data-corvion-window-kind='corvion'] .corvion-header-primary { padding-left:0; -webkit-app-region:drag; }
/* Reserve a short strip above the controls instead of indenting their left edge. */
html.corvion-native-chrome[data-corvion-window-kind='corvion'][data-corvion-window-platform='darwin']:not([data-corvion-window-fullscreen='true']) #vidu-pipeline-dashboard.has-corvion-workspace-header .vidu-topbar.corvion-workspace-header {
  padding-top:34px !important;
  --header-primary-rest-offset:7px;
}
html.corvion-native-chrome[data-corvion-window-kind='corvion'][data-corvion-window-fullscreen='true'] .corvion-header-context { padding-left:0; }
html.corvion-native-chrome[data-corvion-window-kind='corvion'][data-corvion-window-fullscreen='true'] .corvion-header-primary { padding-left:0; }
html.corvion-native-chrome[data-corvion-window-kind='corvion'] corvion-window-header[data-appearance='frameless'] { pointer-events:none; }
.corvion-workspace-header :is(button,input,select,summary,a,details) { -webkit-app-region:no-drag; }
/* Upper-row menus must paint above the translucent contextual controls. */
#vidu-pipeline-dashboard .corvion-workspace-header > .corvion-header-primary { position:relative; z-index:3; }
#vidu-pipeline-dashboard .corvion-workspace-header > .corvion-header-context { position:relative; z-index:2; }
html.corvion-native-chrome[data-corvion-window-kind='corvion'] #vidu-pipeline-dashboard.has-corvion-workspace-header { padding-top:0 !important; }
html.corvion-native-chrome[data-corvion-window-kind='corvion']:has(.corvion-workspace-header) #corvion-desktop-drag-region { display:none !important; }
html.corvion-native-chrome[data-corvion-window-kind='corvion']:has(.corvion-workspace-header) corvion-window-header[data-appearance='frameless'] { display:none !important; }

/* The popover fields keep their labels and spacing independently of the toolbar. */
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-workspace-header .vidu-detail-filter-panel {
  box-sizing:border-box; width:min(420px,calc(100vw - 32px)); padding:18px; gap:16px 12px;
  grid-template-columns:repeat(2,minmax(0,1fr)); border-color:var(--header-edge); border-radius:18px;
  font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
}
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-workspace-header .vidu-detail-filter-panel .vidu-field {
  display:grid; grid-template-columns:minmax(0,1fr); gap:7px; width:auto!important;
  height:auto!important; min-height:0!important; margin:0!important; transform:none!important;
}
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-workspace-header .vidu-detail-filter-panel .vidu-field > label {
  position:static!important; width:auto; height:auto; margin:0; padding:0 2px; clip-path:none;
  font-size:11px; font-weight:500; letter-spacing:0; text-transform:none;
}
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-workspace-header .vidu-detail-filter-panel :is(input,select) {
  box-sizing:border-box; width:100%; height:38px!important; min-height:38px!important;
  padding:0 10px!important; border:1px solid var(--header-edge); border-radius:10px;
  background:var(--vidu-control-bg); color:var(--vidu-text-primary); font:500 12px/1.3 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
}
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-workspace-header .vidu-detail-filter-panel .vidu-filter-actions {
  grid-column:1/-1; display:flex; justify-content:flex-end; width:auto!important;
  padding-top:12px; margin:0; border-top:1px solid var(--header-edge);
}
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-workspace-header .vidu-detail-filter-reset {
  min-height:34px; border-radius:17px; font-size:11px;
}

/* Header popovers share the profile menu's neutral surface and quiet hierarchy. */
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-workspace-header {
  --header-menu-surface:#181818;
  --header-menu-control:rgba(255,255,255,.035);
  --header-menu-muted:#888;
}
html[data-vidu-theme="light"] #vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-workspace-header,
#vidu-pipeline-dashboard.has-corvion-workspace-header[data-vidu-theme="light"] .corvion-workspace-header {
  --header-menu-surface:#f7f7f7;
  --header-menu-control:rgba(0,0,0,.035);
  --header-menu-muted:#707070;
}
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-workspace-header :is(.corvion-app-launcher-panel,.vidu-detail-filter-panel,.vidu-topbar-divisions-menu) {
  background:linear-gradient(180deg,rgba(255,255,255,.025),transparent),var(--header-menu-surface);
  border:1px solid var(--header-edge); border-radius:18px;
  box-shadow:var(--vidu-depth-focus,0 16px 44px rgba(0,0,0,.32));
  backdrop-filter:blur(22px); -webkit-backdrop-filter:blur(22px);
  color:var(--vidu-text-primary);
}
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-app-launcher-panel > header {
  padding:0 8px 8px;
}
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-app-launcher-panel > header strong,
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-workspace-header .vidu-detail-filter-panel .vidu-field > label {
  color:var(--header-menu-muted); font-size:9px; font-weight:760;
  letter-spacing:.1em; line-height:1.4; text-transform:uppercase;
}
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-app-launcher-panel > header small { display:none; }
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-app-launcher-open {
  grid-template-columns:34px minmax(0,1fr); min-height:58px; gap:10px;
  color:var(--vidu-text-primary); border:0; padding-left:8px;
}
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-app-launcher-icon {
  width:34px; height:34px; border:0; border-radius:0; background:none; box-shadow:none;
  color:color-mix(in srgb,var(--header-app-color,#77bfa1) 80%,#fff);
}
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-app-launcher-icon svg { width:27px; height:27px; }
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-app-launcher-icon img {
  display:block; width:34px; height:34px; object-fit:contain; border:0; background:none; box-shadow:none;
}
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-app-launcher-open:is(:hover,:focus-visible) {
  background:var(--header-menu-control); color:var(--vidu-text-primary); transform:none;
}
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-app-launcher-open:focus-visible {
  outline:2px solid var(--header-app-color,#77bfa1); outline-offset:-2px;
}
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-workspace-header .vidu-detail-filter-panel :is(input,select) {
  background:var(--header-menu-control); border-color:var(--header-edge);
}
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-workspace-header .vidu-detail-filter-reset {
  background:transparent; border-color:transparent; box-shadow:none; color:var(--vidu-text-secondary);
}
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-workspace-header .vidu-detail-filter-reset svg { width:22px; height:22px; }
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-workspace-header .vidu-detail-filter-reset:hover { background:var(--header-menu-control); }

/* A short, top-to-bottom entrance; each icon travels with its menu item. */
@keyframes corvion-header-menu-item-in {
  from { opacity:0; translate:0 4px; scale:.985; }
  to { opacity:1; translate:0 0; scale:1; }
}
@media (prefers-reduced-motion:no-preference) {
  #vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-workspace-header :is(
    .corvion-app-launcher-panel:not([hidden]) .corvion-app-launcher-item,
    .vidu-topbar-divisions-menu:not([hidden]) > button,
    .vidu-profile-dropdown:not([hidden]) .vidu-profile-menu-item,
    .vidu-detail-filters[open] .vidu-detail-filter-panel > .vidu-field,
    .vidu-detail-filters[open] .vidu-detail-filter-panel > .vidu-filter-actions
  ) {
    animation:corvion-header-menu-item-in 240ms cubic-bezier(.2,.7,.25,1) both;
    animation-delay:calc(var(--menu-group-delay,0ms) + var(--menu-item-delay,0ms));
    transform-origin:center;
  }
  .corvion-workspace-header .vidu-topbar-divisions-menu > button:nth-child(1),
  .corvion-workspace-header .vidu-profile-menu-item:nth-child(1) { --menu-item-delay:0ms; }
  .corvion-workspace-header .vidu-topbar-divisions-menu > button:nth-child(2),
  .corvion-workspace-header .vidu-profile-menu-item:nth-child(2) { --menu-item-delay:24ms; }
  .corvion-workspace-header .vidu-topbar-divisions-menu > button:nth-child(3),
  .corvion-workspace-header .vidu-profile-menu-item:nth-child(3) { --menu-item-delay:48ms; }
  .corvion-workspace-header .vidu-topbar-divisions-menu > button:nth-child(4),
  .corvion-workspace-header .vidu-profile-menu-item:nth-child(4) { --menu-item-delay:72ms; }
  .corvion-workspace-header .vidu-topbar-divisions-menu > button:nth-child(5),
  .corvion-workspace-header .vidu-profile-menu-item:nth-child(5) { --menu-item-delay:96ms; }
  .corvion-workspace-header .vidu-topbar-divisions-menu > button:nth-child(6),
  .corvion-workspace-header .vidu-profile-menu-item:nth-child(6) { --menu-item-delay:120ms; }
  .corvion-workspace-header .vidu-topbar-divisions-menu > button:nth-child(7),
  .corvion-workspace-header .vidu-profile-menu-item:nth-child(7) { --menu-item-delay:144ms; }
  .corvion-workspace-header .vidu-topbar-divisions-menu > button:nth-child(8),
  .corvion-workspace-header .vidu-profile-menu-item:nth-child(8) { --menu-item-delay:168ms; }
  .corvion-workspace-header .vidu-topbar-divisions-menu > button:nth-child(9),
  .corvion-workspace-header .vidu-profile-menu-item:nth-child(9) { --menu-item-delay:192ms; }
  .corvion-workspace-header .vidu-topbar-divisions-menu > button:nth-child(10),
  .corvion-workspace-header .vidu-profile-menu-item:nth-child(10) { --menu-item-delay:216ms; }
  .corvion-workspace-header .vidu-topbar-divisions-menu > button:nth-child(11),
  .corvion-workspace-header .vidu-profile-menu-item:nth-child(11) { --menu-item-delay:240ms; }
  .corvion-workspace-header .vidu-topbar-divisions-menu > button:nth-child(12),
  .corvion-workspace-header .vidu-profile-menu-item:nth-child(12) { --menu-item-delay:264ms; }
  .corvion-workspace-header .vidu-topbar-divisions-menu > button:nth-child(13),
  .corvion-workspace-header .vidu-profile-menu-item:nth-child(13) { --menu-item-delay:288ms; }
  .corvion-workspace-header .vidu-topbar-divisions-menu > button:nth-child(14),
  .corvion-workspace-header .vidu-profile-menu-item:nth-child(14) { --menu-item-delay:312ms; }
  .corvion-workspace-header .vidu-topbar-divisions-menu > button:nth-child(15),
  .corvion-workspace-header .vidu-profile-menu-item:nth-child(15) { --menu-item-delay:336ms; }
  .corvion-workspace-header .corvion-app-launcher-item:nth-child(1),
  .corvion-workspace-header .vidu-detail-filter-panel > :nth-child(1) { --menu-item-delay:0ms; }
  .corvion-workspace-header .corvion-app-launcher-item:nth-child(2),
  .corvion-workspace-header .vidu-detail-filter-panel > :nth-child(2) { --menu-item-delay:0ms; }
  .corvion-workspace-header .corvion-app-launcher-item:nth-child(3),
  .corvion-workspace-header .vidu-detail-filter-panel > :nth-child(3) { --menu-item-delay:38ms; }
  .corvion-workspace-header .corvion-app-launcher-item:nth-child(4),
  .corvion-workspace-header .vidu-detail-filter-panel > :nth-child(4) { --menu-item-delay:38ms; }
  .corvion-workspace-header .corvion-app-launcher-item:nth-child(5),
  .corvion-workspace-header .vidu-detail-filter-panel > :nth-child(5) { --menu-item-delay:76ms; }
  .corvion-workspace-header .corvion-app-launcher-item:nth-child(6),
  .corvion-workspace-header .vidu-detail-filter-panel > :nth-child(6) { --menu-item-delay:76ms; }
  .corvion-workspace-header .corvion-app-launcher-item:nth-child(7),
  .corvion-workspace-header .vidu-detail-filter-panel > :nth-child(7) { --menu-item-delay:114ms; }
  .corvion-workspace-header .corvion-app-launcher-item:nth-child(8),
  .corvion-workspace-header .vidu-detail-filter-panel > :nth-child(8) { --menu-item-delay:114ms; }
  .corvion-workspace-header .vidu-profile-menu-group:nth-child(2) { --menu-group-delay:95ms; }
  .corvion-workspace-header .vidu-profile-menu-group:nth-child(3) { --menu-group-delay:190ms; }
  .corvion-workspace-header .vidu-profile-menu-group:nth-child(4) { --menu-group-delay:285ms; }
  .corvion-workspace-header .vidu-profile-menu-group:nth-child(5) { --menu-group-delay:380ms; }
}

/* Icon launcher: names appear on hover/focus without shifting the grid. */
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-workspace-header .corvion-app-launcher-panel {
  width:min(430px,calc(100vw - 24px)); padding:16px 14px 8px;
}
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-app-launcher-grid {
  grid-template-columns:repeat(5,minmax(0,1fr)); gap:4px 6px;
}
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-app-launcher-item {
  min-width:0; height:94px;
}
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-app-launcher-open {
  display:grid; grid-template-columns:1fr; place-items:center; gap:0;
  height:62px; min-height:62px; padding:6px; border-radius:14px;
}
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-app-launcher-icon,
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-app-launcher-icon img {
  width:48px; height:48px;
}
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-app-launcher-open > span:last-child {
  position:absolute; top:65px; left:50%; translate:-50% 0; width:calc(100% + 10px); max-width:none; box-sizing:border-box;
  padding:3px 6px; border-radius:6px; background:var(--header-menu-surface);
  color:var(--vidu-text-secondary); font-size:10px; font-weight:500; line-height:1.3;
  text-align:center; white-space:normal; overflow:visible; opacity:0; pointer-events:none;
  transition:opacity 140ms ease; z-index:3;
}
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-app-launcher-item:is(:hover,:focus-within) .corvion-app-launcher-open > span:last-child { opacity:1; }
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-app-launcher-detach {
  top:0; right:0; width:22px; height:22px; border-radius:7px;
  transform:none!important; background:var(--header-menu-surface); opacity:0; pointer-events:none;
}
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-app-launcher-detach svg { width:13px; height:13px; }
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-app-launcher-detach:is(:hover,:focus-visible) { transform:none!important; }
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-app-launcher-item:is(:hover,:focus-within) .corvion-app-launcher-detach { opacity:1; pointer-events:auto; }
#vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-app-launcher-open.has-unread::after { top:0; left:auto; right:4px; }
.corvion-workspace-header .corvion-app-launcher-item:nth-child(-n+5) { --menu-item-delay:0ms; }
.corvion-workspace-header .corvion-app-launcher-item:nth-child(n+6) { --menu-item-delay:38ms; }

/* Small windows keep usable icon targets instead of squeezing five columns. */
@media (max-width:600px) {
  #vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-workspace-header .corvion-app-launcher-panel { width:min(300px,calc(100vw - 24px)); }
  #vidu-pipeline-dashboard.has-corvion-workspace-header .corvion-app-launcher-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .corvion-workspace-header .corvion-app-launcher-item:nth-child(-n+3) { --menu-item-delay:0ms; }
  .corvion-workspace-header .corvion-app-launcher-item:nth-child(n+4) { --menu-item-delay:38ms; }
  .corvion-workspace-header .corvion-app-launcher-item:nth-child(n+7) { --menu-item-delay:76ms; }
  .corvion-workspace-header .corvion-app-launcher-item:nth-child(n+10) { --menu-item-delay:114ms; }
}
