/* Centered single-column authentication shell for CouchCMS. */
#simple-page {
  min-height: 100dvh;
  padding: 0;
  overflow-x: hidden;
  background: #fde1cf;
}

.auth-layout {
  display: block;
  min-height: 100dvh;
}

#simple-page .auth-stage#content {
  min-width: 0;
  width: auto;
  min-height: 100dvh;
  padding: 0.5rem;
  border: 0;
  margin: 0;
}

.auth-surface {
  display: grid;
  grid-template-rows: auto 1fr auto;
  justify-items: center;
  width: 100%;
  min-height: calc(100dvh - 1rem);
  padding: 1.5rem 2.75rem;
  border-radius: var(--radius-lg);
  background: var(--color-surface-raised);
}

.auth-topbar {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
}

.auth-brand-logo {
  display: block;
  width: auto;
  height: 2rem;
}

#simple-wrap {
  position: static;
  top: auto;
  align-self: center;
  width: 100%;
  max-width: 24.5rem;
  padding: 0;
  margin: 2.5rem auto;
}

#simple-logo,
.login-logo {
  display: none !important;
}

.simple-box {
  width: 100%;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

div.simple-heading {
  padding: 0;
  border: 0;
  background: transparent !important;
  color: var(--color-text-strong);
  text-align: center;
  text-shadow: none;
  cursor: default;
}

.login-user-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: var(--color-surface-raised);
  color: var(--color-accent);
  fill: currentColor;
  box-shadow:
    0 0 0 0.75rem rgb(250 115 25 / 0.08),
    0 2px 4px rgb(10 13 20 / 0.06);
}

.login-user-mark > .i,
.login-user-mark > .hgi-stroke {
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  color: currentColor;
  fill: currentColor;
  font-size: 1.25rem;
  line-height: 1;
}

div.simple-heading .login-heading {
  display: block;
  color: var(--color-text-strong);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 2rem;
}

.login-subheading {
  display: block;
  margin-top: 0.25rem;
  color: var(--color-text-muted);
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.25rem;
}

.simple-content {
  padding: 0;
}

.simple-form {
  padding: 1.75rem 0 0 !important;
}

.simple-form .field {
  position: relative;
  margin: 0 0 0.75rem;
}

.simple-form > .alert {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  margin: 0 0 1rem;
  text-align: left;
}

.simple-form > .alert > .i,
.simple-form > .alert > .hgi-stroke {
  position: static;
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  margin: 0.125rem 0 0;
  font-size: 1rem;
}

.auth-field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 1.25rem;
  margin-bottom: 0.25rem;
}

.auth-field-row label {
  margin: 0;
  color: var(--color-text-strong);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25rem;
}

.simple-form .field input.text,
.simple-form .field input.password {
  width: 100%;
  height: var(--control-height);
  min-height: var(--control-height);
  padding: 0 2.5rem;
  border: 1px solid var(--color-border-control);
  border-radius: var(--radius-sm);
  background: var(--color-surface-raised);
  color: var(--color-text-strong);
  font-size: 0.875rem;
  font-weight: 400;
  box-shadow: 0 1px 2px rgb(10 13 20 / 0.03);
}

.simple-form .field.has-password-toggle input.password {
  padding-right: 2.75rem;
}

.simple-form .field input.text:hover,
.simple-form .field input.password:hover {
  border-color: var(--color-border-strong);
}

.simple-form .field input.text:focus,
.simple-form .field input.password:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: var(--focus-ring);
}

.prepend > .i,
.prepend > .hgi-stroke {
  position: absolute;
  top: 2.125rem;
  bottom: auto !important;
  left: 0.75rem;
  width: 1rem;
  height: 1rem;
  margin: 0;
  color: var(--color-text-faint);
  fill: currentColor;
  font-size: 1rem;
  line-height: 1;
  pointer-events: none;
}

.prepend > .text:focus ~ .i,
.prepend > .text:focus ~ .hgi-stroke,
.prepend > .password:focus ~ .i,
.prepend > .password:focus ~ .hgi-stroke {
  color: var(--color-accent);
  fill: currentColor;
}

.password-toggle {
  position: absolute;
  right: 0;
  bottom: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--control-height);
  height: var(--control-height);
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text-faint);
  fill: currentColor;
  cursor: pointer;
}

.password-toggle:hover,
.password-toggle:focus {
  background: transparent;
  color: var(--color-text-strong);
}

.password-toggle > .i,
.password-toggle > .hgi-stroke {
  width: 1rem;
  height: 1rem;
  margin: 0;
  color: currentColor;
  fill: currentColor;
  font-size: 1rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.login-support-row {
  display: flex;
  justify-content: flex-end;
  min-height: 1.25rem;
  margin-top: 0.25rem;
}

.forgot-password-link {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.25rem;
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-underline-offset: 0.15em;
}

.forgot-password-link:hover,
.forgot-password-link:focus {
  color: var(--color-text-strong);
}

.simple-btns {
  margin-top: 1.25rem;
}

.simple-btns > .btn {
  width: 100%;
  height: var(--control-height);
  min-height: var(--control-height);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: -0.006em;
  box-shadow:
    0 1px 2px rgb(14 18 27 / 0.24),
    inset 0 0 0 1px var(--color-primary);
}

.simple-btns > .btn .i,
.simple-btns > .btn .hgi-stroke {
  display: none;
}

.simple-btns > .btn.is-loading {
  cursor: wait;
}

.simple-btns > .btn.is-loading::before {
  content: '';
  width: 0.875rem;
  height: 0.875rem;
  border: 2px solid rgb(255 255 255 / 0.35);
  border-top-color: var(--color-on-primary);
  border-radius: 50%;
  animation: auth-spin 0.8s linear infinite;
}

@keyframes auth-spin {
  to {
    transform: rotate(360deg);
  }
}

.login-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  min-height: 2.5rem;
  color: var(--color-text-muted);
  font-size: 0.875rem;
  line-height: 1.25rem;
}

@media (max-width: 899px) {
  #simple-page .auth-stage#content {
    padding: 0.375rem;
  }

  .auth-surface {
    min-height: calc(100dvh - 0.75rem);
    padding: 1.25rem 0.875rem 0.875rem;
  }
}

@media (max-width: 480px) {
  #simple-wrap {
    margin-block: 1.5rem;
  }

  div.simple-heading .login-heading {
    font-size: 1.375rem;
  }

  .login-footer {
    font-size: 0.8125rem;
  }
}

@media (max-height: 700px) {
  .auth-surface {
    padding-block: 1rem;
  }

  #simple-wrap {
    margin-block: 1.5rem 1rem;
  }

  .login-user-mark {
    margin-bottom: 1rem;
  }
}
