.site-auth-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  place-items: center;
  padding: 24px;
}

.site-auth-modal.hidden {
  display: none !important;
}

.site-auth-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(10px);
  cursor: pointer;
}

.site-auth-modal-card {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 28px;
  padding: 42px 36px 34px;
  background: #f4f3ef;
  color: #111;
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.48);
}

.site-auth-modal-card h2 {
  margin: 0;
  text-align: center;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.site-auth-modal-subtitle {
  margin: 10px 0 0;
  color: var(--sv-color-text-faint);
  text-align: center;
  font-size: 0.88rem;
  line-height: 1.55;
}

.site-auth-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #111;
  font-size: 1.35rem;
  cursor: pointer;
}

.site-auth-modal-form {
  display: flex;
  flex-direction: column;
  margin-top: 26px;
}

.site-auth-modal-form label {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
  color: var(--sv-color-text-faint);
  font-size: 0.78rem;
}

.site-auth-modal-form input {
  height: 42px;
  border: 1px solid #d6d4ce;
  border-radius: 999px;
  padding: 0 14px;
  background: #fff;
  color: #111;
  font-size: 0.95rem;
  font-family: inherit;
  outline: 0;
}

.site-auth-modal-form input:focus {
  border-color: #111;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}

.site-auth-modal-error {
  min-height: 1.25em;
  margin: -2px 0 10px;
  color: #b23838;
  font-size: 0.84rem;
}

.site-auth-modal-error.is-ok {
  color: #4b6cb7;
}

.site-auth-modal-submit {
  width: 100%;
  height: 44px;
  margin-top: 4px;
  border: 1px solid #111;
  border-radius: 999px;
  background: var(--sv-color-surface);
  color: var(--sv-color-text);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

.site-auth-modal-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.site-auth-modal-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
  margin-top: 18px;
  font-size: 0.78rem;
  color: var(--sv-color-text-faint);
}

.site-auth-modal-foot a,
.site-auth-modal-foot button {
  border: 0;
  background: transparent;
  color: #111;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  font: inherit;
  padding: 0;
}

body.site-auth-modal-open {
  overflow: hidden;
}
