.auth-page {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  overflow-y: auto;
  background: var(--bg);
}

.auth-nav {
  min-height: 72px;
  padding-inline: max(24px, calc((100% - 1120px) / 2));
}

.auth-switch a:hover {
  color: var(--fg);
}

.auth-main {
  position: relative;
  z-index: 1;
  display: grid;
  flex: 1;
  place-items: center;
  padding: 48px 20px 60px;
}

.auth-card {
  width: min(440px, 100%);
  padding: 38px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(13, 13, 13, 0.94);
}

.auth-label {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.auth-card h1 {
  color: var(--fg);
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2.45rem;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.auth-description {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.auth-form {
  display: grid;
  gap: 9px;
  margin-top: 27px;
}

.auth-form label {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  font-weight: 500;
}

.auth-form > input,
.password-field input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 5px;
  outline: none;
  background: #101010;
  color: var(--fg);
  font: inherit;
  font-size: 13px;
  transition: border-color 0.15s, background 0.15s;
}

.auth-form > input:focus,
.password-field input:focus {
  border-color: rgba(255, 255, 255, 0.45);
  background: #121212;
}

.auth-form input::placeholder {
  color: rgba(255, 255, 255, 0.32);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 68px;
}

.password-toggle {
  position: absolute;
  top: 0;
  right: 7px;
  display: grid;
  width: 36px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.password-toggle:hover {
  color: var(--fg);
}

.password-toggle svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.password-toggle .eye-open {
  display: none;
}

.password-toggle .eye-closed {
  display: block;
}

.password-toggle[aria-pressed="true"] .eye-open {
  display: block;
}

.password-toggle[aria-pressed="true"] .eye-closed {
  display: none;
}

.auth-message {
  display: none;
  margin: 3px 0 0;
  color: #e6a3a3;
  font-size: 12px;
  line-height: 1.5;
}

.auth-message.visible {
  display: block;
}

.auth-submit {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  border: 0;
  border-radius: 5px;
  background: #fff;
  color: #090909;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  transition: opacity 0.15s;
}

.auth-submit:hover:not(:disabled) {
  opacity: 0.86;
}

.auth-submit:disabled {
  cursor: wait;
  opacity: 0.65;
}

.auth-switch {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

.auth-switch a {
  margin-left: 4px;
  color: var(--fg);
  text-decoration: none;
  transition: color 0.15s;
}

.auth-footer {
  position: relative;
  z-index: 1;
  padding: 18px 24px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  text-align: center;
  font-size: 11px;
}

@media (max-width: 600px) {
  .auth-nav {
    min-height: 66px;
    padding-inline: 20px;
  }

  .auth-main {
    align-items: start;
    padding: 30px 16px 42px;
  }

  .auth-card {
    padding: 28px 23px;
  }

  .auth-card h1 {
    font-size: 2.1rem;
  }
}
