/* public/login.css — pagina di login (Fase 6). Nessuno stile inline: la pagina ha la CSP "strict". */
:root {
  --bg: #0f1420;
  --card: #171e2e;
  --line: #2a3450;
  --text: #e8ecf5;
  --muted: #9aa5c0;
  --accent: #4f7cff;
  --err: #ff6b6b;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: max(24px, env(safe-area-inset-top)) 16px 24px;
}
.box {
  width: 100%;
  max-width: 380px;
  margin-top: 8vh;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px 22px 22px;
}
.logo { font-weight: 700; font-size: 18px; margin-bottom: 14px; }
.logo span { color: var(--muted); font-weight: 400; }
h1 { font-size: 20px; margin: 0 0 14px; }
p { margin: 0 0 12px; }
label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 4px; }
input {
  width: 100%;
  font-size: 17px; /* ≥16px: Safari su iPhone non fa zoom sul campo */
  padding: 11px 12px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #0c111b;
  color: var(--text);
}
input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
#code, #enrol-code { letter-spacing: 4px; font-variant-numeric: tabular-nums; }
button {
  width: 100%;
  margin-top: 18px;
  padding: 12px;
  font-size: 16px;
  font-weight: 600;
  border: 0;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}
button:disabled { opacity: .6; cursor: default; }
.hint { font-size: 13px; color: var(--muted); margin-top: 6px; }
.hint a { color: var(--accent); }
.msg { color: var(--muted); }
.err { color: var(--err); margin: 12px 0 0; font-size: 14px; }
.hidden { display: none !important; }
.qr {
  display: block;
  width: 220px;
  height: 220px;
  margin: 8px auto 4px;
  image-rendering: pixelated;
  background: #fff;
  border-radius: 6px;
}
.secret {
  display: block;
  font: 15px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  word-break: break-all;
  background: #0c111b;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  user-select: all;
  -webkit-user-select: all;
}
/* Fase 9: recupero password, inviti, messaggi */
.ok { color: #7ee2a8; margin: 12px 0 0; font-size: 14px; }
#login-note { margin: 0 0 8px; }
.links { margin: 14px 0 0; text-align: center; }
button.link-btn {
  width: auto;
  margin: 0;
  padding: 4px 2px;
  background: none;
  color: var(--accent);
  font-weight: 400;
  font-size: 14px;
  text-decoration: underline;
}
section h1 { margin-top: 0; }
#reset-pw, #reset-pw2, #invite-pw, #invite-pw2 { letter-spacing: normal; }
@media (max-width: 420px) {
  .box { margin-top: 2vh; padding: 20px 16px 18px; }
}
