:root {
  --bg: #E7EEFA; --card: #fff; --ink: #1A2442; --ink-soft: #5B6788; --brand: #2F6FED; --danger: #D1667A; --field: #EEF2FB;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0E1424; --card: #172036; --ink: #E8EDFB; --ink-soft: #9AA6C6; --danger: #E27A8E; --field: #0E1424; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: var(--bg); color: var(--ink);
  font: 16px/1.4 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Inter, sans-serif;
}
.card { width: 100%; max-width: 360px; background: var(--card); border-radius: 28px; padding: 28px 22px 22px; text-align: center; box-shadow: 0 6px 24px rgba(26, 36, 66, 0.1); }
.logo { width: 56px; height: 56px; margin: 0 auto 10px; border-radius: 50%; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; }
.logo svg { width: 28px; height: 28px; }
h1 { font-size: 24px; margin: 0 0 6px; }
.sub { font-size: 14px; color: var(--ink-soft); margin: 0 0 20px; }
.input {
  display: block; width: 100%; min-height: 48px; border: 0; border-radius: 14px; background: var(--field); color: var(--ink);
  font: inherit; font-size: 16px; padding: 12px 16px; margin-bottom: 10px; text-align: left;
}
.input:focus { outline: 2px solid var(--brand); }
.code { text-align: center; font-size: 26px; font-weight: 700; letter-spacing: 0.3em; padding-left: 22px; }
.error { min-height: 20px; margin: 4px 0 0; font-size: 14px; color: var(--danger); }
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; border: 0; border-radius: 999px;
  background: var(--brand); color: #fff; font: inherit; font-weight: 600; font-size: 16px; cursor: pointer; margin-top: 10px; text-decoration: none;
}
.btn:disabled { opacity: 0.6; cursor: wait; }
.btn.ghost { background: transparent; color: var(--ink-soft); font-weight: 500; }
.apps { display: grid; gap: 10px; margin: 18px 0 8px; }
.apps .btn { margin: 0; }
[hidden] { display: none !important; }
