/* Popup registro demo — overlay y tarjeta (rediseño: simple y profesional) */
.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(10, 16, 28, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  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: 400px;
  background: #ffffff;
  border: 1px solid #e6e9f0;
  border-radius: 16px;
  padding: 2rem 1.75rem 1.6rem;
  box-shadow: 0 24px 64px rgba(10, 16, 28, 0.22);
  font-family: "DM Sans", "Inter", system-ui, sans-serif;
  color: #0f172a;
  box-sizing: border-box;
}

.pg-modal-close,
.demo-gate-close {
  position: absolute;
  top: 0.7rem;
  right: 0.85rem;
  border: none;
  background: transparent;
  font-size: 1.3rem;
  line-height: 1;
  color: #94a3b8;
  cursor: pointer;
  padding: 0.25rem;
  transition: color 0.15s;
}
.pg-modal-close:hover { color: #475569; }

.pg-modal-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  letter-spacing: 0.02em;
}

.pg-modal-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: linear-gradient(150deg, #3b82f6, #6d28d9);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.28);
}

.pg-modal h3 {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.4rem;
  color: #111827;
}

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

.pg-modal label,
.demo-gate-field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.4rem;
}

.pg-modal input,
.demo-gate-field input {
  width: 100%;
  padding: 0.8rem 0.9rem;
  border: 1px solid #e2e8f0;
  border-radius: 11px;
  font: inherit;
  font-size: 0.92rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 0.08em;
  background: #f8fafc;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.pg-modal input:focus,
.demo-gate-field input:focus {
  outline: none;
  background: #fff;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.14);
}

.pg-modal .hint,
.demo-gate-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.76rem;
  color: #64748b;
  margin: 0.5rem 0 1.1rem;
}
.pg-modal .hint code {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  background: #eef2ff;
  color: #4f46e5;
  border-radius: 7px;
  padding: 0.14rem 0.5rem;
  font-size: 0.74rem;
}

.pg-modal .pg-modal-error {
  font-size: 0.82rem;
  color: #e11d48;
  margin: 0 0 0.75rem;
  min-height: 1.1em;
}

.pg-modal .pg-modal-btn,
.demo-gate-actions .btn-primary {
  width: 100%;
  border: none;
  border-radius: 11px;
  padding: 0.85rem 1rem;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(120deg, #4f46e5, #6d28d9);
  box-shadow: 0 12px 26px rgba(79, 70, 229, 0.32);
  transition: transform 0.12s, box-shadow 0.2s, filter 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.pg-modal .pg-modal-btn:hover { filter: brightness(1.06); box-shadow: 0 14px 30px rgba(79, 70, 229, 0.36); }
.pg-modal .pg-modal-btn:active { transform: translateY(1px); }
.pg-modal .pg-modal-btn:disabled {
  opacity: 0.6;
  cursor: wait;
  filter: none;
}

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

.pg-modal-foot {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #f1f5f9;
  text-align: center;
  font-size: 0.72rem;
  color: #94a3b8;
}
.pg-modal-foot a { color: #6b7280; text-decoration: none; }
.pg-modal-foot a:hover { color: #4f46e5; }

.pg-modal-feats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin: 0 0 1.2rem;
  padding: 0;
  list-style: none;
  font-size: 0.78rem;
  color: #475569;
}
.pg-modal-feats li { display: flex; align-items: center; gap: 0.4rem; }
.pg-modal-feats li::before { content: "✓"; color: #10b981; font-weight: 700; }

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

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