.auth-button {
  min-height: 38px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 800;
  transition: 0.2s ease;
}

.auth-button:hover {
  color: var(--white);
  background: rgba(227, 22, 18, 0.18);
  border-color: rgba(227, 22, 18, 0.48);
}

.auth-button.authenticated {
  color: #83efb3;
  background: rgba(49, 212, 124, 0.09);
  border-color: rgba(49, 212, 124, 0.23);
}

.auth-button svg {
  width: 17px;
  height: 17px;
}

.auth-modal[hidden] {
  display: none;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  padding: 20px;
  display: grid;
  place-items: center;
}

.auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 10, 0.76);
  backdrop-filter: blur(10px);
}

.auth-dialog {
  position: relative;
  width: min(440px, 100%);
  overflow: hidden;
  color: var(--ink-900);
  background: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 26px;
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.42);
  animation: authDialogIn 0.22s ease both;
}

@keyframes authDialogIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.auth-dialog-head {
  position: relative;
  padding: 27px 28px 22px;
  color: var(--white);
  background:
    radial-gradient(circle at 15% 20%, rgba(227, 22, 18, 0.34), transparent 15rem),
    linear-gradient(135deg, var(--ink-800), var(--ink-950));
}

.auth-dialog-head::after {
  content: "";
  position: absolute;
  left: 28px;
  bottom: 0;
  width: 46px;
  height: 3px;
  border-radius: var(--radius-pill);
  background: var(--red-500);
}

.auth-dialog-head h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
}

.auth-dialog-head p {
  margin: 8px 0 0;
  color: var(--ink-300);
  font-size: 12px;
}

.auth-close {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 2;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--ink-300);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transition: 0.2s ease;
}

.auth-close:hover {
  color: var(--white);
  background: rgba(227, 22, 18, 0.22);
}

.auth-close svg {
  width: 18px;
  height: 18px;
}

.auth-form {
  padding: 25px 28px 28px;
}

.auth-field + .auth-field {
  margin-top: 15px;
}

.auth-field label {
  display: block;
  margin-bottom: 7px;
  color: var(--ink-700);
  font-size: 11px;
  font-weight: 800;
}

.auth-input-wrap {
  position: relative;
}

.auth-input-wrap svg {
  position: absolute;
  top: 50%;
  right: 15px;
  width: 19px;
  height: 19px;
  color: var(--ink-400);
  transform: translateY(-50%);
  pointer-events: none;
}

.auth-input {
  width: 100%;
  min-height: 52px;
  padding: 0 46px 0 15px;
  color: var(--ink-900);
  background: var(--paper);
  border: 1px solid var(--ink-100);
  border-radius: 15px;
  outline: none;
  direction: ltr;
  text-align: left;
  transition: 0.2s ease;
}

.auth-input:focus {
  background: var(--white);
  border-color: var(--red-400);
  box-shadow: 0 0 0 4px rgba(227, 22, 18, 0.09);
}

.auth-error {
  min-height: 22px;
  margin: 10px 0 0;
  color: var(--red-600);
  font-size: 11px;
  font-weight: 700;
}

.auth-submit {
  width: 100%;
  min-height: 52px;
  margin-top: 6px;
  color: var(--white);
  background: var(--red-500);
  border: 0;
  border-radius: 15px;
  font-weight: 800;
  box-shadow: 0 13px 30px rgba(227, 22, 18, 0.22);
  transition: 0.2s ease;
}

.auth-submit:hover {
  background: var(--red-400);
  transform: translateY(-1px);
}

.auth-submit:disabled {
  cursor: wait;
  opacity: 0.65;
  transform: none;
}

.auth-note {
  margin: 14px 0 0;
  color: var(--ink-400);
  font-size: 10px;
  text-align: center;
}

body.modal-open {
  overflow: hidden;
}

