:root { --navy: #17365c; --blue: #2486c1; --bg: #f7f9fb; --line: #dde5ee; --text: #1a2433; --muted: #5d6878; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--bg); color: var(--text); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.card { width: min(420px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 28px; box-shadow: 0 10px 30px rgba(15, 35, 60, .08); }
.brand { margin: 0 0 18px; font-weight: 800; letter-spacing: .04em; color: var(--navy); }
.brand span { font-weight: 600; color: var(--blue); letter-spacing: 0; }
h1 { font-size: 1.45rem; margin: 0 0 18px; }
h2 { font-size: 1.05rem; margin: 22px 0 8px; }
.stack { display: grid; gap: 14px; }
label { display: grid; gap: 6px; font-weight: 600; font-size: .92rem; }
label small { font-weight: 400; color: var(--muted); }
input { font: inherit; padding: .7em .9em; border: 1.5px solid var(--line); border-radius: 10px; }
input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 4px #e3ecf6; }
button { font: inherit; font-weight: 700; padding: .75em 1.2em; border: 0; border-radius: 999px; background: var(--navy); color: #fff; cursor: pointer; }
button:disabled { opacity: .6; cursor: default; }
button.secondary { background: transparent; color: var(--navy); border: 1.5px solid var(--navy); margin-top: 18px; }
.msg { min-height: 1.5em; margin: 14px 0 0; color: #a1261c; font-size: .92rem; }
.msg.ok { color: #1d6b3f; }
.muted { color: var(--muted); }
.sites { padding-left: 1.1em; }

/* `hidden` must win over display: grid on the forms (the code step stays hidden until "Continue" worked) */
[hidden] { display: none !important; }

/* Waiting for the server: the button becomes a gradient that sweeps left to right and back */
button.loading {
  cursor: progress; opacity: 1;
  background: linear-gradient(90deg, var(--navy) 0%, var(--blue) 35%, #7cc3ec 50%, var(--blue) 65%, var(--navy) 100%);
  background-size: 300% 100%;
  animation: sweep 1.4s ease-in-out infinite alternate;
}
button.secondary.loading { color: #fff; border-color: transparent; }
@keyframes sweep { from { background-position: 100% 0; } to { background-position: 0% 0; } }
@media (prefers-reduced-motion: reduce) { button.loading { animation: none; background: var(--blue); } }
