.auth-dialog {
  width: min(460px, calc(100% - 28px));
  max-height: calc(100vh - 28px);
  overflow: auto;
  border: 0;
  border-radius: 12px;
  padding: 30px;
  color: var(--ink);
  box-shadow: 0 30px 90px rgba(15, 24, 20, 0.3);
}

.auth-dialog::backdrop {
  background: rgba(10, 18, 14, 0.58);
  backdrop-filter: blur(3px);
}

.auth-close {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 24px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}

.auth-brand small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
}

.auth-panel {
  display: grid;
  gap: 16px;
}

.auth-panel h2,
.auth-panel p {
  margin: 0;
}

.auth-panel p {
  color: var(--muted);
  line-height: 1.5;
}

.auth-links {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.auth-links button {
  border: 0;
  padding: 4px 0;
  background: transparent;
  color: var(--green);
  font-weight: 800;
}

.auth-notice {
  border: 1px solid rgba(46, 125, 50, 0.28);
  border-radius: 8px;
  background: rgba(46, 125, 50, 0.08);
  color: var(--green);
  font-weight: 800;
  line-height: 1.45;
  padding: 11px 12px;
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  padding-right: 48px;
  width: 100%;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  transform: translateY(-50%);
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
}

.password-toggle:hover,
.password-toggle.active {
  background: rgba(31, 83, 59, 0.08);
  color: var(--green);
}

.password-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

#authStatus {
  margin-top: 16px;
}

@media (max-width: 520px) {
  .auth-dialog {
    padding: 24px 18px;
  }

  .auth-links {
    align-items: flex-start;
    flex-direction: column;
  }
}
