/* Login / Register / Keys — compact, no-scrollbar, fits one viewport */
.auth-blur-bg {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
  background: #111;
}
.auth-blur-bg iframe {
  width: 100%;
  height: 100%;
  border: 0;
  filter: blur(4px) brightness(0.72) saturate(0.9);
  transform: scale(1.03);
  transform-origin: center center;
}

.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: rgba(0, 0, 0, 0.28);
  box-sizing: border-box;
  overflow: hidden;
}

.auth-panel {
  position: relative;
  width: 100%;
  max-width: 400px;
  margin: auto;
  flex-shrink: 0;
  overflow: hidden;
}

.login-container,
.register-container,
.keys-card {
  width: 100%;
  margin: 0 auto;
  max-height: none;
  overflow: hidden !important;
  box-sizing: border-box;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.login-container::-webkit-scrollbar,
.register-container::-webkit-scrollbar,
.keys-card::-webkit-scrollbar,
.auth-panel::-webkit-scrollbar,
.keys-modal::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.auth-close {
  position: absolute;
  top: 6px;
  right: 8px;
  z-index: 2;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  border: 1px solid #3a3a3a;
  background: #111;
  color: #ccc !important;
  font-size: 1.25rem;
  line-height: 1;
  text-decoration: none !important;
  font-weight: 400;
  cursor: pointer;
}
.auth-close:hover {
  border-color: #ff9900;
  color: #ff9900 !important;
  background: rgba(255, 153, 0, 0.08);
}

body.auth-popup-page {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: #0a0a0a;
  overflow: hidden;
}

/* Compact form rhythm on auth pages */
body.auth-popup-page .login-container,
body.auth-popup-page .register-container {
  padding: 22px 22px 16px !important;
  max-width: 400px !important;
}
body.auth-popup-page .login-brand .dh-logo,
body.auth-popup-page .register-brand .dh-logo {
  font-size: 1.55rem !important;
}
body.auth-popup-page .login-subtitle,
body.auth-popup-page .register-subtitle {
  margin: 0 0 12px !important;
  font-size: 0.82em !important;
}
body.auth-popup-page .form-group {
  margin-bottom: 9px !important;
}
body.auth-popup-page .form-group label {
  margin-bottom: 4px !important;
  font-size: 0.7em !important;
}
body.auth-popup-page .form-group input {
  padding: 9px 11px !important;
  font-size: 0.88em !important;
}
body.auth-popup-page .form-row {
  gap: 10px !important;
}
body.auth-popup-page .auth-btn {
  padding: 10px !important;
  margin-top: 4px !important;
  font-size: 0.88em !important;
}
body.auth-popup-page .footer-links {
  margin-top: 12px !important;
  padding-top: 12px !important;
}
body.auth-popup-page .footer-links p {
  margin: 0 0 8px !important;
  font-size: 0.8em !important;
}
body.auth-popup-page .footer-links a,
body.auth-popup-page .footer-actions a {
  padding: 8px 10px !important;
  font-size: 0.78em !important;
}
body.auth-popup-page .error-message {
  padding: 8px 10px !important;
  margin-bottom: 10px !important;
  font-size: 0.8em !important;
}
body.auth-popup-page .captcha-box {
  margin-bottom: 6px !important;
}
body.auth-popup-page .captcha-box img,
body.auth-popup-page #captcha-img {
  width: 160px !important;
  height: 48px !important;
  max-width: 100%;
  object-fit: contain;
}
body.auth-popup-page .pw-toggle {
  top: 5px !important;
  height: 24px !important;
  width: 24px !important;
}

/* Private keys modal — compact, no scrollbar */
.keys-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.72);
  align-items: center;
  justify-content: center;
  padding: 12px;
  box-sizing: border-box;
  overflow: hidden;
}
.keys-overlay.show {
  display: flex;
}
.keys-modal {
  position: relative;
  width: 100%;
  max-width: 400px;
  margin: auto;
  flex-shrink: 0;
  background: #1b1b1b;
  border: 1px solid #ff9900;
  border-radius: 8px;
  padding: 20px 18px 16px;
  max-height: none;
  overflow: hidden !important;
  box-sizing: border-box;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  scrollbar-width: none;
  -ms-overflow-style: none;
}
