/* App-specific layout and illustration; UX4G owns component styling and theme colors. */
.login-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: clamp(0.75rem, 1.5vh, 1.25rem) clamp(1rem, 2vw, 2rem);
  background: var(--ux4g-bg-neutral-soft);
}

.login-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(22rem, 0.92fr);
  gap: 1.25rem;
  width: min(100%, 74rem);
}

.login-visual {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 1rem;
  min-height: 34rem;
  overflow: hidden;
  padding: clamp(2rem, 4vw, 3.5rem);
  background: linear-gradient(
    135deg,
    var(--ux4g-bg-neutral-soft),
    var(--ux4g-bg-neutral-elevated) 58%,
    var(--ux4g-bg-neutral-soft)
  );
  color: var(--ux4g-text-neutral-primary);
}

.login-visual::before {
  position: absolute;
  inset: -24% -20% auto auto;
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    var(--ux4g-bg-primary-strong),
    transparent 68%
  );
  content: "";
  opacity: 0.09;
  pointer-events: none;
}

.visual-intro {
  position: relative;
  z-index: 1;
  max-width: 32rem;
}

.visual-kicker {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 1.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--ux4g-text-neutral-primary);
}

.visual-kicker span {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: currentColor;
}

.visual-intro h2 {
  max-width: 11ch;
  margin: 0;
  font-size: clamp(2.25rem, 4vw, 3.5rem);
  letter-spacing: -0.025em;
  line-height: 1.08;
}

.visual-intro h2::after {
  display: block;
  width: 2.5rem;
  height: 0.25rem;
  margin-block-start: 1.25rem;
  background: var(--ux4g-bg-primary-strong);
  content: "";
}

.visual-description {
  max-width: 28rem;
  margin: 1.25rem 0 0;
  line-height: 1.6;
}

.scan-visual {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 17rem;
  place-items: center;
  justify-self: center;
  isolation: isolate;
}

.scan-orbit {
  position: absolute;
  aspect-ratio: 1;
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: 0.14;
}

.scan-orbit--outer {
  width: min(100%, 29rem);
}

.scan-orbit--inner {
  width: min(78%, 22rem);
}

.scan-frame {
  position: relative;
  display: grid;
  width: min(74%, 22rem);
  aspect-ratio: 1.42;
  place-items: center;
  margin-inline: auto;
}

.scan-frame__corner {
  position: absolute;
  width: 1.5rem;
  height: 1.5rem;
  border-color: currentColor;
  border-style: solid;
  opacity: 0.72;
}

.scan-frame__corner--top {
  inset: 0 auto auto 0;
  border-width: 2px 0 0 2px;
}

.scan-frame__corner--bottom {
  inset: auto 0 0 auto;
  border-width: 0 2px 2px 0;
}

.scan-document {
  display: grid;
  width: 84%;
  gap: 1.25rem;
  padding: 1.25rem;
  margin-inline: auto;
  transform: rotate(-5deg);
  background: var(--ux4g-bg-neutral-elevated);
  color: var(--ux4g-text-neutral-primary);
  border: 1px solid var(--ux4g-border-color-neutral-strong);
}

.scan-document__heading,
.scan-document__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.scan-document__seal,
.scan-document__indicator {
  flex: 0 0 auto;
  width: 0.65rem;
  height: 0.65rem;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.scan-document__body {
  display: grid;
  grid-template-columns: 4rem 1fr;
  gap: 1rem;
  align-items: center;
}

.scan-document__portrait {
  aspect-ratio: 0.8;
  border-radius: 0.25rem;
  background:
    linear-gradient(150deg, transparent 45%, currentColor 46% 48%, transparent 49%),
    var(--ux4g-bg-neutral-soft);
  opacity: 0.48;
}

.scan-document__lines {
  display: grid;
  gap: 0.55rem;
}

.scan-document__lines i {
  display: block;
  height: 0.35rem;
  border-radius: 999px;
  background: var(--ux4g-bg-neutral-emphasis);
}

.scan-document__lines i:nth-child(2) {
  width: 76%;
}

.scan-document__lines i:nth-child(3) {
  width: 88%;
}

.scan-document__lines i:nth-child(4) {
  width: 58%;
}

.scan-document__footer {
  padding-top: 0.75rem;
  border-top: 1px solid var(--ux4g-border-color-neutral-strong);
}

.scan-document__indicator {
  width: 1rem;
  height: 1rem;
}

.scan-caption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--ux4g-text-neutral-primary);
}

.login-panel {
  display: grid;
  align-content: center;
  gap: 2rem;
  min-width: 0;
}

.login-copy {
  display: grid;
  gap: 0.5rem;
}

.login-copy h1,
.login-copy p {
  margin: 0;
}

.login-form {
  display: grid;
  gap: 1.25rem;
}

.form-field {
  display: grid;
  gap: 0.5rem;
}

.password-field {
  position: relative;
  display: flex;
  align-items: center;
}

.password-field input {
  width: 100%;
  padding-inline-end: 5rem;
}

.password-toggle {
  position: absolute;
  inset-inline-end: 0.5rem;
  min-height: 2.75rem;
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 2.75rem;
}

.form-options button {
  min-height: 2.75rem;
}

.login-submit {
  width: 100%;
}

.form-message {
  min-height: 1.5em;
  margin: 0;
}

.register-prompt {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.register-prompt .ux4g-btn {
  min-height: 2.75rem;
}

.reset-eyebrow {
  margin: 0 0 0.25rem;
  color: var(--ux4g-text-neutral-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.reset-modal-body {
  display: grid;
  gap: 1rem;
}

.reset-demo-note {
  margin: 0;
  padding: 0.75rem 1rem;
  background: var(--ux4g-bg-neutral-soft);
  color: var(--ux4g-text-neutral-primary);
}

.reset-step-counter {
  margin: 0;
  color: var(--ux4g-text-neutral-secondary);
  font-weight: 600;
}

#reset-request-step,
#reset-password-step {
  display: grid;
  gap: 1rem;
}

#reset-request-step[hidden],
#reset-password-step[hidden] {
  display: none;
}

#reset-request-step h3,
#reset-password-step h3,
#reset-request-step p,
#reset-password-step p {
  margin: 0;
}

.reset-continue {
  width: 100%;
}

.ux4g-modal-header [data-close-modal] {
  min-height: 2.75rem;
}

.reset-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.reset-actions button {
  min-height: 2.75rem;
}

.reset-status {
  min-height: 1.5em;
  margin: 0;
}

@media (max-width: 58rem) {
  .login-layout {
    grid-template-columns: minmax(0, 1fr) minmax(20rem, 0.9fr);
  }

  .login-visual {
    min-height: 32rem;
    padding: 2rem;
  }
}

@media (max-width: 48rem) {
  .login-layout {
    grid-template-columns: minmax(0, 1fr);
    max-width: 34rem;
  }

  .login-visual {
    min-height: 0;
    gap: 0.75rem;
  }

  .scan-visual {
    min-height: 14rem;
  }

  .login-panel {
    gap: 1.5rem;
  }
}

@media (max-width: 30rem) {
  .login-page {
    padding: 1rem;
  }

  .login-visual,
  .login-panel {
    padding: 1.5rem;
  }

  .visual-intro h2 {
    font-size: 2rem;
  }

  .scan-frame {
    width: min(82%, 20rem);
  }

  .scan-caption {
    font-size: 0.55rem;
  }

  .reset-actions {
    align-items: stretch;
  }

  .reset-actions button {
    flex: 1 1 auto;
  }
}
