.vl3d {
  --k: 1;
  --d: 12px;
  position: relative;
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  margin: calc(60px * (var(--k) - 1));
  perspective: 900px;
  transform: scale(var(--k));
  filter: drop-shadow(0 18px 28px rgba(95, 174, 126, 0.28));
}
[data-vl3d="lg"] { --k: 1.6; }
[data-vl3d="md"] { --k: 0.85; }
[data-vl3d="sm"] { --k: 0.5; }
[data-vl3d="xs"] { --k: 0.19; }

.vl3d-scene {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform: rotateX(56deg) rotateZ(-40deg);
  animation: vlSway 6s ease-in-out infinite alternate;
}

@keyframes vlSway {
  from { transform: rotateX(56deg) rotateZ(-54deg); }
  to   { transform: rotateX(56deg) rotateZ(-26deg); }
}

.vl3d-pos { position: absolute; transform-style: preserve-3d; }

.vl3d-box {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  animation: vlPop 2s var(--vl-ease, cubic-bezier(0.2, 0, 0, 1)) infinite;
  animation-delay: calc(var(--i) * 0.14s);
}

.vl3d-box .f { position: absolute; }
.vl3d-box .t { inset: 0; transform: translateZ(var(--d)); animation: vlTop 2s ease infinite; animation-delay: inherit; }
.vl3d-box .s { left: 0; right: 0; top: 100%; height: var(--d); transform-origin: top;    transform: rotateX(90deg);  animation: vlSouth 2s ease infinite; animation-delay: inherit; }
.vl3d-box .n { left: 0; right: 0; bottom: 100%; height: var(--d); transform-origin: bottom; transform: rotateX(-90deg); background: #1a3d2b; }
.vl3d-box .e { top: 0; bottom: 0; left: 100%; width: var(--d); transform-origin: left;  transform: rotateY(-90deg); animation: vlEast 2s ease infinite; animation-delay: inherit; }
.vl3d-box .w { top: 0; bottom: 0; right: 100%; width: var(--d); transform-origin: right; transform: rotateY(90deg);  background: #1a3d2b; }

@keyframes vlPop {
  0%, 52%, 100% { transform: translateZ(0); }
  22%           { transform: translateZ(34px); }
}
@keyframes vlTop   { 0%, 52%, 100% { background: #2f6d4b; } 22% { background: #9be7b7; } }
@keyframes vlSouth { 0%, 52%, 100% { background: #234f38; } 22% { background: #5fb383; } }
@keyframes vlEast  { 0%, 52%, 100% { background: #1d4430; } 22% { background: #4a9a6d; } }

.vl3d.is-done .vl3d-scene,
.ok .vl3d .vl3d-scene,
html.vl-arrive .vl3d .vl3d-scene { animation: vlDoneSway 1.2s cubic-bezier(0.2, 0, 0, 1) forwards; }

.vl3d.is-done .vl3d-box,
.ok .vl3d .vl3d-box,
html.vl-arrive .vl3d .vl3d-box { animation: vlDonePop 900ms cubic-bezier(0.2, 0, 0, 1) forwards; animation-delay: calc(var(--i) * 0.05s); }

.vl3d.is-done .t, .ok .vl3d .t, html.vl-arrive .vl3d .t { animation: vlDoneTop 900ms ease forwards; animation-delay: calc(var(--i) * 0.05s); }
.vl3d.is-done .s, .ok .vl3d .s, html.vl-arrive .vl3d .s { animation: none; background: #3c8a5e; }
.vl3d.is-done .e, .ok .vl3d .e, html.vl-arrive .vl3d .e { animation: none; background: #2f704c; }

.ok .vl3d, .vl3d.is-done, html.vl-arrive .vl3d { filter: drop-shadow(0 0 34px rgba(95, 174, 126, 0.6)); }

@keyframes vlDoneSway { to { transform: rotateX(56deg) rotateZ(-40deg); } }
@keyframes vlDonePop {
  0%   { transform: translateZ(0); }
  45%  { transform: translateZ(26px); }
  100% { transform: translateZ(0); }
}
@keyframes vlDoneTop { to { background: #6fc592; } }

.page-loader {
  display: grid;
  place-items: center;
  background: #08090a;
  transition: opacity 500ms cubic-bezier(0.2, 0, 0, 1), visibility 500ms linear;
}

.vl-box {
  display: grid;
  justify-items: center;
  gap: 22px;
  text-align: center;
  transition: opacity 400ms cubic-bezier(0.2, 0, 0, 1), transform 500ms cubic-bezier(0.2, 0, 0, 1);
}

.vl-title { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: 0.02em; color: #c9ccd1; }
.vl-title::after { content: ''; display: inline-block; width: 1.2em; text-align: left; animation: vlDots 1.4s steps(4) infinite; }
@keyframes vlDots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75%, 100% { content: '...'; } }

.vl-spacer { height: 37px; }

.vl-welcome {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  padding: 24px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px);
  transition: opacity 600ms cubic-bezier(0.2, 0, 0, 1), transform 600ms cubic-bezier(0.2, 0, 0, 1);
}
.vl-welcome small { color: #5fae7e; font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; }
.vl-welcome h2 {
  margin: 0;
  max-width: 90vw;
  color: #f2f2ee;
  font-family: 'Unbounded', 'Segoe UI', sans-serif;
  font-size: clamp(28px, 6vw, 52px);
  font-weight: 800;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

html.vl-arrive .vl-box { transform: translateY(-86px) scale(0.62); }
html.vl-arrive .vl-title, html.vl-arrive .vl-spacer { opacity: 0; }
html.vl-arrive .vl-welcome { opacity: 1; transform: none; }

body:not(.page-loading) .page-loader .vl-box { transform: translateY(-96px) scale(0.5); opacity: 0; }
body:not(.page-loading) .page-loader .vl-welcome { opacity: 0; transform: translateY(-8px); }

.view-loading {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  min-height: 260px;
  opacity: 0;
  animation: vlFade 300ms ease 220ms forwards;
}
.view-loading p { margin: 0; color: var(--muted, #8b9096); font-size: 13px; }
@keyframes vlFade { to { opacity: 1; } }

.vl-leave {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  display: grid;
  place-items: center;
  background: rgba(8, 9, 10, 0.94);
  opacity: 0;
  transition: opacity 350ms ease;
}
.vl-leave.show { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .vl3d-scene, .vl3d-box, .vl3d-box .f, .vl-title::after { animation: none !important; }
  .vl3d-box .t { background: #4f9f73; }
  .vl3d-box .s { background: #2f6d4b; }
  .vl3d-box .e { background: #245a3e; }
}

.vl3d-box .t { background: #2f6d4b; }
.vl3d-box .s { background: #234f38; }
.vl3d-box .e { background: #1d4430; }

.vl-block {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  min-height: 150px;
  padding: 18px 12px;
  color: var(--muted, #8b9096);
  font-size: 13px;
  opacity: 0;
  animation: vlFade 300ms ease 180ms forwards;
}
.vl-block p { margin: 0; }
.vl-block-line { min-height: 0; padding: 6px 0; grid-auto-flow: column; justify-content: start; gap: 10px; }

@keyframes vlReveal {
  from { opacity: 0; transform: translateY(12px) scale(0.985); filter: blur(3px); }
  to   { opacity: 1; transform: none; filter: none; }
}
@keyframes vlRow {
  from { opacity: 0; transform: translateX(-10px); }
  to   { opacity: 1; transform: none; }
}

.vl-rev { animation: vlReveal 420ms cubic-bezier(0.2, 0, 0, 1) backwards; }

#cardContainer > *:not(.view-loading) { animation: vlReveal 460ms cubic-bezier(0.2, 0, 0, 1) backwards; }

.mv-detail > *:not(.vl-block) { animation: vlReveal 420ms cubic-bezier(0.2, 0, 0, 1) backwards; }
.mv-list .mv-row { animation: vlRow 360ms cubic-bezier(0.2, 0, 0, 1) both; }
.mv-list .mv-empty { animation: vlReveal 360ms ease both; }
.mv-d-grid > div { animation: vlRow 320ms cubic-bezier(0.2, 0, 0, 1) both; }

.as-list .as-item { animation: vlRow 360ms cubic-bezier(0.2, 0, 0, 1) both; }
.as-edit > .as-block, .as-edit > .as-footer { animation: vlReveal 440ms cubic-bezier(0.2, 0, 0, 1) backwards; }
.as-pick > * { animation: vlReveal 300ms ease backwards; }

.mv-list .mv-row:nth-child(1), .as-list .as-item:nth-child(1), .mv-d-grid > div:nth-child(1), .as-edit > :nth-child(1) { animation-delay: 0ms; }
.mv-list .mv-row:nth-child(2), .as-list .as-item:nth-child(2), .mv-d-grid > div:nth-child(2), .as-edit > :nth-child(2) { animation-delay: 40ms; }
.mv-list .mv-row:nth-child(3), .as-list .as-item:nth-child(3), .mv-d-grid > div:nth-child(3), .as-edit > :nth-child(3) { animation-delay: 80ms; }
.mv-list .mv-row:nth-child(4), .as-list .as-item:nth-child(4), .mv-d-grid > div:nth-child(4), .as-edit > :nth-child(4) { animation-delay: 120ms; }
.mv-list .mv-row:nth-child(5), .as-list .as-item:nth-child(5), .mv-d-grid > div:nth-child(5), .as-edit > :nth-child(5) { animation-delay: 160ms; }
.mv-list .mv-row:nth-child(6), .as-list .as-item:nth-child(6), .mv-d-grid > div:nth-child(6) { animation-delay: 200ms; }
.mv-list .mv-row:nth-child(7), .as-list .as-item:nth-child(7), .mv-d-grid > div:nth-child(7) { animation-delay: 240ms; }
.mv-list .mv-row:nth-child(8), .as-list .as-item:nth-child(8), .mv-d-grid > div:nth-child(8) { animation-delay: 280ms; }
.mv-list .mv-row:nth-child(9), .mv-d-grid > div:nth-child(9) { animation-delay: 320ms; }
.mv-list .mv-row:nth-child(n+10) { animation-delay: 360ms; }

.mv-detail, .mv-list, .as-edit { transition: height 300ms cubic-bezier(0.2, 0, 0, 1); }

@media (prefers-reduced-motion: reduce) {
  #cardContainer > *, .mv-detail > *, .mv-list .mv-row, .mv-d-grid > div, .as-list .as-item, .as-edit > *, .as-pick > * { animation: none !important; }
}

.vl-btn-ico { position: relative; flex-shrink: 0; width: 30px; height: 22px; }
.vl-btn-ico [data-vl3d] { position: absolute; left: 50%; top: 50%; margin: -60px 0 0 -60px; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.3)); }
.as-msg { min-height: 22px; }

button.is-busy { display: inline-flex; align-items: center; justify-content: center; cursor: progress; opacity: 1 !important; padding-left: 0; padding-right: 0; }
button.is-busy[disabled] { pointer-events: none; }
.vl-bt { display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; }
.vl-btn-ico { animation: vlFadeIn 220ms ease both; }
@keyframes vlFadeIn { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: none; } }

.view-loading.is-now { opacity: 1; animation: vlPanelIn 260ms cubic-bezier(0.2, 0, 0, 1) both; min-height: 320px; }
@keyframes vlPanelIn { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: none; } }

.dashboard-card:has(> .view-loading) {
  background: none;
  border-color: transparent;
  box-shadow: none;
  animation: none;
  padding: 0;
  transition: none;
}

.view-loading {
  min-height: 320px;
  opacity: 0;
  animation: vlLoaderIn 380ms cubic-bezier(0.2, 0, 0, 1) 120ms forwards;
  transition: opacity 240ms ease, transform 260ms cubic-bezier(0.2, 0, 0, 1);
}
.view-loading.is-now { animation-delay: 0ms; }
.view-loading.is-out { animation: none; opacity: 0; transform: scale(0.96); }

@keyframes vlLoaderIn {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: none; }
}

button.is-busy { position: relative; }
button.is-busy .vl-btn-ico { position: absolute; inset: 0; width: auto; height: auto; }
button.is-busy .vl-btn-ico [data-vl3d] { left: 50%; top: 50%; }
