:root {
  color-scheme: dark;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #f5f6fa;
  background: #0c0e13;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(145deg, #111621 0, #0c0e13 55%);
}
.brand {
  display: flex;
  align-items: center;
  gap: 1px;
  padding: 30px 40px;
  font-size: 22px;
  font-weight: 850;
  letter-spacing: -1px;
}
.brand > img {
  display: block;
  width: 102px;
  height: 42px;
  object-fit: contain;
}
.brand-label {
  margin-left: 18px;
  padding-left: 18px;
  border-left: 1px solid #30343e;
  color: #717b8e;
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 600;
}
main {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 36px 20px 70px;
}
.card {
  width: 100%;
  max-width: 440px;
  border: 1px solid #262c38;
  border-radius: 24px;
  background: #141820;
  padding: 40px;
  text-align: center;
  box-shadow: 0 24px 90px #0003;
}
.mark {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 28px;
  border-radius: 20px;
  background: #1e2d48;
  color: #79a9ff;
  border: 1px solid #2b4063;
}
.mark svg {
  width: 30px;
  height: 30px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  color: #7e8da5;
  font-weight: 600;
  margin: 0 0 12px;
}
h1 {
  font-size: 30px;
  font-weight: 650;
  letter-spacing: -0.9px;
  margin: 0 0 14px;
}
.intro {
  color: #9ba5b5;
  font-size: 15px;
  line-height: 1.7;
  margin: 0 0 30px;
}
.primary {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 12px;
  color: white;
  background: #367cf4;
  font-weight: 600;
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s;
}
.primary:hover {
  background: #4c8bfa;
}
.primary svg {
  width: 20px;
  height: 20px;
}
.primary:disabled {
  cursor: wait;
  opacity: 0.55;
}
.primary:focus-visible,
.secondary:focus-visible {
  outline: 2px solid #a4c6ff;
  outline-offset: 5px;
}
.secondary {
  display: block;
  margin: 16px auto 0;
  color: #85b1ff;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
}
[hidden] {
  display: none !important;
}
.confirmation {
  margin-top: 24px;
  padding: 16px;
  border: 1px solid #2b4063;
  border-radius: 12px;
  background: #1e2d48;
  color: #b8c6db;
  font-size: 12px;
  line-height: 1.6;
}
.confirmation strong {
  display: block;
  font-size: 32px;
  letter-spacing: 8px;
  padding: 6px 0;
  color: #fff;
}
.key-label {display:block;text-align:left;font-size:13px;color:#b8c6db;margin:20px 0;}
.key-label input {display:block;width:100%;padding:12px;margin-top:8px;border:1px solid #303b50;border-radius:8px;background:#10141d;color:#fff;font:inherit;}
.key-row {display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:16px;padding-bottom:12px;border-bottom:1px solid #303b50;text-align:left;overflow-wrap:anywhere;}
.key-row button {border:0;background:none;color:#ffaaa5;cursor:pointer;font:inherit;}
button.secondary {border:0;background:none;font-family:inherit;}
.status {
  font-size: 13px;
  line-height: 1.6;
  color: #b8c6db;
  margin: 18px 0 0;
  overflow-wrap: anywhere;
}
.status:empty {
  display: none;
}
.hint {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid #292e38;
  color: #748196;
  text-align: left;
  font-size: 12px;
  line-height: 1.6;
}
.hint p {
  margin: 0;
}
.hint > span {
  font-size: 20px;
}
footer {
  padding: 24px;
  text-align: center;
  font-size: 11px;
  color: #626d7f;
}
footer span {
  margin: 0 10px;
}
.success .mark {
  color: #6bd2a4;
  background: #173629;
  border-color: #295442;
}
.details {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  text-align: left;
  padding: 18px 0;
  border-top: 1px solid #292e38;
  margin-bottom: 20px;
  color: #9ba5b5;
  font-size: 13px;
}
.details strong {
  color: #e5eaf4;
}
.error {
  color: #ffaaa5;
}
@media (max-width: 480px) {
  .brand {
    padding: 24px;
  }
  .card {
    padding: 30px 24px;
  }
  main {
    padding: 24px 16px 40px;
  }
  h1 {
    font-size: 27px;
  }
}

.otp-qr { display:block; max-width:100%; height:auto; margin:20px auto; border-radius:16px; background:#fff; padding:12px; }
.otp-secret { display:block; overflow-wrap:anywhere; padding:16px 0; user-select:all; font-size:16px; letter-spacing:1px; }
.otp-dialog { width:min(440px,calc(100vw - 40px)); border:1px solid #455149; border-radius:24px; background:#101b18; color:#f2f8f5; padding:28px; box-shadow:0 30px 100px #0009; }
.otp-dialog::backdrop { background:#000a; backdrop-filter:blur(6px); }
.otp-dialog form {display:grid; gap:16px}.otp-dialog h2 {margin:0;font-size:22px}.otp-dialog p {line-height:1.6;color:#b4c3bc;margin:0}.otp-dialog label {display:grid;gap:8px}.otp-dialog input {padding:14px;border-radius:12px;background:#07110d;color:white;border:1px solid #455149;font-size:22px;letter-spacing:6px}.otp-dialog button {padding:14px;border-radius:12px;cursor:pointer}
#totp-management,#totp-setup,#totp-login-section {margin-top:24px;padding-top:20px;border-top:1px solid #ffffff18}

#status:empty {display:none}

body { padding-top: env(safe-area-inset-top); padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); padding-bottom: max(24px, env(safe-area-inset-bottom)); min-height: 100dvh; }
