/* WellLife sign-in + two-factor — mirrors the customer-confirmed POC login. */
:root {
  --primary: #8100B6;
  --primary-hover: #6A0096;
  --primary-light: #F3E5F9;
  --surface: #FFFFFF;
  --page-bg: #F6F6F6;
  --border: #E2E8F0;
  --text: #23283D;
  --text-secondary: #475569;
  --text-muted: #64748B;
  --error: #EF4444;
  --radius-card: 12px;
  --radius-btn: 8px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: var(--page-bg);
  font-family: 'Montserrat', 'Aptos', system-ui, -apple-system, sans-serif;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border-radius: var(--radius-card);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  padding: 44px 36px 36px;
}

.logo-area { text-align: center; margin-bottom: 32px; }
.logo-area img { height: 44px; width: auto; }
.logo-area p { font-size: 13px; color: var(--text-muted); margin: 8px 0 0; }

.env-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: #FEF3C7; color: #92400E; font-size: 11px; font-weight: 600;
  padding: 4px 10px; border-radius: 20px; margin-top: 12px;
}
.env-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: #F59E0B; }

.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.form-input {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border);
  border-radius: var(--radius-btn); font-size: 14px; font-family: inherit;
  color: var(--text); background: var(--surface); outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-input::placeholder { color: var(--text-muted); }
.form-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(129, 0, 182, 0.12); }

.form-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.remember { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-secondary); cursor: pointer; }
.remember input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
.forgot { font-size: 13px; color: var(--primary); font-weight: 500; text-decoration: none; }
.forgot:hover { text-decoration: underline; }

.btn-login {
  width: 100%; padding: 12px; background: var(--primary); color: #fff; border: none;
  border-radius: var(--radius-btn); font-size: 14px; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: background 0.15s, transform 0.15s;
}
.btn-login:hover { background: var(--primary-hover); transform: translateY(-1px); }
.btn-login:active { transform: translateY(0); }

.divider { display: flex; align-items: center; gap: 16px; margin: 24px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.divider span { font-size: 12px; color: var(--text-muted); white-space: nowrap; }

.btn-sso {
  width: 100%; padding: 10px; background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-btn); font-size: 13px;
  font-weight: 500; font-family: inherit; cursor: pointer; transition: all 0.15s;
  display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
}
.btn-sso:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.btn-sso svg { width: 18px; height: 18px; }

.alert {
  background: #FEE2E2; color: #991B1B; border: 1px solid #FCA5A5;
  font-size: 13px; padding: 10px 12px; border-radius: var(--radius-btn);
  margin-bottom: 16px; text-align: center;
}

.footer-text { text-align: center; margin-top: 24px; font-size: 12px; color: var(--text-muted); }
.footer-text a { color: var(--primary); font-weight: 500; text-decoration: none; }
.footer-text a:hover { text-decoration: underline; }

/* two-factor */
.mfa-intro { font-size: 13px; color: var(--text-secondary); text-align: center; margin-bottom: 20px; line-height: 1.5; }
.otp-inputs { display: flex; gap: 8px; justify-content: center; margin-bottom: 8px; }
.otp-digit {
  width: 44px; height: 52px; text-align: center; font-size: 20px; font-weight: 600;
  border: 1px solid var(--border); border-radius: var(--radius-btn); font-family: inherit;
  color: var(--text); background: var(--surface); outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.otp-digit:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(129, 0, 182, 0.12); }
.mfa-hint { font-size: 12px; color: var(--text-muted); text-align: center; margin-bottom: 20px; }
.mfa-hint code { background: #f3f4f6; padding: 1px 5px; border-radius: 4px; font-weight: 600; }
.resend, .back-link {
  display: block; text-align: center; text-decoration: none; margin-top: 14px;
  cursor: pointer; background: none; border: none; width: 100%; font-family: inherit;
}
.resend { font-size: 13px; color: var(--primary); font-weight: 500; }
.back-link { font-size: 12px; color: var(--text-muted); margin-top: 16px; }
.resend:hover, .back-link:hover { text-decoration: underline; }

@media (max-width: 480px) { .login-card { padding: 32px 24px 28px; } }
