html[data-benteng-sign-in] {
  --benteng-login-accent: #5c49c7;
  --benteng-login-accent-hover: #4938ae;
  --benteng-login-divider: #e9e4f5;
  --benteng-login-hero-bg: #f7f5ff;
  --benteng-login-hero-text: #211a3b;
  --benteng-login-hero-muted: #685e84;
  --benteng-login-glow: #ddd6ff;
  --benteng-login-footer-height: 3.5rem;
}

html.dark[data-benteng-sign-in] {
  --benteng-login-accent: #a99aff;
  --benteng-login-accent-hover: #c3b9ff;
  --benteng-login-divider: #272237;
  --benteng-login-hero-bg: #100d1d;
  --benteng-login-hero-text: #f4f0ff;
  --benteng-login-hero-muted: #b6adc9;
  --benteng-login-glow: #352565;
}

html[data-benteng-sign-in] #root > .h-svh {
  grid-template-columns: minmax(0, 1fr);
  min-height: calc(100svh - var(--benteng-login-footer-height));
  height: auto;
}

html[data-benteng-sign-in] #root > .h-svh > a:is([href="/"], [data-benteng-home-link]) > div:first-child {
  background: url("/benteng-sign-in/logo.svg") center / 100% no-repeat;
}

html[data-benteng-sign-in] #root > .h-svh > a:is([href="/"], [data-benteng-home-link]) > div:first-child > * {
  opacity: 0;
}

html[data-benteng-sign-in] #root > .h-svh > .container {
  width: 100%;
  max-width: none;
}

html[data-benteng-sign-in] #root form input:not([type="checkbox"], [type="hidden"]) {
  min-height: 40px;
  border-radius: 10px;
}

html[data-benteng-sign-in] #root form button[type="submit"] {
  min-height: 40px;
  border-radius: 10px;
  background: var(--benteng-login-accent);
  color: white;
}

html.dark[data-benteng-sign-in] #root form button[type="submit"] {
  color: #191332;
}

html[data-benteng-sign-in] #root form button[type="submit"]:hover:enabled {
  background: var(--benteng-login-accent-hover);
}

.benteng-google-icon {
  display: block;
  flex: none;
  width: 20px;
  height: 20px;
  object-fit: contain;
  pointer-events: none;
}

.benteng-sign-in-hero {
  display: none;
}

.benteng-sign-in-legal:not([hidden]) {
  min-height: var(--benteng-login-footer-height);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .25rem 1rem;
  padding: .75rem 1rem;
  color: var(--muted-foreground);
  font-size: .875rem;
}

.benteng-sign-in-legal a {
  text-decoration: underline;
  text-underline-offset: .2em;
}

.benteng-sign-in-legal a:hover {
  color: var(--benteng-login-accent);
}

@media (min-width: 1024px) {
  html[data-benteng-sign-in] #root > .h-svh {
    grid-template-columns: 60% minmax(0, 1fr);
  }

  html[data-benteng-sign-in] #root > .h-svh > .container {
    grid-column: 2;
    min-width: 0;
    margin-inline: 0;
    border-inline-start: 1px solid var(--benteng-login-divider);
    padding-block: 4.5rem 2rem;
  }

  html[data-benteng-sign-in] #root > .h-svh > a:is([href="/"], [data-benteng-home-link]) {
    color: var(--benteng-login-hero-text);
  }

  .benteng-sign-in-legal:not([hidden]) {
    width: 40%;
    margin-inline-start: auto;
    border-inline-start: 1px solid var(--benteng-login-divider);
  }

  html[data-benteng-sign-in] .benteng-sign-in-hero:not([hidden]) {
    position: absolute;
    inset: 0 auto auto 0;
    width: 60%;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 4.5rem 5rem 2rem 0;
    text-align: center;
    color: var(--benteng-login-hero-text);
    background:
      radial-gradient(ellipse at 33% 66%, var(--benteng-login-glow), transparent 58%),
      var(--benteng-login-hero-bg);
  }

  .benteng-sign-in-illustration {
    width: min(256px, 42%);
    aspect-ratio: 1;
    background: url("/benteng-sign-in/illustration.svg") center / contain no-repeat;
    animation: benteng-sign-in-float 5s ease-in-out infinite;
  }

  .benteng-sign-in-hero h2 {
    margin-top: 1.5rem;
    font-size: 1.5rem;
    line-height: 1.35;
    font-weight: 500;
  }

  .benteng-sign-in-hero p {
    margin-top: .5rem;
    max-width: 42ch;
    color: var(--benteng-login-hero-muted);
  }
}

@keyframes benteng-sign-in-float {
  50% { transform: translateY(-12px); }
}

@media (prefers-reduced-motion: reduce) {
  .benteng-sign-in-illustration { animation: none; }
}
