:root {
  --c-navy: #1a3a5c;
  --c-navy-hover: #15304e;
  --c-red: #e24b4a;
  --c-text-secondary: #6b7280;
  --c-text-muted: #9ca3af;
  --c-border: #e5e7eb;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body.auth-body {
  font-family: system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  background: #f3f4f6;
  color: #111827;
}
.auth-shell {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.auth-card {
  width: 100%; max-width: 400px;
  background: white;
  padding: 32px;
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(17,24,39,0.06), 0 1px 2px rgba(17,24,39,0.04);
}
.auth-card-wide { max-width: 480px; }
.auth-logo {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 18px;
}
.auth-logo-mark {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--c-navy); color: white;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 14px;
}
.auth-logo-text { font-weight: 600; font-size: 18px; color: #111827; }
.auth-heading { font-size: 18px; font-weight: 600; margin-bottom: 6px; }
.auth-subtitle { color: var(--c-text-secondary); font-size: 14px; margin-bottom: 18px; }
.auth-error {
  background: #fdeaea; color: var(--c-red); border: 1px solid #f5c2c2;
  padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-size: 13px;
}
.auth-form .form-group { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
.auth-form label { font-size: 13px; font-weight: 500; color: var(--c-text-secondary); }
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"] {
  height: 38px; padding: 6px 10px;
  border: 1px solid #d1d5db; border-radius: 8px;
  font-family: inherit; font-size: 14px; background: white;
}
.auth-form input:focus { outline: 2px solid #b8cfe8; outline-offset: 0; }
.auth-btn {
  width: 100%; height: 40px;
  background: var(--c-navy); color: white;
  border: none; border-radius: 8px;
  font-weight: 500; font-size: 14px; cursor: pointer;
  font-family: inherit;
}
.auth-btn:hover { background: var(--c-navy-hover); }
.auth-footer-text {
  margin-top: 18px; font-size: 12px; color: var(--c-text-muted);
  text-align: center;
}
.auth-link { color: var(--c-navy); font-size: 13px; }

.auth-steps {
  display: flex; gap: 16px; list-style: none;
  margin-bottom: 16px; padding: 0;
}
.auth-steps li {
  font-size: 12px; color: var(--c-text-muted);
  padding: 4px 0; border-bottom: 2px solid transparent;
}
.auth-steps li.active {
  color: var(--c-navy); border-color: var(--c-navy); font-weight: 600;
}

.qr-wrap {
  display: flex; justify-content: center; padding: 12px;
  background: white; border: 1px solid var(--c-border); border-radius: 10px;
  margin: 8px 0 12px;
}
.qr-wrap img { display: block; image-rendering: pixelated; }
.auth-details { margin: 8px 0 4px; font-size: 13px; color: var(--c-text-secondary); }
.manual-secret {
  display: block; padding: 8px 10px; margin-top: 8px;
  background: #f9fafb; border: 1px solid var(--c-border); border-radius: 6px;
  font-family: "Fira Code", monospace; font-size: 12px;
  letter-spacing: 1px; word-break: break-all;
}
.totp-input {
  text-align: center; letter-spacing: 6px;
  font-family: "Fira Code", monospace; font-size: 18px !important;
}
.auth-info-box {
  margin-top: 14px; padding: 10px 12px;
  background: #f9fafb; border: 1px solid var(--c-border); border-radius: 8px;
  font-size: 12px; color: var(--c-text-secondary);
}

.pw-strength {
  display: flex; gap: 4px; margin-top: 6px;
}
.pw-strength span {
  flex: 1; height: 4px; border-radius: 2px; background: #e5e7eb;
  transition: background 0.2s;
}
.pw-strength.s1 span:nth-child(1) { background: var(--c-red); }
.pw-strength.s2 span:nth-child(-n+2) { background: #d97706; }
.pw-strength.s3 span:nth-child(-n+3) { background: #2e7d32; }
.pw-strength.s4 span { background: #2e7d32; }
.pw-checklist {
  list-style: none; padding: 0; margin-bottom: 16px;
  display: flex; flex-direction: column; gap: 4px;
  font-size: 12px; color: var(--c-text-secondary);
}
.pw-checklist li::before {
  content: "○"; margin-right: 8px; color: var(--c-text-muted);
}
.pw-checklist li.ok { color: #2e7d32; }
.pw-checklist li.ok::before { content: "✓"; color: #2e7d32; }
