/* Popup registro demo — overlay a pantalla completa */
.pg-modal-overlay,
.demo-gate-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483000 !important;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-sizing: border-box;
}

.pg-modal-overlay.show,
.demo-gate-overlay.show {
  display: flex !important;
}

.pg-modal,
.demo-gate-modal {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: min(90vh, 640px);
  overflow: auto;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 1.6rem 1.5rem 1.35rem;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28);
  font-family: Inter, system-ui, sans-serif;
  color: #0f172a;
  box-sizing: border-box;
}

.pg-modal-close,
.demo-gate-close {
  position: absolute;
  top: 0.65rem;
  right: 0.75rem;
  border: none;
  background: transparent;
  font-size: 1.4rem;
  line-height: 1;
  color: #94a3b8;
  cursor: pointer;
  padding: 0.25rem;
}

.pg-modal-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 1.1rem;
}

.pg-modal-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  background: linear-gradient(135deg, #e11d48, #a855f7);
}

.pg-modal h3,
.demo-gate-modal h3 {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem;
}

.pg-modal .pg-modal-sub,
.demo-gate-modal p {
  color: #64748b;
  font-size: 0.9rem;
  margin: 0 0 1.15rem;
  line-height: 1.5;
}

.pg-modal label,
.demo-gate-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.pg-modal input,
.demo-gate-field input {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  font: inherit;
  font-size: 0.92rem;
  box-sizing: border-box;
}

.pg-modal input:focus,
.demo-gate-field input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}

.pg-modal .hint,
.demo-gate-hint {
  font-size: 0.75rem;
  color: #94a3b8;
  margin: 0.45rem 0 1rem;
}

.pg-modal .pg-modal-btn,
.demo-gate-actions .btn-primary {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 0.8rem 1rem;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(90deg, #ec4899, #a855f7);
  box-shadow: 0 10px 24px rgba(168, 85, 247, 0.28);
}

.pg-modal .pg-modal-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

.pg-modal .pg-modal-btn.ghost,
.demo-gate-actions .btn-ghost {
  background: #fff;
  color: #0f172a;
  border: 1px solid #e5e7eb;
  box-shadow: none;
  margin-top: 0.55rem;
}

.pg-modal .pg-modal-link {
  display: block;
  text-align: center;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: #64748b;
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  width: 100%;
}

.demo-gate-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}

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