/* iOS system colours (light / dark) */
:root {
  --bg: #fff; --sbg: #f2f2f7; --card: #fff; --text: #000; --muted: #8a8a8e; --line: #c6c6c8;
  --key: #e9e9eb; --key-active: #c9c9ce; --green: #34c759; --red: #ff3b30; --blue: #007aff;
  --seg: rgba(118,118,128,.12); --seg-on: #fff;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #000; --sbg: #000; --card: #1c1c1e; --text: #fff; --muted: #8d8d93; --line: #38383a;
          --key: #333336; --key-active: #5a5a5e; --green: #30d158; --red: #ff453a; --blue: #0a84ff;
          --seg: rgba(118,118,128,.24); --seg-on: #636366; }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text);
  font: 17px/1.294 -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  letter-spacing: -.01em; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; overscroll-behavior: none; }
button, input { font: inherit; letter-spacing: inherit; color: inherit; touch-action: manipulation; }
button { border: 0; cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; background: none; padding: 0; }
svg { display: block; fill: currentColor; }
[hidden] { display: none !important; }

/* ---------- auth pages ---------- */
.auth { min-height: 100%; display: flex; flex-direction: column; justify-content: center;
  padding: max(24px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom)); max-width: 420px; margin: 0 auto; }
.auth .logo { width: 76px; height: 76px; border-radius: 17px; background: linear-gradient(#5be07c, #1fb24a); color: #fff;
  display: grid; place-items: center; margin: 0 auto 18px; font-size: 40px; }
.auth h1 { text-align: center; font-size: 28px; font-weight: 700; margin: 0 0 24px; }
.group { background: var(--card); border-radius: 10px; overflow: hidden; margin-bottom: 14px; border: .5px solid var(--line); }
.group input { display: block; width: 100%; border: 0; border-bottom: .5px solid var(--line); background: transparent;
  padding: 13px 16px; font-size: 17px; outline: none; border-radius: 0; }
.group input:last-child { border-bottom: 0; }
.primary { width: 100%; padding: 14px; border-radius: 12px; background: var(--blue); color: #fff; font-weight: 600; }
.primary:disabled { opacity: .5; }
.error { color: var(--red); text-align: center; min-height: 22px; margin: 6px 0 10px; font-size: 15px; }
.alt { text-align: center; margin-top: 18px; color: var(--muted); font-size: 15px; }
.alt a { color: var(--blue); text-decoration: none; }


.card-msg { text-align: center; color: var(--muted); font-size: 15px; margin: -8px 0 18px; line-height: 1.4; }
.secondary { width: 100%; padding: 14px; border-radius: 12px; background: var(--key); color: var(--text); font-weight: 600; margin-top: 10px; }
