.auth-page,
body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

body {
  padding: 36px 16px 52px !important;
  color: #292337;
  background:
    radial-gradient(circle at 50% -22%, rgba(118, 88, 202, .12), transparent 38%),
    linear-gradient(to bottom, #fffefd 0%, #fff 58%, #f2effb 100%) !important;
}

.auth-theme-toggle {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 20;
}

.auth-logo {
  width: min(310px, 78vw);
  margin: 0 0 22px;
  display: block;
  border-radius: 12px;
}

.auth-logo:focus-visible {
  outline: 3px solid #bda8f6;
  outline-offset: 4px;
}

.auth-logo-img {
  width: 100%;
  height: auto;
  display: block;
}

.auth-logo-img-dark {
  display: none;
}

.card {
  border: 1px solid #e7e1ef !important;
  border-radius: 18px !important;
  box-shadow: 0 20px 48px rgba(70, 55, 105, .10) !important;
}

.login-title {
  margin-bottom: 13px !important;
  color: #6949b3 !important;
  font-size: .78rem !important;
  font-weight: 800;
  letter-spacing: .08em !important;
  text-transform: uppercase;
}

.card h1 {
  color: #3e354d;
  font-size: 1.35rem !important;
  line-height: 1.25;
}

.lead {
  color: #70697b !important;
}

.field {
  margin-bottom: 17px !important;
}

.field label {
  color: #40384e !important;
  font-size: .84rem !important;
  font-weight: 700;
}

.field input,
.field select {
  min-height: 46px;
  padding: 10px 13px !important;
  color: #30293a !important;
  background: #faf9fc !important;
  border: 1px solid #ddd6e7 !important;
  border-radius: 10px !important;
}

.field input:focus,
.field select:focus {
  background: #fff !important;
  border-color: #8b5cf6 !important;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, .14);
  outline: none;
}

.field input[aria-invalid="true"],
.field select[aria-invalid="true"] {
  border-color: #c94b42 !important;
}

.hint {
  margin-top: 6px !important;
  color: #82798f !important;
  font-size: .76rem !important;
  line-height: 1.45 !important;
}

.field-error {
  margin-top: 6px;
  color: #b42318;
  font-size: .77rem;
  font-weight: 650;
  line-height: 1.4;
}

.optional {
  color: #8a8294;
  font-size: .76rem;
  font-weight: 500;
}

.consent-error {
  margin: -9px 0 12px 10px;
}

.error-msg {
  color: #9b241c !important;
  background: #fff0ef !important;
  border: 1px solid #f0c6c2;
  border-radius: 10px !important;
  line-height: 1.45;
}

.form-error-summary {
  margin-bottom: 17px;
}

.password-wrap,
.input-wrap {
  position: relative;
}

.password-wrap input,
.input-wrap input {
  padding-right: 82px !important;
}

.password-toggle,
.eye-btn {
  position: absolute;
  top: 50%;
  right: 10px;
  min-width: 62px;
  padding: 6px 7px !important;
  color: #6d55a2 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 7px;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: .72rem !important;
  font-weight: 750;
}

.password-toggle:hover,
.eye-btn:hover {
  background: #f0eafb !important;
}

.password-toggle:focus-visible,
.eye-btn:focus-visible {
  outline: 2px solid #8b5cf6;
  outline-offset: 1px;
}

.btn-submit,
.btn {
  min-height: 46px;
  color: #fff !important;
  background: #7658ca !important;
  border: 1px solid #7658ca !important;
  border-radius: 10px !important;
  font-weight: 750;
}

.btn-submit:hover,
.btn:hover {
  background: #6245b2 !important;
}

.alt {
  color: #777080 !important;
  line-height: 1.55 !important;
}

.alt a,
.consent a {
  color: #6949b3 !important;
  font-weight: 650;
}

.consent {
  color: #5f5868 !important;
}

.consent.has-error {
  padding: 9px 10px;
  background: #fff2f0;
  border: 1px solid #f0c6c2;
  border-radius: 9px;
}

.role {
  min-height: 225px !important;
  padding: 21px !important;
  background: #fbfaff !important;
  border-color: #e2d8f3 !important;
  border-radius: 14px !important;
  transition: border-color .15s, background .15s, transform .15s;
}

.role:hover {
  background: #f6f2ff !important;
  border-color: #9f83df !important;
  transform: translateY(-2px);
}

.role b {
  color: #5d3da2 !important;
  font-size: 1.05rem !important;
}

.role span {
  color: #6f6878 !important;
}

.role em {
  color: #5d3da2 !important;
}

.theme-dark {
  color-scheme: dark;
}

.theme-dark body {
  background:
    radial-gradient(circle at 50% -18%, rgba(124, 92, 246, .24), transparent 38%),
    linear-gradient(to bottom, #0d1117 0%, #0d1117 62%, #15111f 100%) !important;
  color: #e6edf3;
}

.theme-dark .auth-logo-img-light {
  display: none;
}

.theme-dark .auth-logo-img-dark {
  display: block;
}

.theme-dark .card {
  background: #161b22 !important;
  border: 1px solid #30363d;
  box-shadow: 0 20px 48px rgba(0, 0, 0, .32);
  color: #e6edf3;
}

.theme-dark .login-title,
.theme-dark h1,
.theme-dark h2,
.theme-dark h3 {
  color: #c4b5fd !important;
}

.theme-dark .field label,
.theme-dark p,
.theme-dark .consent {
  color: #cdd9e5 !important;
}

.theme-dark .hint,
.theme-dark .alt,
.theme-dark .small {
  color: #8b949e !important;
}

.theme-dark a,
.theme-dark .alt a,
.theme-dark .consent a {
  color: #c4b5fd !important;
}

.theme-dark .field input {
  background: #0d1117 !important;
  border: 1px solid #30363d !important;
  color: #e6edf3 !important;
}

.theme-dark .field select {
  background: #0d1117 !important;
  border: 1px solid #30363d !important;
  color: #e6edf3 !important;
}

.theme-dark .field input:focus {
  background: #0f1520 !important;
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .22);
}

.theme-dark .field input::placeholder {
  color: #6e7681;
}

.theme-dark .eye-btn {
  color: #c4b5fd;
}

.theme-dark .password-toggle,
.theme-dark .eye-btn {
  color: #c4b5fd !important;
}

.theme-dark .password-toggle:hover,
.theme-dark .eye-btn:hover {
  background: #2a2150 !important;
}

.theme-dark .btn,
.theme-dark .btn-submit {
  background: #173832 !important;
  border: 1px solid #1f5132 !important;
  color: #7ee7d3 !important;
}

.theme-dark .btn:hover,
.theme-dark .btn-submit:hover {
  background: #1d463f !important;
}

.theme-dark .btn.secondary {
  background: #21262d !important;
  border-color: #30363d !important;
  color: #c4b5fd !important;
}

.theme-dark .error-msg,
.theme-dark .err {
  background: #3a1d1d !important;
  border: 1px solid #5c2626;
  color: #ffb4ac !important;
}

.theme-dark .notice {
  background: #2e2510 !important;
  border: 1px solid #5c4a1e;
  color: #f0c040 !important;
}

.theme-dark .success {
  background: #14301f !important;
  border: 1px solid #1f5132;
  color: #7ee787 !important;
}

.theme-dark .code {
  background: #2a2150 !important;
  color: #d6c2ff !important;
}

.theme-dark .sep {
  background: #30363d !important;
}

.theme-dark .consent input {
  accent-color: #8b5cf6;
}

.theme-dark .role {
  color: #e6edf3;
  background: #161b22 !important;
  border-color: #30363d !important;
}

.theme-dark .role:hover {
  background: #1d232d !important;
  border-color: #8066c2 !important;
}

.theme-dark .role b,
.theme-dark .role em {
  color: #c4b5fd !important;
}

.theme-dark .role span {
  color: #aeb8c4 !important;
}

.theme-dark .optional {
  color: #8b949e;
}

.theme-dark .consent.has-error {
  background: #3a1d1d;
  border-color: #5c2626;
}

@media (max-width: 640px) {
  .auth-theme-toggle {
    top: 12px;
    right: 12px;
  }

  .auth-logo {
    width: min(270px, 72vw);
    margin-bottom: 18px;
  }

  .card {
    padding: 24px 20px !important;
  }
}
