/* ===== AUTH PAGES (Login / Register) ===== */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.auth {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-alt);
  padding: var(--space-lg);
}

.auth__card {
  width: 100%;
  max-width: 420px;
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-xl) var(--space-xl);
  box-shadow: var(--shadow-md);
}

.auth__logo {
  display: block;
  margin: 0 auto var(--space-xl);
  height: 56px;
  width: auto;
}

.auth__title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--color-text);
  text-align: center;
  margin-bottom: var(--space-xs);
}

.auth__subtitle {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-align: center;
  margin-bottom: var(--space-lg);
}

/* Form */
.auth__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.auth__field {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.auth__label {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
}

.auth__input {
  width: 100%;
  padding: 12px var(--space-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--color-bg);
  transition: border-color var(--transition);
  outline: none;
}

.auth__input:focus {
  border-color: var(--color-primary);
}

.auth__input:-webkit-autofill,
.auth__input:-webkit-autofill:hover,
.auth__input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--color-bg) inset;
  -webkit-text-fill-color: var(--color-text);
  transition: background-color 5000s ease-in-out 0s;
}

.auth__input::placeholder {
  color: var(--color-text-muted);
  opacity: 0.5;
}

/* Row for first/last name */
.auth__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

/* Submit button */
.auth__submit {
  width: 100%;
  padding: 14px var(--space-lg);
  border: none;
  border-radius: var(--radius);
  background: var(--color-primary);
  color: var(--color-bg);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition);
  margin-top: var(--space-sm);
}

.auth__submit:hover {
  background: var(--color-primary-hover);
}

/* Footer links */
.auth__footer {
  text-align: center;
  margin-top: var(--space-lg);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.auth__footer a {
  color: var(--color-primary);
  font-weight: 500;
  text-decoration: none;
  transition: opacity var(--transition);
}

.auth__footer a:hover {
  opacity: 0.7;
}

/* Field-level error */
.auth__field-error {
  display: block;
  color: var(--color-error);
  font-size: var(--text-xs);
  margin-top: 4px;
}

.auth__input--error {
  border-color: var(--color-error) !important;
}

/* Error message */
.auth__error {
  padding: 12px var(--space-md);
  margin-bottom: var(--space-md);
  background: rgba(192, 57, 43, 0.06);
  border: 1px solid rgba(192, 57, 43, 0.15);
  border-radius: var(--radius);
  color: var(--color-error);
  font-size: var(--text-sm);
  text-align: center;
}

/* Success message */
.auth__success {
  padding: 12px var(--space-md);
  background: rgba(46, 204, 113, 0.06);
  border: 1px solid rgba(46, 204, 113, 0.15);
  border-radius: var(--radius);
  color: var(--color-success);
  font-size: var(--text-sm);
  text-align: center;
}

/* Responsive */
@media (max-width: 480px) {
  .auth__card {
    padding: var(--space-lg);
  }

  .auth__row {
    grid-template-columns: 1fr;
  }

  .auth__logo {
    height: 44px;
  }
}
