/* Fitness AI Connector auth pages — white card, centered, one column (instruction AO §2). */
:root {
  --bg: #f1f5f9;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #cbd5e1;
  --accent: #059669;
  --accent-hover: #047857;
  --link: #047857;
  --error-bg: #fef2f2; --error-text: #b91c1c;
  --info-bg: #eff6ff; --info-text: #1d4ed8;
  --ok-bg: #ecfdf5; --ok-text: #047857;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', 'Hiragino Sans', 'Noto Sans JP', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}
.card {
  width: 100%;
  max-width: 400px;
  background: var(--card);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 8px 24px rgba(15, 23, 42, 0.06);
  padding: 40px 32px 32px;
  text-align: center;
}
.logo { width: 56px; height: 56px; border-radius: 12px; display: block; margin: 0 auto 20px; }
h1 { font-size: 24px; font-weight: 600; margin: 0 0 8px; letter-spacing: -0.01em; }
.sub { color: var(--muted); margin: 0 0 24px; }
form { text-align: left; }
label { display: block; font-size: 13px; font-weight: 500; margin: 0 0 6px; }
input[type=email], input[type=password] {
  display: block; width: 100%;
  font: inherit; color: inherit;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  margin: 0 0 16px;
}
input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
.hint { font-size: 12px; color: var(--muted); margin: -10px 0 16px; }
.row-end { text-align: left; margin: -6px 0 20px; font-size: 14px; }
a { color: var(--link); font-weight: 500; text-decoration: none; }
a:hover { text-decoration: underline; }
.btn {
  display: block; width: 100%;
  font: inherit; font-weight: 500;
  padding: 12px 16px;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  text-align: center;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-secondary { background: #fff; color: var(--text); border-color: var(--border); }
.btn-secondary:hover:not(:disabled) { background: #f8fafc; }
.btn:disabled { opacity: 0.6; cursor: default; }
.btn + .btn { margin-top: 10px; }
.btn-google { display: flex; align-items: center; justify-content: center; gap: 10px; }
.btn-google svg { width: 18px; height: 18px; flex-shrink: 0; }
a.btn { text-decoration: none; }
.switch { margin: 20px 0 0; font-size: 14px; color: var(--muted); }
.divider {
  display: flex; align-items: center; gap: 12px;
  color: var(--muted); font-size: 12px; text-transform: uppercase;
  margin: 20px 0;
}
.divider::before, .divider::after { content: ''; flex: 1; border-top: 1px solid var(--border); }
/* Invisible Turnstile (interaction-only): no space unless Cloudflare asks the user to click. */
.captcha { display: flex; justify-content: center; }
.msg {
  text-align: left; font-size: 14px;
  border-radius: 6px; padding: 10px 12px; margin: 0 0 16px;
}
.msg-error { background: var(--error-bg); color: var(--error-text); }
.msg-info { background: var(--info-bg); color: var(--info-text); }
.msg-ok { background: var(--ok-bg); color: var(--ok-text); }
.text { text-align: left; margin: 0 0 16px; }
/* Numbered steps in the "Change Garmin account" confirmation (garmin-mcp#800). */
.steps { text-align: left; margin: 0 0 16px; padding-left: 1.4em; }
.steps li + li { margin-top: 8px; }
/* "Logged in as {email}" on the signed-in view of /login/: centred like the heading and button; a long address wraps inside the card. */
#signed-in-as { text-align: center; overflow-wrap: anywhere; }
/* "Not you?" right after the account line (garmin-mcp#800): smaller, and kept on one piece. */
#signed-in-not-you { font-size: 14px; white-space: nowrap; }
#signed-in-linked { text-align: center; }
#signed-in-change-row { text-align: center; }
.note { font-size: 13px; color: var(--muted); text-align: left; margin: 16px 0 0; }
.links { margin: 16px 0 0; display: flex; flex-direction: column; gap: 8px; }
.client-name { font-weight: 600; }
.spinner {
  width: 28px; height: 28px; margin: 8px auto 0;
  border: 3px solid #e2e8f0; border-top-color: var(--accent); border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
[hidden] { display: none !important; }
@media (max-width: 420px) {
  body { padding: 16px; align-items: flex-start; }
  .card { padding: 32px 20px 24px; }
}
