/* =====================================================
   PREREGISTRO — Estilos del wizard de preregistro
   ===================================================== */

/* ---------- Reset base para la página ---------- */
.preregistro-body {
  font-family: "DM Sans", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  background: #f8faff;
  color: #1f2937;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* =====================================================
   HEADER SIMPLIFICADO (cintilla + logo, sin menú)
   ===================================================== */
.pr-header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.6);
  height: 4rem;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.pr-header .container {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  width: 100%;
}

.pr-header-logo img {
  height: 2rem;
  width: auto;
}

.pr-header-tagline {
  font-size: 0.8rem;
  color: #6b7280;
  font-weight: 500;
}

/* =====================================================
   CONTENIDO PRINCIPAL
   ===================================================== */
.pr-main {
  flex: 1;
  display: flex;
  align-items: flex-start;
  padding: 3rem 1rem 4rem;
}

.pr-wizard {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

/* =====================================================
   STEP INDICATOR
   ===================================================== */
.pr-step-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.pr-steps-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.pr-step-item {
  display: flex;
  align-items: center;
}

.pr-step-circle {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #e5e7eb;
  background: #ffffff;
  transition: all 0.3s ease;
  position: relative;
}

.pr-step-circle.active,
.pr-step-circle.done {
  background: #2563eb;
  border-color: #2563eb;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.pr-step-circle svg {
  width: 1.4rem;
  height: 1.4rem;
  stroke: #9ca3af;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pr-step-circle.active svg,
.pr-step-circle.done svg {
  stroke: #ffffff;
}

.pr-step-connector {
  width: 4rem;
  height: 2px;
  background: #e5e7eb;
  margin: 0 0.25rem;
  transition: background 0.3s ease;
}

.pr-step-connector.done {
  background: #2563eb;
}

.pr-step-labels {
  display: flex;
  align-items: center;
  gap: 0;
}

.pr-step-label-item {
  width: 3.5rem;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 500;
  color: #9ca3af;
  transition: color 0.3s ease;
}

.pr-step-label-item.active,
.pr-step-label-item.done {
  color: #2563eb;
}

.pr-step-label-spacer {
  width: 4.5rem;
}

.pr-wizard-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #111827;
  text-align: center;
  margin: 0;
}

/* =====================================================
   STEP CONTENT AREA
   ===================================================== */
.pr-step-content {
  min-height: 22rem;
  display: flex;
  align-items: center;
}

.pr-step-panel {
  display: none;
  width: 100%;
  animation: prFadeIn 0.3s ease;
}

.pr-step-panel.active {
  display: flex;
  align-items: center;
  gap: 3rem;
}

@keyframes prFadeIn {
  from { opacity: 0; transform: translateX(12px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Illustration side */
.pr-illustration {
  display: none;
  flex: 0 0 260px;
  justify-content: center;
  align-items: flex-end;
}

.pr-illustration img {
  width: 260px;
  height: 280px;
  object-fit: contain;
  drop-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border-radius: 12px;
}

@media (min-width: 768px) {
  .pr-illustration {
    display: flex;
  }
}

/* Form side */
.pr-form-side {
  flex: 1;
  max-width: 420px;
}

/* =====================================================
   FORM CONTROLS
   ===================================================== */
.pr-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.pr-field:last-child {
  margin-bottom: 0;
}

.pr-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
}

.pr-label .required {
  color: #ef4444;
  margin-left: 2px;
}

.pr-hint {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-top: 0.25rem;
}

.pr-section-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #9ca3af;
  text-transform: uppercase;
  margin: 0.75rem 0 0.25rem;
  padding-top: 0.75rem;
  border-top: 1px solid #f3f4f6;
}

.pr-fields-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.875rem;
}

.pr-input {
  height: 2.75rem;
  padding: 0 0.875rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  background: #ffffff;
  font-size: 0.9rem;
  color: #111827;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
  outline: none;
}

.pr-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.pr-input::placeholder {
  color: #9ca3af;
}

.pr-input.mono {
  font-family: "DM Mono", "Courier New", monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pr-select {
  height: 2.75rem;
  padding: 0 2.25rem 0 0.875rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 0.625rem center;
  background-size: 1rem;
  font-size: 0.9rem;
  color: #111827;
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
  outline: none;
  cursor: pointer;
}

.pr-select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.pr-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.pr-section-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.75rem;
}

/* =====================================================
   STEP 3 — Upload de certificados CSD
   ===================================================== */
.pr-dropzone {
  border: 2px dashed #d1d5db;
  border-radius: 0.75rem;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: #f9fafb;
}

.pr-dropzone:hover,
.pr-dropzone.dragging {
  border-color: #2563eb;
  background: rgba(37, 99, 235, 0.04);
}

.pr-dropzone-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pr-dropzone-icon svg {
  width: 1.25rem;
  height: 1.25rem;
  stroke: #6b7280;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pr-dropzone-text {
  text-align: center;
}

.pr-dropzone-text p {
  font-size: 0.85rem;
  color: #6b7280;
}

.pr-dropzone-or {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.4rem 0;
  width: 100%;
  max-width: 160px;
}

.pr-dropzone-or span {
  font-size: 0.75rem;
  color: #9ca3af;
}

.pr-dropzone-or::before,
.pr-dropzone-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

.pr-dropzone-link {
  font-size: 0.85rem;
  font-weight: 500;
  color: #2563eb;
  cursor: pointer;
  text-decoration: none;
}

.pr-dropzone-link:hover {
  text-decoration: underline;
}

.pr-file-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.pr-file-chip {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.75rem;
  background: rgba(37, 99, 235, 0.06);
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 0.5rem;
}

.pr-file-chip svg {
  width: 1rem;
  height: 1rem;
  stroke: #2563eb;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.pr-file-chip span {
  font-size: 0.85rem;
  color: #1f2937;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pr-file-chip button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  color: #9ca3af;
  transition: color 0.2s;
}

.pr-file-chip button:hover {
  color: #ef4444;
}

.pr-file-chip button svg {
  stroke: currentColor;
  width: 0.9rem;
  height: 0.9rem;
}

.pr-password-wrap {
  position: relative;
}

.pr-password-wrap .pr-input {
  padding-right: 2.75rem;
}

.pr-password-toggle {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #9ca3af;
  display: flex;
  align-items: center;
  transition: color 0.2s;
  padding: 0;
}

.pr-password-toggle:hover {
  color: #374151;
}

.pr-password-toggle svg {
  width: 1.1rem;
  height: 1.1rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* =====================================================
   STEP 4 — Logo y color de marca
   ===================================================== */
.pr-logo-dropzone {
  border: 2px dashed #d1d5db;
  border-radius: 0.75rem;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s;
  background: #f9fafb;
}

.pr-logo-dropzone:hover,
.pr-logo-dropzone.dragging {
  border-color: #2563eb;
}

.pr-logo-dropzone.has-image {
  cursor: default;
  border-color: rgba(37, 99, 235, 0.3);
}

.pr-logo-empty {
  aspect-ratio: 4 / 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.pr-logo-empty .pr-dropzone-icon {
  margin-bottom: 0;
}

.pr-logo-empty p {
  font-size: 0.85rem;
  color: #9ca3af;
}

.pr-logo-preview-wrap {
  position: relative;
  aspect-ratio: 4 / 2;
  background: #f3f4f6;
}

.pr-logo-preview-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 1rem;
}

.pr-logo-remove {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: #ffffff;
  border: none;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  transition: color 0.2s;
  padding: 0;
}

.pr-logo-remove:hover {
  color: #ef4444;
}

.pr-logo-remove svg {
  width: 0.85rem;
  height: 0.85rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pr-logo-hint {
  font-size: 0.75rem;
  color: #9ca3af;
  background: #f3f4f6;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  margin-top: 0.5rem;
}

/* Color picker nativo */
.pr-colorpicker-wrap {
  position: relative;
}

.pr-colorpicker-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.pr-colorpicker-preview {
  width: 100%;
  height: 5rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(0,0,0,0.08);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  transition: box-shadow 0.2s, transform 0.15s;
  user-select: none;
}

.pr-colorpicker-preview:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
  transform: translateY(-1px);
}

.pr-colorpicker-hex {
  font-family: "DM Mono", monospace;
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pr-colorpicker-hint {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.7);
  font-weight: 400;
}

/* =====================================================
   NAVIGATION BUTTONS
   ===================================================== */
.pr-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.5rem;
}

.pr-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.625rem 1.125rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-decoration: none;
}

.pr-btn svg {
  width: 1rem;
  height: 1rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.pr-btn-back {
  background: transparent;
  border: 1px solid #d1d5db;
  color: #374151;
}

.pr-btn-back:hover {
  background: #f3f4f6;
}

.pr-btn-back.hidden {
  visibility: hidden;
  pointer-events: none;
}

.pr-btn-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pr-btn-skip {
  background: #ffffff;
  border: 1px solid #d1d5db;
  color: #374151;
}

.pr-btn-skip:hover {
  background: #f3f4f6;
}

.pr-btn-next {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.pr-btn-next:hover {
  background: #1d4ed8;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

/* =====================================================
   PANTALLA DE ÉXITO
   ===================================================== */
.pr-success {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 28rem;
  gap: 1.5rem;
  text-align: center;
  padding: 2rem 1rem;
}

.pr-success.active {
  display: flex;
  animation: prFadeIn 0.4s ease;
}

.pr-success-icon {
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pr-success-icon svg {
  width: 2.5rem;
  height: 2.5rem;
  stroke: #2563eb;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pr-success h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: #111827;
}

.pr-success p {
  color: #6b7280;
  max-width: 26rem;
  font-size: 0.95rem;
}

/* =====================================================
   PANTALLA DE ÉXITO — Banner + Selector de entrada
   ===================================================== */

/* Banner superior */
.pr-success-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: 0.875rem 1.5rem;
  background: #e6f7f5;
  border-bottom: 1px solid #a7ddd8;
  font-size: 0.9rem;
  color: #0e6b63;
}

.pr-success-banner-icon {
  width: 1.1rem;
  height: 1.1rem;
  stroke: #0e9488;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* Sección principal del selector */
.pr-entry-section {
  flex: 1;
  display: flex;
  align-items: flex-start;
  padding: 3.5rem 1rem 4rem;
  background: #f8faff;
}

.pr-entry-inner {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  text-align: center;
}

.pr-entry-badge {
  display: inline-block;
  padding: 0.3rem 0.875rem;
  border: 1.5px solid #06b6d4;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #06b6d4;
  margin-bottom: 1.25rem;
}

.pr-entry-title {
  font-size: clamp(1.75rem, 4vw, 2.6rem);
  font-weight: 800;
  color: #0f172a;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.pr-entry-subtitle {
  font-size: 1rem;
  color: #6b7280;
  max-width: 480px;
  line-height: 1.6;
  margin-bottom: 2.75rem;
}

/* Cards */
.pr-entry-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  width: 100%;
}

@media (max-width: 640px) {
  .pr-entry-cards {
    grid-template-columns: 1fr;
  }
}

.pr-entry-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 2rem 1.75rem 1.75rem;
  border-radius: 1rem;
  border: 1.5px solid #e5e7eb;
  background: #ffffff;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.pr-entry-card:hover {
  border-color: #2563eb;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.12);
  transform: translateY(-2px);
}

.pr-entry-card--sandbox:hover {
  border-color: #06b6d4;
  box-shadow: 0 8px 24px rgba(6, 182, 212, 0.12);
}

.pr-entry-card-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border: 1.5px solid #2563eb;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #2563eb;
  margin-bottom: 1.1rem;
}

.pr-entry-card-badge--sandbox {
  border-color: #06b6d4;
  color: #06b6d4;
}

.pr-entry-card h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.4rem;
}

.pr-entry-card > p {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 1.5rem;
}

/* Feature list inside card */
.pr-entry-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin-bottom: 2rem;
  flex: 1;
}

.pr-entry-features li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #374151;
}

.pr-entry-features li svg {
  width: 0.9rem;
  height: 0.9rem;
  stroke: #2563eb;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.pr-entry-card--sandbox .pr-entry-features li svg {
  stroke: #06b6d4;
}

/* CTA row at the bottom of card */
.pr-entry-cta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #2563eb;
  margin-top: auto;
  transition: gap 0.2s;
}

.pr-entry-cta--sandbox {
  color: #06b6d4;
}

.pr-entry-card:hover .pr-entry-cta {
  gap: 0.65rem;
}

.pr-entry-cta svg {
  width: 1rem;
  height: 1rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* =====================================================
   FOOTER
   ===================================================== */
