.auth-page {
  min-height: calc(100vh - 72px);
  min-height: calc(100dvh - 72px);
  background: linear-gradient(180deg, #f3e8ff 0%, #f9f5fc 40%, #fafafa 100%);
  padding: 2rem 0 3rem;
}

.auth-card {
  width: min(480px, 92vw);
  margin: 0 auto;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(123, 31, 162, 0.12);
  padding: 2rem 1.5rem;
  border: 1px solid #ececf3;
}

.auth-card--wide {
  width: min(520px, 92vw);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  color: #7b1fa2;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
}

.auth-brand:hover {
  text-decoration: none;
  color: #4a148c;
}

.auth-title {
  margin: 0 0 0.35rem;
  font-size: 1.75rem;
  line-height: 1.2;
  color: #2d1b3d;
}

.auth-subtitle {
  margin: 0 0 1.5rem;
  color: #6b5b7a;
  font-size: 0.95rem;
  line-height: 1.5;
}

.auth-banner {
  background: #fce8e6;
  color: #b3261e;
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.92rem;
  line-height: 1.45;
}

.auth-banner--info {
  background: #ede9fe;
  color: #4a148c;
}

.auth-field {
  margin-bottom: 1rem;
}

.auth-field label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: #2d1b3d;
  margin-bottom: 0.35rem;
}

.auth-field input,
.auth-field select {
  width: 100%;
  padding: 0.85rem 0.9rem;
  border: 1px solid #d8d0e3;
  border-radius: 12px;
  font: inherit;
  font-size: 16px;
  background: #ffffff;
  color: #2d1b3d;
  min-height: 48px;
}

.auth-field input:focus,
.auth-field select:focus {
  outline: none;
  border-color: #7b1fa2;
  box-shadow: 0 0 0 3px rgba(123, 31, 162, 0.15);
}

.auth-field .hint {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: #6b5b7a;
  line-height: 1.4;
}

.auth-input-row {
  display: flex;
  align-items: stretch;
}

.auth-prefix {
  display: flex;
  align-items: center;
  padding: 0 0.75rem;
  background: #f9f5fc;
  border: 1px solid #d8d0e3;
  border-right: none;
  border-radius: 12px 0 0 12px;
  color: #6b5b7a;
  font-size: 1rem;
  flex-shrink: 0;
}

.auth-input-row input {
  border-radius: 0 12px 12px 0;
  min-width: 0;
}

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

.auth-password-wrap input {
  padding-right: 4.75rem;
}

.auth-password-toggle {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: #7b1fa2;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.5rem 0.65rem;
  min-width: 44px;
  min-height: 44px;
}

.auth-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.auth-actions .btn {
  width: 100%;
  text-align: center;
  border: none;
  cursor: pointer;
  font: inherit;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.auth-actions .btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.auth-link-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
  margin: 0.25rem 0 0.5rem;
  font-size: 0.9rem;
}

.auth-link-row a {
  padding: 0.35rem 0;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.auth-footer-link {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.92rem;
  color: #6b5b7a;
}

.auth-footer-link a {
  font-weight: 600;
}

.nav-auth {
  font-weight: 600;
}

.nav--auth {
  gap: 0.5rem;
}

@media (max-width: 800px) {
  .nav .nav-auth {
    display: inline;
  }
}

@media (max-width: 640px) {
  .auth-page {
    padding: 0;
    min-height: calc(100dvh - 56px);
    background: #f9f5fc;
  }

  .auth-card,
  .auth-card--wide {
    width: 100%;
    max-width: none;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    border: none;
    border-top: 1px solid #ececf3;
    padding: 1.25rem 1rem calc(1.5rem + env(safe-area-inset-bottom));
    min-height: calc(100dvh - 56px);
  }

  .auth-brand {
    margin-bottom: 1rem;
    font-size: 0.95rem;
  }

  .auth-title {
    font-size: 1.5rem;
  }

  .auth-subtitle {
    margin-bottom: 1.25rem;
    font-size: 0.92rem;
  }

  .auth-field {
    margin-bottom: 0.85rem;
  }

  .site-header .header-inner {
    padding: 0.65rem 0;
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }

  .site-header .brand {
    font-size: 1rem;
    max-width: 55vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
