@font-face { font-family: "IBM Plex Sans"; src: url("/fonts/IBMPlexSans-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("/fonts/IBMPlexSans-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }

:root {
  --navy: #0F1B2E;
  --blue: #2563EB;
  --blue-dark: #1D4ED8;
  --ink: #101828;
  --muted: #475467;
  --line: #D0D5DD;
  --error: #B42318;
  --error-bg: #FEF3F2;
}

* { box-sizing: border-box; }

html, body { height: 100%; margin: 0; }

body {
  font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--navy);
  background-image: radial-gradient(circle at 20% 0%, #1B2B47 0, var(--navy) 55%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, .28);
}

.logo { display: block; height: 24px; width: auto; margin-bottom: 28px; }

h1 { font-size: 22px; font-weight: 600; margin: 0 0 20px; }

label { display: block; font-size: 14px; font-weight: 600; margin: 14px 0 6px; }

input[type=text], input[type=password] {
  width: 100%;
  font: inherit;
  font-size: 16px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}
input[type=text]:focus, input[type=password]:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, .18); }

input.code { font-size: 24px; letter-spacing: 6px; text-align: center; font-variant-numeric: tabular-nums; margin-top: 8px; }

label.check { display: flex; align-items: center; gap: 8px; font-weight: 400; color: var(--muted); }

button {
  width: 100%;
  margin-top: 20px;
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  color: #fff;
  background: var(--blue);
  border: 0;
  border-radius: 8px;
  padding: 11px 16px;
  cursor: pointer;
}
button:hover { background: var(--blue-dark); }
button:disabled { opacity: .6; cursor: wait; }
button.link { background: none; color: var(--blue); margin-top: 10px; padding: 6px; font-weight: 400; }
button.link:hover { text-decoration: underline; }

.hint { color: var(--muted); font-size: 14px; line-height: 1.5; margin: 0 0 8px; }
.company { font-weight: 600; margin: -10px 0 10px; }

.error {
  color: var(--error);
  background: var(--error-bg);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  margin: 14px 0 0;
}

.qr { display: flex; justify-content: center; margin: 12px 0; }
.qr svg { width: 200px; height: 200px; }

details { margin: 4px 0 8px; font-size: 14px; }
summary { color: var(--blue); cursor: pointer; }
code.secret { display: block; font-size: 15px; letter-spacing: 1px; background: #F2F4F7; padding: 8px 10px; border-radius: 6px; word-break: break-all; }

footer { display: flex; justify-content: space-between; align-items: center; margin-top: 28px; font-size: 12px; color: var(--muted); }
footer select { font: inherit; font-size: 12px; border: 1px solid var(--line); border-radius: 6px; padding: 3px 6px; background: #fff; color: var(--muted); }

.spinner { width: 36px; height: 36px; margin: 8px auto 16px; border: 3px solid #E4E7EC; border-top-color: var(--blue); border-radius: 50%; animation: spin .9s linear infinite; }
#step-loading .hint { text-align: center; }
@keyframes spin { to { transform: rotate(360deg); } }

[hidden] { display: none !important; }
