:root {
  --bnss-login-blue: #2563eb;
  --bnss-login-ink: #172033;
  --bnss-login-line: #dbe3ee;
  --bnss-login-soft: #f8fafc;
}

#login {
  width: min(92vw, 380px);
}

#login form {
  border: 1px solid var(--bnss-login-line);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .08);
}

#login form .input,
#loginform input[name="bnss_totp_code"] {
  border-color: #cbd5e1;
  border-radius: 8px;
}

#loginform input[name="bnss_totp_code"] {
  font-size: 24px;
  letter-spacing: 4px;
  text-align: center;
}

#login .button-primary {
  border-color: #1d4ed8;
  border-radius: 7px;
  background: var(--bnss-login-blue);
}

.bnss-qr-wrap,
.bnss-qr {
  display: flex;
  justify-content: center;
}

.bnss-qr svg {
  max-width: 100%;
  height: auto;
  border: 10px solid #fff;
  border-radius: 12px;
  box-shadow: 0 0 0 1px var(--bnss-login-line);
}

.bnss-backup-codes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid var(--bnss-login-line);
  border-radius: 12px;
  background: var(--bnss-login-soft);
}

.bnss-backup-codes-compact {
  margin: 10px 0 0;
}

.bnss-backup-code {
  display: block;
  padding: 7px 9px;
  border: 1px solid var(--bnss-login-line);
  border-radius: 6px;
  background: #fff;
  color: var(--bnss-login-ink);
  font-size: 14px;
  text-align: center;
}

.bnss-external-captcha {
  min-height: 65px;
  margin: 18px 0;
  overflow: hidden;
}

.bnss-export-body {
  display: grid;
  min-height: 100vh;
  margin: 0;
  place-items: center;
  background: linear-gradient(145deg, #eff6ff, #f8fafc 52%, #eef2ff);
  color: var(--bnss-login-ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.bnss-export-card {
  box-sizing: border-box;
  width: min(86vw, 440px);
  padding: 34px;
  border: 1px solid var(--bnss-login-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(15, 23, 42, .12);
  text-align: center;
}

.bnss-export-card h1 {
  margin: 14px 0 8px;
  font-size: 26px;
}

.bnss-export-card p {
  color: #475569;
  line-height: 1.55;
}

.bnss-export-card button {
  width: 100%;
  margin: 12px 0;
  padding: 11px 16px;
  border: 1px solid #1d4ed8;
  border-radius: 8px;
  background: var(--bnss-login-blue);
  color: #fff;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
}

.bnss-export-card button:disabled {
  border-color: #94a3b8;
  background: #94a3b8;
  cursor: not-allowed;
}

.bnss-export-shield {
  display: inline-grid;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 25px;
  font-weight: 800;
  place-items: center;
}

.bnss-export-card .bnss-export-error,
.bnss-export-card noscript {
  display: block;
  color: #b91c1c;
  font-weight: 650;
}

#loginform .bnss-login-visual-code {
  margin: 0 0 16px;
  padding: 12px 12px 14px;
  border: 1px solid var(--bnss-login-line);
  border-radius: 10px;
  background: var(--bnss-login-soft);
}

#loginform .bnss-login-visual-code__label {
  margin: 0 0 8px;
  font-weight: 600;
  color: var(--bnss-login-ink);
}

#loginform .bnss-login-visual-code__display {
  font: 700 22px/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.28em;
  padding: 10px 12px;
  margin: 0 0 10px;
  background: #101827;
  color: #fff;
  border-radius: 8px;
  text-align: center;
  user-select: none;
}

#loginform .bnss-login-visual-code__input {
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  text-align: center;
}

@media (max-width: 480px) {
  .bnss-backup-codes {
    grid-template-columns: 1fr;
  }

  .bnss-external-captcha {
    width: 109%;
    transform: scale(.92);
    transform-origin: left top;
  }

  .bnss-export-card {
    width: 92vw;
    padding: 24px;
  }
}
