:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #132238;
  background: #eef3f7;
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 15% 15%, rgba(56, 139, 253, 0.16), transparent 31rem),
    radial-gradient(circle at 86% 84%, rgba(25, 135, 84, 0.13), transparent 28rem),
    #eef3f7;
}

button, input { font: inherit; }

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 18px;
}

.login-card {
  width: min(100%, 460px);
  padding: 34px;
  border: 1px solid rgba(19, 34, 56, 0.09);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 22px 70px rgba(29, 52, 78, 0.14);
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 28px;
  border-radius: 15px;
  color: white;
  background: linear-gradient(135deg, #2563eb, #0f766e);
  font: 700 24px/1 Georgia, serif;
}

.eyebrow {
  margin: 0 0 7px;
  color: #2563eb;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h1 { margin: 0; font-size: clamp(28px, 7vw, 36px); letter-spacing: -0.04em; }
.lead { margin: 12px 0 24px; color: #5d6b7d; line-height: 1.55; }

form { display: grid; gap: 17px; }
label { display: grid; gap: 7px; color: #35445a; font-size: 14px; font-weight: 650; }
.field-hint { color: #738094; font-size: 12px; font-weight: 500; line-height: 1.45; }

input {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  color: #132238;
  background: white;
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

input:focus { border-color: #2563eb; box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12); }

button {
  min-height: 46px;
  padding: 10px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  color: #24344c;
  background: white;
  font-weight: 750;
  cursor: pointer;
}

button:hover { border-color: #94a3b8; background: #f8fafc; }
button:disabled { cursor: wait; opacity: 0.65; }
.primary { border-color: #2563eb; color: white; background: #2563eb; }
.primary:hover { border-color: #1d4ed8; background: #1d4ed8; }
.link-button { width: 100%; margin-top: 12px; border: 0; background: transparent; color: #2563eb; }

.qr {
  display: block;
  width: 220px;
  max-width: 76%;
  aspect-ratio: 1;
  margin: 0 auto 18px;
  border: 10px solid white;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(19, 34, 56, 0.13);
}

.secret-label { margin: 0 0 8px; color: #5d6b7d; font-size: 13px; }
.secret { display: block; margin-bottom: 22px; padding: 12px; border-radius: 10px; background: #f1f5f9; overflow-wrap: anywhere; text-align: center; }
.recovery-codes { padding: 18px; border: 1px solid #d8e1eb; border-radius: 14px; background: #f8fafc; font: 700 16px/1.75 ui-monospace, SFMono-Regular, Consolas, monospace; text-align: center; }
#recoveryView button { width: 100%; margin-top: 10px; }
.message { min-height: 21px; margin: 16px 0 0; color: #b42318; font-size: 14px; text-align: center; }
.message.success { color: #087443; }
.security-note { margin: 22px 0 0; padding-top: 18px; border-top: 1px solid #e7edf3; color: #738094; font-size: 12px; line-height: 1.5; text-align: center; }
[hidden] { display: none !important; }

@media (max-width: 520px) {
  .login-shell { padding: 0; }
  .login-card { min-height: 100vh; padding: 28px 22px; border: 0; border-radius: 0; }
}
