/* Base styles - Mobile-first */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #333;
  background-color: #f5f5f5;
}

main {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

/* Auth container - centered card layout */
.auth-container {
  width: 100%;
  max-width: 420px;
  background: white;
  border-radius: 12px;
  padding: 2rem 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.auth-container h2 {
  margin: 0 0 0.5rem 0;
  font-size: 1.75rem;
  font-weight: 600;
  color: #1a1a1a;
  text-align: center;
}

.auth-subtext {
  margin: 0 0 1.5rem 0;
  color: #666;
  text-align: center;
  font-size: 0.9375rem;
}

.auth-subtext strong {
  color: #333;
  font-weight: 600;
}

/* Form styles */
form {
  margin: 0;
}

.form-errors {
  background-color: #fee;
  border: 1px solid #fcc;
  border-radius: 6px;
  padding: 0.75rem;
  margin-bottom: 1.25rem;
  color: #c33;
  font-size: 0.9375rem;
}

.form-errors ul {
  margin: 0;
  padding-left: 1.25rem;
}

.form-field {
  margin-bottom: 1.25rem;
}

.form-field label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #333;
  font-size: 0.9375rem;
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="password"] {
  width: 100%;
  padding: 0.875rem;
  font-size: 1rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  background-color: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.form-field input:focus {
  outline: none;
  border-color: #4a90e2;
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.form-field input:invalid:not(:focus):not(:placeholder-shown) {
  border-color: #c33;
}

.help-text {
  display: block;
  margin-top: 0.375rem;
  font-size: 0.875rem;
  color: #666;
}

.help-text code {
  background-color: #f0f0f0;
  padding: 0.125rem 0.375rem;
  border-radius: 3px;
  font-size: 0.875rem;
  color: #555;
}

.field-error {
  margin-top: 0.375rem;
  color: #c33;
  font-size: 0.875rem;
}

.field-error ul {
  margin: 0;
  padding-left: 1.25rem;
}

/* Button styles */
.primary-button {
  width: 100%;
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  color: white;
  background-color: #4a90e2;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.05s;
  margin-top: 0.5rem;
  min-height: 48px; /* Large tap target for mobile */
}

.primary-button:hover {
  background-color: #357abd;
}

.primary-button:active {
  transform: scale(0.98);
}

.primary-button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.3);
}

/* Link styles */
a {
  color: #4a90e2;
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: #357abd;
  text-decoration: underline;
}

a:focus {
  outline: 2px solid #4a90e2;
  outline-offset: 2px;
  border-radius: 2px;
}

/* Auth footer */
.auth-footer {
  margin: 1.5rem 0 0 0;
  text-align: center;
  color: #666;
  font-size: 0.9375rem;
}

.password-reset-link {
  display: block;
  text-align: center;
  margin-top: 1rem;
  font-size: 0.9375rem;
}

/* Success/Info messages */
.alert {
  padding: 0.875rem 1rem;
  border-radius: 6px;
  margin-bottom: 1.25rem;
}

.alert-info {
  background-color: #e7f3ff;
  border: 1px solid #b3d9ff;
  color: #004085;
}

.alert-success {
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}

.alert-error {
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

/* Tablet and up */
@media (min-width: 768px) {
  .auth-container {
    padding: 2.5rem 2rem;
  }

  .auth-container h2 {
    font-size: 2rem;
  }

  main {
    padding: 2rem;
  }
}

