/* =========================================================
   SPOTiA — entrada do PWA sem logo/texto
   ========================================================= */
.spot-app-entry {
  display: none;
}

html.spot-app-entry-active,
html.spot-app-entry-active body {
  overflow: hidden !important;
}

html.spot-app-entry-active .spot-app-entry {
  position: fixed;
  inset: 0;
  z-index: 2147483646;
  display: grid;
  place-items: center;
  background: #e8e9eb;
  overflow: hidden;
  pointer-events: all;
  opacity: 1;
  visibility: visible;
}

/* Painéis que abrem o workspace no final. */
html.spot-app-entry-active .spot-app-entry::before,
html.spot-app-entry-active .spot-app-entry::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50.5%;
  background: #e8e9eb;
  z-index: 2;
  will-change: transform;
  transition: transform .72s cubic-bezier(.76,0,.24,1);
}

html.spot-app-entry-active .spot-app-entry::before {
  left: 0;
}

html.spot-app-entry-active .spot-app-entry::after {
  right: 0;
}

.spot-app-entry__motion {
  position: relative;
  z-index: 3;
  width: 154px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spot-app-entry__line {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: rgba(17,17,17,.82);
  transform: translate(-50%, -50%);
  animation: spotEntryLine 1.08s cubic-bezier(.22,.61,.36,1) infinite;
}

.spot-app-entry__dash {
  position: absolute;
  width: 22px;
  height: 6px;
  border-radius: 999px;
  background: rgba(17,17,17,.10);
  filter: blur(.2px);
  opacity: 0;
  animation: spotEntryDash 1.08s cubic-bezier(.22,.61,.36,1) infinite;
}

.spot-app-entry__dash--a {
  top: 12px;
  left: 28px;
  animation-delay: .08s;
}

.spot-app-entry__dash--b {
  right: 24px;
  bottom: 11px;
  width: 34px;
  animation-delay: .22s;
}

.spot-app-entry__dash--c {
  left: 58px;
  bottom: 6px;
  width: 14px;
  animation-delay: .35s;
}

@keyframes spotEntryLine {
  0% {
    width: 0;
    opacity: 0;
    transform: translate(-50%, -50%) scaleX(.4);
  }
  28% {
    opacity: 1;
  }
  62% {
    width: 122px;
    opacity: .9;
    transform: translate(-50%, -50%) scaleX(1);
  }
  100% {
    width: 122px;
    opacity: 0;
    transform: translate(-50%, -50%) scaleX(.78);
  }
}

@keyframes spotEntryDash {
  0% {
    opacity: 0;
    transform: translateX(-14px) scaleX(.55);
  }
  35% {
    opacity: .75;
  }
  72% {
    opacity: .18;
  }
  100% {
    opacity: 0;
    transform: translateX(18px) scaleX(1.08);
  }
}

/* Saída: a tela se abre ao meio e revela o sistema. */
html.spot-app-entry-active .spot-app-entry.is-leaving::before {
  transform: translateX(-101%);
}

html.spot-app-entry-active .spot-app-entry.is-leaving::after {
  transform: translateX(101%);
}

html.spot-app-entry-active .spot-app-entry.is-leaving .spot-app-entry__motion {
  opacity: 0;
  transform: scale(.94);
  transition: opacity .18s ease, transform .18s ease;
}

/* Entrada suave do workspace depois da cortina. */
html.spot-app-entry-revealed .side-nav,
html.spot-app-entry-revealed .main-wrapper {
  animation: spotWorkspaceReveal .52s cubic-bezier(.22,.61,.36,1) both;
}

@keyframes spotWorkspaceReveal {
  from {
    opacity: .45;
    transform: translateY(5px) scale(.995);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .spot-app-entry__line,
  .spot-app-entry__dash {
    animation: none !important;
  }

  html.spot-app-entry-active .spot-app-entry::before,
  html.spot-app-entry-active .spot-app-entry::after {
    transition-duration: .18s;
  }

  html.spot-app-entry-revealed .side-nav,
  html.spot-app-entry-revealed .main-wrapper {
    animation: none !important;
  }
}
