.auth-dialog {
  width: min(460px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  padding: 42px 44px 38px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 24px 80px #19141135;
  overflow-y: auto;
}
.auth-dialog::backdrop { background: #19141180; backdrop-filter: blur(5px); }
.auth-close {
  position: absolute; top: 14px; right: 18px;
  width: 36px; height: 36px; padding: 0;
  border: 0; background: transparent; color: var(--muted);
  font: 30px/1 system-ui, sans-serif;
}
.auth-close:hover { color: var(--ink); }
.auth-title { margin: 0 0 28px; text-align: center; font: 400 34px/1.15 var(--serif); letter-spacing: -0.7px; }
.auth-viewport { overflow: hidden; }
.auth-pages { display: grid; }
.auth-page { grid-area: 1 / 1; min-width: 0; transition: transform 350ms ease, opacity 250ms ease, visibility 350ms; }
.auth-page[data-auth-page="register"] { transform: translateX(105%); opacity: 0; visibility: hidden; }
.auth-dialog.is-register .auth-page[data-auth-page="login"] { transform: translateX(-105%); opacity: 0; visibility: hidden; }
.auth-dialog.is-register .auth-page[data-auth-page="register"] { transform: translateX(0); opacity: 1; visibility: visible; }
.auth-form { display: flex; flex-direction: column; }
.auth-form label { margin: 0 0 7px; font-size: 15px; font-weight: 650; }
.auth-form input { width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 6px; background: #fffdfc; color: var(--ink); font-size: 14px; }
.auth-form input:focus { outline: none; border-color: var(--brand-red); box-shadow: inset 0 0 0 1px var(--brand-red); }
.auth-form input + label, .auth-password + label, .auth-form small + label { margin-top: 17px; }
.auth-form small { margin-top: 6px; color: var(--muted); font-size: 14px; }
.auth-password { position: relative; }
.auth-password input { padding-right: 48px; }
.auth-eye { position: absolute; top: 0; right: 0; width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: transparent; color: var(--muted); }
.auth-eye:hover, .auth-eye[aria-pressed="true"] { color: var(--brand-red); }
.auth-eye img { width: 20px; height: 20px; opacity: .6; }
.auth-error { margin: 0; color: #ad2929; font-size: 15px; line-height: 1.5; }
.auth-error:not(:empty) { margin-top: 12px; }
.auth-submit { min-height: 44px; margin-top: 22px; border: 0; border-radius: 6px; background: var(--brand-red); color: white; font-size: 16px; font-weight: 650; }
.auth-submit:hover { background: #d53939; }
.auth-submit:disabled { opacity: .6; cursor: wait; }
.auth-switch { margin: 23px 0 0; text-align: center; color: var(--muted); font-size: 15px; }
.auth-switch button { padding: 0; border: 0; background: transparent; color: var(--brand-red); font-weight: 650; }
.auth-switch button:hover { text-decoration: underline; }
@media (max-width: 480px) { .auth-dialog { padding: 38px 24px 30px; } }
@media (prefers-reduced-motion: reduce) { .auth-page { transition: none; } }
