/* Prematrícula pública — layout full-bleed sin panel izquierdo */
:root {
  --pm-banner-a: var(--primary, #2c2f74);
  --pm-banner-b: var(--accent-deep, #4a86b8);
  --pm-banner-c: var(--primary-600, #3d4194);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font, 'Poppins', system-ui, sans-serif);
  background: var(--bg, #fbfaff);
  color: var(--ink, #15102e);
}

.pm-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Banner hero animado ─────────────────────────────────────── */
.pm-banner {
  position: relative;
  overflow: hidden;
  color: #fff;
  padding: 2.25rem 1.25rem 2.5rem;
  background: linear-gradient(125deg, var(--pm-banner-a) 0%, var(--pm-banner-c) 45%, var(--pm-banner-b) 100%);
  background-size: 200% 200%;
  animation: pmBannerShift 12s ease-in-out infinite;
  box-shadow: 0 12px 32px -12px rgba(44, 47, 116, 0.45);
}

@keyframes pmBannerShift {
  0%, 100% { background-position: 0% 40%; }
  50% { background-position: 100% 60%; }
}

.pm-banner__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.35;
  pointer-events: none;
  animation: pmGlowFloat 8s ease-in-out infinite;
}

.pm-banner__glow--1 {
  width: 220px;
  height: 220px;
  background: #7db8e5;
  top: -60px;
  right: 8%;
}

.pm-banner__glow--2 {
  width: 160px;
  height: 160px;
  background: #fff;
  bottom: -50px;
  left: 12%;
  opacity: 0.12;
  animation-delay: -3s;
}

@keyframes pmGlowFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-18px, 12px) scale(1.08); }
}

.pm-banner__inner {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
  animation: pmFadeDown 0.55s ease-out;
}

@keyframes pmFadeDown {
  from { opacity: 0; transform: translateY(-14px); }
  to { opacity: 1; transform: translateY(0); }
}

.pm-banner__logo {
  max-height: 64px;
  max-width: 180px;
  object-fit: contain;
  margin-bottom: 0.75rem;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2));
}

.pm-banner__eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 0.25rem 0.85rem;
  margin-bottom: 0.65rem;
  animation: pmPulseSoft 2.4s ease-in-out infinite;
}

@keyframes pmPulseSoft {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.25); }
  50% { box-shadow: 0 0 0 8px rgba(255, 255, 255, 0); }
}

.pm-banner__title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.45rem, 3.5vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
}

.pm-banner__school {
  margin: 0;
  font-size: 1rem;
  opacity: 0.92;
  font-weight: 500;
}

/* ── Intro HTML ──────────────────────────────────────────────── */
.pm-intro {
  max-width: 860px;
  margin: -1.25rem auto 0;
  position: relative;
  z-index: 2;
  padding: 0 1rem;
  animation: pmFadeUp 0.5s ease-out 0.15s both;
}

@keyframes pmFadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.pm-intro__card {
  background: var(--paper, #fff);
  border: 1px solid var(--line, rgba(44, 47, 116, 0.12));
  border-radius: var(--radius, 18px);
  box-shadow: var(--shadow-brand-2, 0 6px 16px -8px rgba(44, 47, 116, 0.18));
  padding: 1.15rem 1.35rem;
  color: var(--ink-2, #2e2851);
  font-size: 0.95rem;
  line-height: 1.55;
}

.pm-intro__card p:last-child { margin-bottom: 0; }

/* ── Modal / panel con scroll ────────────────────────────────── */
.pm-shell {
  flex: 1;
  max-width: 980px;
  width: 100%;
  margin: 1.25rem auto 2rem;
  padding: 0 1rem;
  animation: pmFadeUp 0.55s ease-out 0.25s both;
}

.pm-modal {
  background: var(--paper, #fff);
  border: 1px solid var(--line, rgba(44, 47, 116, 0.1));
  border-radius: var(--radius-lg, 28px);
  box-shadow: 0 16px 40px -16px rgba(44, 47, 116, 0.28);
  max-height: min(82vh, 760px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pm-form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.pm-layout {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  align-items: stretch;
}

.pm-steps {
  flex: 0 0 220px;
  width: 220px;
  border-right: 1px solid var(--line, rgba(44, 47, 116, 0.12));
  background: var(--paper-2, #f6f4fc);
  overflow-y: auto;
  padding: 0.75rem 0.55rem;
}

.pm-steps__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.pm-step {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  padding: 0.45rem 0.55rem;
  cursor: pointer;
  font-family: inherit;
  color: var(--ink-2, #2e2851);
  transition: background 0.15s, border-color 0.15s;
}

.pm-step:hover {
  background: rgba(44, 47, 116, 0.06);
}

.pm-step.is-active {
  background: #fff;
  border-color: var(--primary-100, #d9dcf2);
  box-shadow: var(--shadow-brand-1);
}

.pm-step.is-error:not(.is-done) .pm-step__mark {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fca5a5;
}

.pm-step__mark {
  flex: 0 0 1.65rem;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 50%;
  border: 1px solid var(--line-strong, rgba(44, 47, 116, 0.18));
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary, #2c2f74);
}

.pm-step__check {
  display: none;
  font-size: 0.72rem;
}

.pm-step.is-done .pm-step__mark {
  background: #10b981;
  border-color: #059669;
  color: #fff;
}

.pm-step.is-done .pm-step__num { display: none; }
.pm-step.is-done .pm-step__check { display: inline-block; }

.pm-step__label {
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.25;
}

.pm-step.is-active .pm-step__label {
  color: var(--primary, #2c2f74);
}

.pm-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.pm-pane[hidden] { display: none !important; }
.pm-pane.is-active { display: block; }

.pm-modal__head {
  flex-shrink: 0;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--line, rgba(44, 47, 116, 0.1));
  background: var(--paper-2, #f6f4fc);
}

.pm-modal__head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--primary, #2c2f74);
}

.pm-modal__head p {
  margin: 0.2rem 0 0;
  font-size: 0.8rem;
  color: var(--muted, #6f6a8c);
}

.pm-pane-title {
  font-size: 1rem;
  font-weight: 650;
  color: var(--primary, #2c2f74);
  margin: 0 0 0.85rem;
}

.pm-modal__body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 1rem 1.25rem 1.15rem;
  -webkit-overflow-scrolling: touch;
  min-height: 12rem;
  max-height: none;
}

.pm-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.pm-nav-progress {
  font-weight: 600;
}

.pm-modal__body .form-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-2, #2e2851);
  margin-bottom: 0.25rem;
}

.pm-modal__body .form-control,
.pm-modal__body .form-select {
  border-radius: 10px;
  border-color: var(--line-strong, rgba(44, 47, 116, 0.18));
  font-size: 0.9rem;
}

.pm-modal__body .form-control:focus,
.pm-modal__body .form-select:focus {
  border-color: var(--primary-600, #3d4194);
  box-shadow: 0 0 0 0.2rem rgba(44, 47, 116, 0.15);
}

.pm-modal__foot {
  flex-shrink: 0;
  padding: 1rem 1.35rem 1.25rem;
  border-top: 1px solid var(--line, rgba(44, 47, 116, 0.1));
  background: var(--paper, #fff);
}

.pm-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  background: var(--primary, #2c2f74);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 0.85rem 1.25rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(44, 47, 116, 0.3);
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.pm-submit:hover,
.pm-submit:focus {
  background: var(--primary-700, #1f2258);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(44, 47, 116, 0.38);
}

.pm-back {
  display: inline-block;
  margin-top: 0.85rem;
  text-align: center;
  width: 100%;
  font-size: 0.85rem;
  color: var(--primary, #2c2f74);
  font-weight: 500;
  text-decoration: none;
}

.pm-back:hover { text-decoration: underline; color: var(--primary-700, #1f2258); }

.pm-footer {
  text-align: center;
  padding: 0.75rem 1rem 1.5rem;
  font-size: 0.78rem;
  color: var(--muted, #6f6a8c);
}

.pm-shell--status {
  animation: none;
  opacity: 1;
}

.pm-status-card {
  max-width: 520px;
  margin: 2rem auto;
  background: #fff;
  border-radius: var(--radius, 18px);
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-brand-2, 0 6px 16px -8px rgba(44, 47, 116, 0.18));
  border: 1px solid var(--line, rgba(44, 47, 116, 0.12));
  color: var(--ink, #15102e);
  opacity: 1;
}

.pm-status-card__icon {
  font-size: 2.75rem;
  line-height: 1;
  color: #059669;
  margin-bottom: 0.75rem;
}

.pm-status-card__title {
  margin: 0 0 0.75rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary, #2c2f74);
}

@media (max-width: 768px) {
  .pm-layout { flex-direction: column; }
  .pm-steps {
    flex: 0 0 auto;
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--line, rgba(44, 47, 116, 0.12));
    max-height: 9.5rem;
  }
  .pm-steps__list {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0.35rem;
    padding-bottom: 0.15rem;
  }
  .pm-step {
    min-width: 9.5rem;
  }
}

@media (max-width: 576px) {
  .pm-modal {
    max-height: min(88vh, 720px);
    border-radius: var(--radius, 18px);
  }
  .pm-banner { padding: 1.75rem 1rem 2rem; }
}
