/* ================================================
   Mailgen — Auth Pages (Login, Signup, Forgot)
   ================================================ */
:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --text-2: #475569;
  --text-3: #94a3b8;
  --border: #e2e8f0;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-light: #eff6ff;
  --red: #dc2626;
  --red-bg: #fef2f2;
  --green: #16a34a;
  --green-bg: #f0fdf4;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: var(--font); font-size: 14px; color: var(--text);
  background: var(--bg); min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: var(--accent); }
a:hover { text-decoration: underline; }
.hidden { display: none !important; }

/* Card */
.auth-card {
  width: 100%; max-width: 420px; margin: 24px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 40px 36px;
  box-shadow: 0 4px 24px rgba(0,0,0,.04);
}
.auth-logo {
  display: flex; align-items: center; gap: 10px; justify-content: center;
  margin-bottom: 28px;
}
.auth-logo-icon {
  width: 40px; height: 40px; background: #0f172a; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.auth-logo span { font-size: 22px; font-weight: 800; letter-spacing: -.5px; }

.auth-title { font-size: 22px; font-weight: 700; text-align: center; margin-bottom: 4px; }
.auth-sub { font-size: 14px; color: var(--text-2); text-align: center; margin-bottom: 28px; }

/* Form */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.form-input {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--border);
  border-radius: 10px; font-size: 14px; color: var(--text);
  background: var(--bg); outline: none; transition: border .15s;
}
.form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.form-input::placeholder { color: var(--text-3); }
.form-error-text { font-size: 12px; color: var(--red); margin-top: 4px; display: none; }

.form-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.form-link { font-size: 13px; font-weight: 500; color: var(--accent); }

/* Button */
.btn-submit {
  width: 100%; padding: 12px; border: none; border-radius: 10px;
  background: var(--accent); color: #fff; font-size: 15px; font-weight: 600;
  cursor: pointer; transition: background .15s; display: flex;
  align-items: center; justify-content: center; gap: 8px;
}
.btn-submit:hover { background: var(--accent-hover); }
.btn-submit:disabled { opacity: .6; cursor: not-allowed; }

/* Divider */
.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 22px 0; color: var(--text-3); font-size: 12px; font-weight: 500;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* Google Button */
.btn-google {
  width: 100%; padding: 11px; border: 1.5px solid var(--border);
  border-radius: 10px; background: var(--surface); color: var(--text);
  font-size: 14px; font-weight: 600; cursor: pointer; display: flex;
  align-items: center; justify-content: center; gap: 10px;
  transition: all .15s;
}
.btn-google:hover { border-color: #4285f4; background: #f8fafc; }
.btn-google img { width: 20px; height: 20px; }

/* Alert */
.auth-alert {
  padding: 10px 14px; border-radius: 8px; font-size: 13px;
  font-weight: 500; margin-bottom: 18px; display: none;
}
.auth-alert.error { display: block; background: var(--red-bg); color: var(--red); border: 1px solid #fecaca; }
.auth-alert.success { display: block; background: var(--green-bg); color: var(--green); border: 1px solid #bbf7d0; }

/* Footer text */
.auth-footer { text-align: center; margin-top: 22px; font-size: 13px; color: var(--text-2); }
.auth-footer a { font-weight: 600; }

/* Spinner */
.spinner-sm {
  display: inline-block; width: 18px; height: 18px;
  border: 2.5px solid rgba(255,255,255,.3); border-top-color: #fff;
  border-radius: 50%; animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 480px) {
  .auth-card { margin: 12px; padding: 24px 18px; }
  .auth-title { font-size: 20px; }
  .auth-sub { font-size: 13px; }
  .form-group { margin-bottom: 14px; }
  .btn-submit, .btn-google { padding: 12px; }
  .form-row { flex-direction: column; align-items: flex-start; gap: 10px; }
  .form-link { font-size: 12px; }
  .auth-footer { font-size: 12px; }
}
