.portal-splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: all;
  padding: 1rem;
}

.portal-splash[hidden] {
  display: none !important;
}

body.portal-splash-ativo {
  overflow: hidden;
}

.portal-splash-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 40%, rgba(22, 163, 74, 0.12), rgba(15, 23, 42, 0.94));
}

html[data-theme="light"] .portal-splash-backdrop {
  background: radial-gradient(circle at 50% 40%, rgba(22, 163, 74, 0.18), rgba(248, 250, 252, 0.98));
}

.portal-splash-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  animation: portal-splash-fade-in 0.4s ease;
  max-width: 100%;
}

.portal-splash-svg {
  width: min(220px, 58vw);
  height: min(220px, 58vw);
  max-width: 100%;
}

.portal-splash-ring {
  stroke: #16a34a;
  stroke-dasharray: 540;
  stroke-dashoffset: 540;
  transform-origin: center;
  animation: portal-ring-close 4s ease-in-out forwards;
}

.portal-tree-trunk {
  fill: #854d0e;
}

.portal-leaf {
  fill: #22c55e;
  opacity: 0;
  transform-origin: center;
  animation: portal-leaf-grow 0.7s ease forwards;
}

.portal-leaf-1 { animation-delay: 0.35s; }
.portal-leaf-2 { animation-delay: 0.75s; }
.portal-leaf-3 { animation-delay: 1.1s; }
.portal-leaf-4 { animation-delay: 1.45s; }
.portal-leaf-5 { animation-delay: 1.8s; }
.portal-leaf-6 { animation-delay: 2.15s; }

.portal-splash-logo {
  height: clamp(36px, 10vw, 52px);
  width: auto;
  max-width: min(220px, 72vw);
  border-radius: 6px;
  opacity: 0;
  animation: portal-splash-fade-in 0.6s ease 3s forwards;
}

@keyframes portal-ring-close {
  0% { stroke-dashoffset: 540; opacity: 0.3; }
  40% { stroke-dashoffset: 120; opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 1; }
}

@keyframes portal-leaf-grow {
  0% { opacity: 0; transform: scale(0.2); }
  70% { opacity: 1; transform: scale(1.06); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes portal-splash-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.login-page.portal-login {
  background: linear-gradient(160deg, #f0fdf4 0%, #ecfdf5 40%, #f8fafc 100%);
}

.login-page.portal-login .login-card {
  border-color: rgba(22, 163, 74, 0.2);
}

.login-page.portal-login .login-logo-imbecor {
  display: block;
  height: clamp(40px, 12vw, 48px);
  width: auto;
  max-width: min(220px, 80vw);
  margin: 0 auto 0.75rem;
}

.login-page.portal-login .login-empresa {
  color: #166534;
  font-weight: 700;
}

@media (max-width: 480px) {
  .portal-splash-svg {
    width: min(190px, 64vw);
    height: min(190px, 64vw);
  }
}
