/* =====================
   Auth pages — login, signup, forgot-password, reset-password
   Uses the same CSS variables as main-b2b.css
   ===================== */

.auth-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
}

.auth-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2rem 2.25rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.auth-card h1 {
  font-size: 20px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.3rem;
}

.auth-subtitle {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 1.75rem;
}

/* ---- Fields ---- */
.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 1rem;
}

.auth-field label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
}

.auth-field input {
  width: 100%;
  height: 40px;
  padding: 0 0.75rem;
  border: 1px solid var(--input-border);
  border-radius: 6px;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-field input:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(0, 52, 89, 0.08);
}

.auth-field input.field-invalid {
  border-color: var(--danger-strong);
}

.field-error {
  font-size: 12px;
  color: var(--danger-strong);
  display: none;
}

.field-error.visible {
  display: block;
}

/* ---- Primary button ---- */
.auth-btn {
  width: 100%;
  height: 42px;
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  transition: background 0.15s;
}

.auth-btn:hover:not(:disabled) {
  background: #004a7c;
}

.auth-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ---- Alert banner ---- */
.auth-alert {
  padding: 0.7rem 1rem;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 1.1rem;
  display: none;
  align-items: flex-start;
  gap: 0.5rem;
}

.auth-alert.visible {
  display: flex;
}

.auth-alert.alert-error {
  background: var(--danger-bg);
  color: var(--danger-text);
  border: 1px solid #f5c6c6;
}

.auth-alert.alert-success {
  background: var(--success-bg);
  color: var(--success-text);
  border: 1px solid #b2dac9;
}

.auth-alert a {
  color: inherit;
  font-weight: 600;
}

/* ---- Divider & links ---- */
.auth-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.25rem 0;
}

.auth-links {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

.auth-links a {
  color: var(--navy);
  text-decoration: none;
  font-weight: 500;
}

.auth-links a:hover {
  text-decoration: underline;
}

/* ---- Spinner ---- */
@keyframes auth-spin {
  to { transform: rotate(360deg); }
}

.spin {
  animation: auth-spin 0.9s linear infinite;
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
  .auth-card {
    padding: 1.5rem 1.25rem;
    border-radius: 8px;
  }
}
