html.demo-auth-locked body > :not(#demoAuthGate):not(script) {
  visibility: hidden !important;
}

body.demo-auth-modal-open {
  overflow: hidden !important;
}

#demoAuthGate {
  position: fixed;
  z-index: 2147483647;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  padding: 22px;
  color: #fff;
  background: #0f172a;
}

#demoAuthGate[hidden] {
  display: none;
}

.demo-auth-card {
  width: min(520px, 100%);
  padding: 24px;
  color: #1f2937;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 22px 60px rgb(0 0 0 / 25%);
}

.demo-auth-card h1 {
  margin: 0 0 12px;
  font-size: 22px;
}

.demo-auth-card label {
  display: block;
  margin-bottom: 6px;
  color: #374151;
  font-size: 14px;
}

.demo-auth-card input {
  box-sizing: border-box;
  width: 100%;
  height: 44px;
  margin-bottom: 10px;
  padding: 0 12px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
}

.demo-auth-card button,
.demo-auth-logout {
  height: 44px;
  padding: 0 14px;
  color: #fff;
  font-weight: 700;
  background: #4f46e5;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
}

.demo-auth-card button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.demo-auth-error {
  min-height: 22px;
  margin: 8px 0;
  color: #b91c1c;
  font-size: 14px;
}

#demoAuthControls {
  position: static;
  display: flex;
  width: max-content;
  align-items: center;
  gap: 10px;
  margin: 12px 12px 0 auto;
  padding: 8px;
  color: #111827;
  background: rgb(255 255 255 / 94%);
  border: 1px solid rgb(148 163 184 / 45%);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgb(15 23 42 / 18%);
}

#demoAuthControls[hidden] {
  display: none;
}

.demo-auth-identity {
  max-width: 180px;
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.demo-auth-logout {
  height: 34px;
  font-size: 12px;
  background: #334155;
}

@media (max-width: 600px) {
  .demo-auth-identity {
    display: none;
  }
}
