*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f3f4f6;
  color: #1f2937;
  min-height: 100vh;
}

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.auth-card {
  width: 100%;
  max-width: 460px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  padding: 32px 28px;
}

.auth-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.auth-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 50%;
}

.auth-header h1 {
  font-size: 1.375rem;
  margin-bottom: 4px;
}

.auth-header p {
  font-size: 0.875rem;
  color: #6b7280;
}

.auth-form .field {
  margin-bottom: 18px;
}

.auth-form label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.auth-form input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  font-size: 0.9375rem;
  font-family: inherit;
}

.auth-form input:focus {
  outline: none;
  border-color: #6226c2;
  box-shadow: 0 0 0 3px rgba(98, 38, 194, 0.15);
}

.field-inline {
  display: flex;
  gap: 10px;
}

.field-inline input {
  flex: 1;
}

.btn-code {
  flex-shrink: 0;
  padding: 0 14px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  font-size: 0.8125rem;
  cursor: pointer;
  white-space: nowrap;
}

.btn-code:hover:not(:disabled) {
  border-color: #6226c2;
  color: #6226c2;
}

.btn-code:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-submit {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 999px;
  background: #6226c2;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
}

.btn-submit:hover:not(:disabled) {
  background: #4e1a9e;
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-code.is-loading,
.btn-submit.is-loading {
  cursor: wait;
  opacity: 0.75;
}

.auth-message {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.875rem;
  margin-bottom: 12px;
}

.auth-message.error {
  background: #fef2f2;
  color: #b91c1c;
}

.auth-message.success {
  background: #f0fdf4;
  color: #166534;
}

.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 0.875rem;
  color: #6b7280;
}

.auth-footer a {
  color: #6226c2;
  text-decoration: none;
}

.auth-footer a:hover {
  text-decoration: underline;
}

@media (max-width: 480px) {
  .field-inline {
    flex-direction: column;
  }
}
