
/* Sidebar V7: película translúcida, borda de luz e reação ao ponteiro. */
html[data-product-visual] aside[data-pui-glass="v5"] {
  background: radial-gradient(ellipse at var(--glass-x, 18%) var(--glass-y, 8%), #ffffff38, transparent 53%),
    linear-gradient(168deg, color-mix(in srgb, var(--pui-nav-surface) 78%, transparent),
      color-mix(in srgb, var(--pui-nav-surface) 62%, transparent)) !important;
  backdrop-filter: blur(22px) saturate(155%);
  -webkit-backdrop-filter: blur(22px) saturate(155%);
  border-color: #ffffff60;
  box-shadow: inset 0 1px 1px #ffffff80, inset 0 -1px 1px #ffffff25, 0 14px 35px #10203632 !important;
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  aside[data-pui-glass] :is(a,button)[data-pui-icon]::before { transition: transform 220ms cubic-bezier(.2,.75,.3,1.25); }
  aside[data-pui-glass] :is(a,button)[data-pui-icon]:is(:hover,:focus-visible)::before { transform: translateY(-2px) scale(1.08); }
}
@media (prefers-reduced-transparency: reduce) {
  html[data-product-visual] aside[data-pui-glass="v5"] {
    background: var(--pui-nav-surface) !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* Usa a barra nativa mesmo enquanto o perfil visual está carregando. */
[data-brand="vcm"] aside.product-navigation {
  --v7-menu-ink: #f3f8ff;
  color: var(--v7-menu-ink);
  background: radial-gradient(ellipse at var(--glass-x, 12%) var(--glass-y, 8%), #e3f5ff4d, transparent 48%),
    linear-gradient(155deg, #274667b8, #10273ed9 54%, #345c43b3) !important;
  border: 1px solid #e5f3ff80;
  border-radius: 24px;
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  box-shadow: inset 0 1px #ffffff80, 0 12px 36px #142b4938 !important;
}
@media (prefers-reduced-transparency: reduce) {
  [data-brand="vcm"] aside.product-navigation {
    background: #18324c !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* A cor de fundo atravessa a barra. A placa antiga cobria esse fundo. */
[data-brand="vcm"]:has(> aside.product-navigation) {
  background-image: radial-gradient(ellipse at 3% 17%, #7898ad 0%, transparent 38%),
    radial-gradient(ellipse at 10% 78%, #8eae79 0%, transparent 37%);
  background-attachment: fixed;
}
[data-brand="vcm"] #pui-glass-backdrop { display: none !important; }
html [data-brand="vcm"] aside.product-navigation {
  background: radial-gradient(ellipse at var(--glass-x, 12%) var(--glass-y, 8%), #e3f5ff40, transparent 50%),
    linear-gradient(155deg, #102a488c, #10273ebd 53%, #254c3896) !important;
  color: #f3f8ff;
}
@media (prefers-reduced-transparency: reduce) {
  html [data-brand="vcm"] aside.product-navigation { background: #18324c !important; }
}

/* As duas famílias de ícones da barra respondem ao mesmo movimento. */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  [data-brand="vcm"] aside.product-navigation a[data-v7-moving]::before,
  [data-brand="vcm"] aside.product-navigation a[data-v7-moving] > :is(.product-nav-icon,.product-calendar-glyph) {
    transform: scale(var(--v7-scale, 1)) !important;
    transition: transform 230ms cubic-bezier(.18,.8,.32,1.2);
  }
}
.v7-menu-label {
  position: fixed;
  z-index: 1000;
  pointer-events: none;
  transform: translateY(-50%);
  transition: top 160ms cubic-bezier(.2,.75,.3,1);
  color: #172d43;
  background: #f5f9ffeb;
  border: 1px solid #fff;
  box-shadow: 0 4px 14px #10273e38;
  padding: .3rem .7rem;
  border-radius: .6rem;
  font: 600 .75rem/1.25 system-ui, sans-serif;
}
.v7-menu-label[hidden] { display: none; }

/* Voando: composição em camadas inspirada no Dashboard V30. */
[data-brand="vcm"] main[data-pui-admin] {
  --v30-ink: #20334b;
  --v30-glass: linear-gradient(145deg, #ffffffad, #ffffff45);
  border-radius: 24px;
  background: radial-gradient(ellipse at 88% 8%, #acd49c8c, transparent 52%),
    radial-gradient(ellipse at 12% 38%, #aac7e2a6, transparent 56%), #edf2f7 !important;
}
html[data-product-visual="voando"] [data-brand="vcm"] main[data-pui-admin]
  :is([data-pui-admin-card], .pui-admin-panel, .crm-glass) {
  background: var(--v30-glass) !important;
  color: var(--v30-ink);
  border: 1px solid #ffffffbf;
  backdrop-filter: blur(22px) saturate(145%);
  box-shadow: inset 0 1px #fff, 0 8px 23px #24416024 !important;
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  [data-brand="vcm"] main[data-pui-admin] :is([data-pui-admin-card], .pui-admin-panel, .crm-glass) {
    transition: translate .22s ease-out, box-shadow .22s ease-out;
  }
  [data-brand="vcm"] main[data-pui-admin] :is([data-pui-admin-card], .pui-admin-panel, .crm-glass):is(:hover,:focus-within) {
    translate: 0 -5px;
    box-shadow: inset 0 1px #fff, 0 14px 30px #24416035 !important;
  }
}
@media (prefers-reduced-transparency: reduce) {
  html[data-product-visual="voando"] [data-brand="vcm"] main[data-pui-admin]
    :is([data-pui-admin-card], .pui-admin-panel, .crm-glass) {
    background: #fff !important;
    backdrop-filter: none;
  }
}

/* Visão Geral: os cartões nativos existem antes do carregamento do perfil. */
[data-brand="vcm"] .vcm-home-type {
  position: relative;
  isolation: isolate;
}
[data-brand="vcm"] .vcm-home-type::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: 1.5rem;
  pointer-events: none;
  background: radial-gradient(ellipse at 82% 8%, #99c881c9, transparent 49%),
    radial-gradient(ellipse at 10% 25%, #90b5d9b8, transparent 52%);
}
html [data-brand="vcm"] .vcm-home-type :is(section.crm-glass, .grid > .bg-card, .grid > a > .bg-card) {
  background: linear-gradient(145deg, #ffffffb3, #ffffff50) !important;
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
  box-shadow: inset 0 1px 1px #fff, inset 0 -1px #48648226, 0 9px 22px #28436230 !important;
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  html [data-brand="vcm"] .vcm-home-type :is(section.crm-glass, .grid > .bg-card, .grid > a > .bg-card) {
    transition: translate 220ms ease-out, box-shadow 220ms ease-out;
  }
  html [data-brand="vcm"] .vcm-home-type :is(section.crm-glass, .grid > .bg-card, .grid > a > .bg-card):is(:hover,:focus-within) {
    translate: 0 -5px;
    box-shadow: inset 0 1px 1px #fff, inset 0 -1px #48648226, 0 16px 30px #28436249 !important;
  }
}
@media (prefers-reduced-transparency: reduce), (forced-colors: active) {
  [data-brand="vcm"] .vcm-home-type::before { display: none; }
  html [data-brand="vcm"] .vcm-home-type :is(section.crm-glass, .grid > .bg-card, .grid > a > .bg-card) {
    background: var(--color-card, #fff) !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}


/* Neutral glass uses one continuous background under the dashboard. */
html [data-brand="vcm"] main:has(.vcm-home-type) {
  background: radial-gradient(ellipse at 20% 5%, #c1ceda, transparent 60%),
    radial-gradient(ellipse at 95% 25%, #d5ddd7, transparent 56%), #e5e9ee !important;
}
[data-brand="vcm"] .vcm-home-type::before { display: none; }
[data-brand="vcm"] .vcm-home-type > :first-child {
  min-width: 0;
  padding: clamp(12px, 2vw, 24px);
  overflow-wrap: anywhere;
}
html [data-brand="vcm"] .vcm-home-type :is(section.crm-glass, .grid > .bg-card, .grid > a > .bg-card) {
  background: linear-gradient(145deg, #ffffffe0, #f3f6f785) !important;
  border: 1px solid #ffffffb0;
  box-shadow: inset 0 1px #fff, 0 8px 24px #31465a22 !important;
}
[data-brand="vcm"] .vcm-home-type [class*="text-[#8a93a3]"] { color: #50647a; }
@media (prefers-reduced-transparency: reduce), (forced-colors: active) {
  html [data-brand="vcm"] .vcm-home-type :is(section.crm-glass, .grid > .bg-card, .grid > a > .bg-card) {
    background: Canvas !important;
  }
}

@media (prefers-reduced-motion: no-preference) {
  #pui-group-flyout { animation: v7-submenu-in 200ms cubic-bezier(.2,.75,.3,1) both; }
  @keyframes v7-submenu-in {
    from { opacity: 0; translate: -8px 0; }
    to { opacity: 1; translate: 0 0; }
  }
}

/* The workspace frame owns the glass. The heading sits inside its padding. */
html[data-product-visual="voando"] [data-brand="vcm"] main:has(.vcm-home-type) {
  background: radial-gradient(ellipse at 14% 12%, #b7c5d4, transparent 55%),
    radial-gradient(ellipse at 92% 48%, #c1cdc5, transparent 55%), #dce2e7 !important;
}
[data-brand="vcm"] .vcm-home-type {
  padding: clamp(14px, 2.5vw, 28px);
  border: 1px solid #ffffffa6;
  border-radius: 24px;
  background: #ffffff29;
  backdrop-filter: blur(20px) saturate(1.35);
}
[data-brand="vcm"] .vcm-home-type > :first-child { padding: 0; }
[data-brand="vcm"] .vcm-home-type h1 { overflow-wrap: anywhere; }
html [data-brand="vcm"] .vcm-home-type :is(section.crm-glass, .grid > .bg-card, .grid > a > .bg-card) {
  background: linear-gradient(145deg, #ffffff96, #ffffff45) !important;
}
@media (prefers-reduced-motion: no-preference) {
  :is(.vcm-home-type, .voando-haven-frame) [data-v30-entrance] {
    transform-box: view-box;
    animation: v30-chart-enter 690ms cubic-bezier(.2,.72,.24,1) both;
  }
  @keyframes v30-chart-enter {
    from { clip-path: inset(100% 0 0); }
    to { clip-path: inset(0); }
  }
}
@media (prefers-reduced-transparency: reduce), (forced-colors: active) {
  [data-brand="vcm"] .vcm-home-type { background: Canvas; backdrop-filter: none; }
  html [data-brand="vcm"] .vcm-home-type :is(section.crm-glass, .grid > .bg-card, .grid > a > .bg-card) {
    background: Canvas !important;
  }
}

/* Keep the inline branch tree out of the compact rail; the flyout owns it. */
@media (min-width: 768px) {
  aside[data-voando-dock][data-pui-rail] .dsf-nav-parent + div:has(> .is-nested),
  aside[data-voando-dock][data-pui-rail] .dsf-nav-parent + div:has(> [data-pui-leaf="nested"]) {
    display: none;
  }
  aside[data-voando-dock][data-pui-rail] .dsf-nav-parent-link {
    justify-items: center;
    min-width: 0;
    box-sizing: border-box;
  }
}

/* Match the native Haven backdrop on the live Voando release. */
html [data-brand="vcm"] main:has(.voando-haven-frame) {
  background:
    radial-gradient(ellipse at 24% 4%, #d8eaff 0%, transparent 58%),
    radial-gradient(ellipse at 96% 28%, #e5f0da 0%, transparent 46%),
    linear-gradient(145deg, #eef7ff 0%, #f7fbff 56%, #eef4e9 100%);
}
@media (prefers-reduced-transparency: reduce), (forced-colors: active) {
  html [data-brand="vcm"] main:has(.voando-haven-frame) { background: Canvas; }
}

/* Brand watermark sits behind the glass and never intercepts the pointer. */
.voando-haven-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: url("/brand/vcm/logo-3d-menu-transparent-v1.webp") right 5% top 105px / clamp(150px, 32vw, 490px) auto no-repeat;
  opacity: .09;
  pointer-events: none;
}
@media (prefers-reduced-transparency: reduce), (forced-colors: active) {
  .voando-haven-frame::after { display: none; }
}

/* No celular, mantém a marca e os ícones com superfícies de composição simples. */
@media (max-width: 767px) {
  [data-brand="vcm"]:has(> aside.product-navigation) {
    background-attachment: scroll;
  }
  html[data-product-visual] [data-brand="vcm"] aside.product-navigation,
  html [data-brand="vcm"] aside.product-navigation {
    background: linear-gradient(155deg, #1c3b58, #10273e 54%, #294b3a) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transition-duration: 0ms !important;
  }
  [data-brand="vcm"] aside.product-navigation :is(a, button),
  [data-brand="vcm"] header button[data-pui-native-toggle] {
    touch-action: manipulation;
  }
  [data-brand="vcm"] .vcm-home-type,
  [data-brand="vcm"] .voando-haven-frame::before,
  [data-brand="vcm"] :is(.vcm-home-type, .voando-haven-frame) :is(section.crm-glass, .grid > .bg-card, .grid > a > .bg-card) {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  [data-brand="vcm"] .voando-haven-frame > :nth-child(-n + 5),
  [data-brand="vcm"] :is(.vcm-home-type, .voando-haven-frame) [data-v30-entrance] {
    animation: none !important;
  }
}


/* O menu aberto fica acima do Fly e dos avisos flutuantes (z-index 120). */
@media (max-width: 767px) {
  [data-brand="vcm"] > button[aria-label="Fechar menu"] {
    z-index: 121;
  }

  [data-brand="vcm"]:has(> button[aria-label="Fechar menu"]) > aside.product-navigation {
    z-index: 122 !important;
  }
}
