/* Aceternity-inspired split auth skin for the EGW Pioneer Hub gate. */
.auth-gate.portal-login-gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: block;
  padding: 0;
  overflow: hidden;
  background: #ffffff;
  color: #111827;
  font-family: "Plus Jakarta Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: geometricPrecision;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.auth-gate.portal-login-gate::before {
  display: none;
}

.auth-gate.portal-login-gate.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.portal-login-gate *,
.portal-login-gate *::before,
.portal-login-gate *::after {
  box-sizing: border-box;
}

.portal-login-gate button,
.portal-login-gate input,
.portal-login-gate textarea {
  font: inherit;
}

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

.portal-login-gate .hero {
  --bg-x: 0px;
  --bg-y: 0px;
  --fg-x: 0px;
  --fg-y: 0px;
  display: grid;
  min-height: 100svh;
  width: 100%;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 1fr);
  background: #ffffff;
}

.portal-login-gate .hero__media {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
  background: #102437;
}

.portal-login-gate .hero__media::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: 4;
  height: 34%;
  pointer-events: none;
  background: linear-gradient(to top, rgb(4 14 24 / 0.34), transparent);
}

.portal-login-gate .hero__layer {
  position: absolute;
  inset: -6%;
  width: 112%;
  height: 112%;
  object-fit: cover;
  object-position: 52% center;
  filter: saturate(1.04) contrast(1.02);
  pointer-events: none;
  user-select: none;
  will-change: transform;
}

.portal-login-gate .hero__bg {
  z-index: 1;
  transform: translate3d(var(--bg-x), var(--bg-y), 0) scale(1.03);
}

.portal-login-gate .hero__fg {
  z-index: 2;
  object-position: 44% center;
  transform: translate3d(var(--fg-x), var(--fg-y), 0) scale(1.03);
}

.portal-login-gate .hero__interface {
  position: relative;
  z-index: 3;
  display: flex;
  min-height: 100svh;
  align-items: center;
  justify-content: center;
  padding: clamp(32px, 7vw, 88px);
  background: #ffffff;
}

.portal-login-gate .auth-card {
  position: relative;
  width: min(432px, 100%);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  pointer-events: auto;
  text-align: initial;
  animation: authPaneIn 0.48s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.portal-login-gate .auth-card.shake {
  animation: authPaneShake 0.4s;
}

@keyframes authPaneIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes authPaneShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

.portal-login-gate .auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 30px;
  color: #171717;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0;
}

.portal-login-gate .auth-brand__logo {
  position: relative;
  width: 24px;
  height: 24px;
  color: #2563eb;
}

.portal-login-gate .auth-brand__logo::before,
.portal-login-gate .auth-brand__logo::after {
  content: "";
  position: absolute;
  width: 15px;
  height: 15px;
  border-radius: 5px;
}

.portal-login-gate .auth-brand__logo::before {
  top: 2px;
  left: 2px;
  border: 1px solid currentColor;
}

.portal-login-gate .auth-brand__logo::after {
  right: 2px;
  bottom: 2px;
  background: currentColor;
}

.portal-login-gate .auth-card__header {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin-bottom: 34px;
  text-align: center;
}

.portal-login-gate .auth-card h1 {
  margin: 0;
  color: #171717;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0;
}

.portal-login-gate .auth-card__header p {
  max-width: 32ch;
  margin: 0;
  color: #737373;
  font-size: 0.94rem;
  line-height: 1.55;
}

.portal-login-gate .auth-sso {
  display: grid;
  gap: 12px;
}

.portal-login-gate .auth-provider {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #ffffff;
  color: #404040;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow:
    0 1px 2px rgb(0 0 0 / 0.04),
    0 1px 10px rgb(0 0 0 / 0.08);
  outline: none;
  transition: transform 150ms ease, background 150ms ease, box-shadow 150ms ease, color 150ms ease;
}

.portal-login-gate .auth-provider:hover {
  background: #fafafa;
  color: #171717;
  box-shadow:
    0 1px 2px rgb(0 0 0 / 0.05),
    0 10px 24px rgb(0 0 0 / 0.09);
}

.portal-login-gate .auth-provider:focus-visible {
  box-shadow:
    0 0 0 3px rgb(37 99 235 / 0.24),
    0 1px 2px rgb(0 0 0 / 0.05),
    0 10px 24px rgb(0 0 0 / 0.09);
}

.portal-login-gate .auth-provider:active {
  transform: scale(0.98);
}

.portal-login-gate .auth-provider:disabled {
  cursor: wait;
  opacity: 0.68;
}

.portal-login-gate .auth-provider__icon {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-size: 0;
  font-weight: 900;
}

.portal-login-gate .auth-provider__icon svg {
  display: block;
  width: 18px;
  height: 18px;
}

.portal-login-gate .auth-status {
  min-height: 22px;
  margin: 18px 0 0;
  color: #737373;
  font-size: 0.88rem;
  line-height: 1.45;
  text-align: center;
}

.portal-login-gate .auth-status.show {
  color: #b42318;
}

.portal-login-gate .auth-card--success .auth-status {
  color: #2563eb;
}

.portal-login-gate .auth-footer {
  margin-top: 42px;
  padding-top: 0;
  border-top: 0;
  color: #a3a3a3;
  font-family: inherit;
  font-size: 0.78rem;
  font-style: normal;
  line-height: 1.5;
  text-align: center;
}

@media (max-width: 900px) {
  .portal-login-gate .hero {
    display: block;
    background: #ffffff;
  }

  .portal-login-gate .hero__media {
    display: none;
  }

  .portal-login-gate .hero__interface {
    padding: 28px 22px;
  }

  .portal-login-gate .auth-card {
    width: min(420px, 100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .portal-login-gate .hero__layer {
    transform: scale(1.03);
  }

  .portal-login-gate .auth-card,
  .portal-login-gate .auth-provider {
    transform: none;
    transition: none;
    animation: none;
  }
}
