/* =========================================================
   INSTITUTO FLC — MATRÍCULA NATIVA
   Escopo exclusivo da página de matrícula
   ========================================================= */

.enrollment-hero {
  position: relative;
  overflow: hidden;
}

.enrollment-hero::after {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  right: -150px;
  top: -180px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow:
    0 0 0 38px rgba(255,255,255,.025),
    0 0 0 76px rgba(255,255,255,.018);
  pointer-events: none;
}

.enrollment-shell {
  max-width: 1120px;
}


/* =========================================================
   CARREGAMENTO / VISITANTE
   ========================================================= */

.enrollment-loading,
.enrollment-guest {
  max-width: 760px;
  margin: 0 auto;
  padding: 34px;
  border: 1px solid #dce4ec;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 16px 45px rgba(11,35,65,.08);
}

.enrollment-loading {
  display: flex;
  align-items: center;
  gap: 20px;
}

.enrollment-loading p,
.enrollment-guest p {
  margin-bottom: 0;
  color: #5d6874;
}

.enrollment-loading-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 50%;
  border: 4px solid #dbe5ee;
  border-top-color: #0b2341;
  animation: flcEnrollmentSpin .8s linear infinite;
}

@keyframes flcEnrollmentSpin {
  to { transform: rotate(360deg); }
}


/* =========================================================
   INTRODUÇÃO / CONTA RECONHECIDA
   ========================================================= */

.enrollment-app {
  width: 100%;
}

.enrollment-intro {
  display: grid;
  grid-template-columns: minmax(0,1fr) 330px;
  gap: 28px;
  align-items: stretch;
  margin-bottom: 28px;
}

.enrollment-intro h2 {
  margin-top: 8px;
  margin-bottom: 12px;
}

.enrollment-intro p {
  max-width: 700px;
  color: #5d6874;
}

.enrollment-account-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 22px 24px;
  border: 1px solid #d7e0e8;
  border-left: 4px solid #0b2341;
  border-radius: 14px;
  background: linear-gradient(145deg,#ffffff,#f7f9fb);
}

.enrollment-account-card > span {
  margin-bottom: 3px;
  color: #6b7580;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.enrollment-account-card strong {
  color: #0b2341;
  font-size: 1.08rem;
}

.enrollment-account-card small {
  color: #66717c;
  overflow-wrap: anywhere;
}


/* =========================================================
   BARRA DE PROGRESSO
   ========================================================= */

.enrollment-progress {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5,1fr);
  gap: 0;
  margin: 0 0 30px;
  padding: 0 8px;
}

.enrollment-progress::before {
  content: "";
  position: absolute;
  top: 20px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: #dce3e9;
  z-index: 0;
}

.enrollment-progress-item {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  color: #8a949e;
  text-align: center;
  font-size: .78rem;
}

.enrollment-progress-item span {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 2px solid #d8e0e7;
  border-radius: 50%;
  background: #fff;
  color: #7d8791;
  font-weight: 800;
  transition: .2s ease;
}

.enrollment-progress-item strong {
  font-size: .78rem;
  font-weight: 700;
}

.enrollment-progress-item.is-active {
  color: #0b2341;
}

.enrollment-progress-item.is-active span {
  border-color: #0b2341;
  background: #0b2341;
  color: #fff;
  box-shadow: 0 0 0 5px rgba(11,35,65,.08);
}

.enrollment-progress-item.is-complete {
  color: #3d674e;
}

.enrollment-progress-item.is-complete span {
  border-color: #47775a;
  background: #47775a;
  color: #fff;
}


/* =========================================================
   PAINEL DAS ETAPAS
   ========================================================= */

.enrollment-form {
  margin: 0;
}

.enrollment-step {
  padding: 34px;
  border: 1px solid #dbe3ea;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 16px 48px rgba(11,35,65,.07);
}

.enrollment-step[hidden] {
  display: none !important;
}

.enrollment-step-heading {
  padding-bottom: 22px;
  margin-bottom: 26px;
  border-bottom: 1px solid #e7ebef;
}

.enrollment-step-heading h3 {
  margin: 5px 0 8px;
  color: #0b2341;
  font-size: clamp(1.35rem,2vw,1.8rem);
}

.enrollment-step-heading p {
  max-width: 760px;
  margin: 0;
  color: #68737e;
}

.enrollment-step-number {
  color: #8a6425;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}


/* =========================================================
   ETAPA 1 — IDENTIFICAÇÃO
   ========================================================= */

.enrollment-identity-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.enrollment-identity-grid > div {
  padding: 18px 20px;
  border: 1px solid #e0e6eb;
  border-radius: 12px;
  background: #f8fafb;
}

.enrollment-identity-grid strong {
  display: block;
  margin-top: 5px;
  color: #17283c;
  overflow-wrap: anywhere;
}

.field-caption {
  display: block;
  color: #6d7781;
  font-size: .77rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}


/* =========================================================
   ETAPA 2 — OFERTAS
   ========================================================= */

.enrollment-offerings {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 18px;
}

.enrollment-offering-card {
  position: relative;
  width: 100%;
  padding: 24px;
  border: 1px solid #dce3e9;
  border-radius: 15px;
  background: #fff;
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition:
    transform .18s ease,
    border-color .18s ease,
    box-shadow .18s ease,
    background .18s ease;
}

.enrollment-offering-card:hover {
  transform: translateY(-2px);
  border-color: #aebdcc;
  box-shadow: 0 12px 28px rgba(11,35,65,.09);
}

.enrollment-offering-card:focus-visible {
  outline: 3px solid rgba(11,35,65,.22);
  outline-offset: 3px;
}

.enrollment-offering-card.is-selected {
  border-color: #0b2341;
  background: linear-gradient(145deg,#ffffff,#f4f7fa);
  box-shadow:
    0 0 0 2px rgba(11,35,65,.08),
    0 14px 32px rgba(11,35,65,.10);
}

.enrollment-offering-check {
  position: absolute;
  top: 17px;
  right: 17px;
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #e7edf2;
  color: transparent;
  font-size: .8rem;
  font-weight: 900;
}

.enrollment-offering-card.is-selected .enrollment-offering-check {
  background: #0b2341;
  color: #fff;
}

.enrollment-offering-title {
  display: block;
  max-width: calc(100% - 34px);
  margin: 7px 0 12px;
  color: #0b2341;
  font-size: 1.18rem;
}

.enrollment-offering-price {
  display: block;
  color: #704d16;
  font-size: 1.25rem;
  font-weight: 800;
}

.enrollment-offering-regular {
  display: block;
  margin-top: 4px;
  color: #7b858e;
  font-size: .82rem;
}

.enrollment-offering-description {
  display: block;
  margin-top: 14px;
  color: #5f6973;
  line-height: 1.55;
}

.enrollment-module-count {
  display: inline-block;
  margin-top: 15px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #edf2f6;
  color: #455462;
  font-size: .74rem;
  font-weight: 700;
}

.enrollment-offering-modules {
  margin: 15px 0 0;
  padding: 13px 0 0 19px;
  border-top: 1px solid #e7ebee;
  color: #626d77;
  font-size: .82rem;
  line-height: 1.55;
}

.enrollment-info-note,
.enrollment-data-note {
  margin-top: 22px;
  padding: 17px 19px;
  border: 1px solid #e2e7eb;
  border-radius: 11px;
  background: #f8fafb;
  color: #5b6670;
  line-height: 1.55;
}

.enrollment-info-note a,
.enrollment-data-note a {
  font-weight: 700;
}


/* =========================================================
   ETAPA 3 — FORMULÁRIO
   ========================================================= */

.enrollment-form-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 20px;
}

.enrollment-form-grid .field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 0;
}

.enrollment-form-grid .field-wide {
  grid-column: 1 / -1;
}

.enrollment-form-grid .field > span {
  color: #26384a;
  font-size: .88rem;
  font-weight: 700;
}

.enrollment-form-grid .field em {
  margin-left: 4px;
  color: #8a6425;
  font-size: .70rem;
  font-style: normal;
  font-weight: 700;
  text-transform: uppercase;
}

.enrollment-form-grid input,
.enrollment-form-grid select {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #cfd8e0;
  border-radius: 9px;
  background: #fff;
  color: #172638;
  font: inherit;
  transition:
    border-color .18s ease,
    box-shadow .18s ease;
}

.enrollment-form-grid input:focus,
.enrollment-form-grid select:focus {
  outline: none;
  border-color: #0b2341;
  box-shadow: 0 0 0 3px rgba(11,35,65,.10);
}

.enrollment-form-grid input:invalid:not(:placeholder-shown) {
  border-color: #b65d5d;
}

.enrollment-form-grid small {
  color: #78828c;
  font-size: .76rem;
  line-height: 1.4;
}


/* =========================================================
   ETAPA 4 — REVISÃO E TERMOS
   ========================================================= */

.enrollment-review {
  overflow: hidden;
  border: 1px solid #dde4ea;
  border-radius: 13px;
}

.enrollment-review-row {
  display: grid;
  grid-template-columns: 190px minmax(0,1fr);
  gap: 18px;
  padding: 14px 18px;
  border-bottom: 1px solid #e8ecef;
}

.enrollment-review-row:last-child {
  border-bottom: 0;
}

.enrollment-review-row span {
  color: #6d7780;
  font-size: .82rem;
  font-weight: 700;
}

.enrollment-review-row strong {
  color: #213347;
  font-size: .9rem;
  overflow-wrap: anywhere;
}

.enrollment-terms {
  display: grid;
  gap: 11px;
  margin-top: 22px;
}

.enrollment-term {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 15px 17px;
  border: 1px solid #e0e5e9;
  border-radius: 10px;
  background: #fafbfc;
  color: #56626d;
  line-height: 1.5;
}

.enrollment-term input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex: 0 0 18px;
  accent-color: #0b2341;
}


/* =========================================================
   ETAPA 5 — PAGAMENTO
   ========================================================= */

.enrollment-payment-preview {
  display: grid;
  grid-template-columns: 54px minmax(0,1fr);
  gap: 18px;
  align-items: start;
  padding: 24px;
  border: 1px solid #dce4ea;
  border-radius: 14px;
  background: linear-gradient(145deg,#f9fbfc,#f4f7f9);
}

.enrollment-payment-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #0b2341;
  color: #fff;
  font-size: 1.25rem;
  font-weight: 900;
}

.enrollment-payment-preview h4 {
  margin: 5px 0 8px;
  color: #0b2341;
  font-size: 1.14rem;
}

.enrollment-payment-preview p {
  margin: 0;
  color: #65707a;
}


/* =========================================================
   AÇÕES
   ========================================================= */

.enrollment-actions-end {
  justify-content: flex-end;
  margin-top: 28px;
}

.enrollment-actions-between {
  justify-content: space-between;
  margin-top: 28px;
}

.enrollment-step .btn:disabled {
  cursor: not-allowed;
  opacity: .50;
  filter: grayscale(.15);
}


/* =========================================================
   STATUS
   ========================================================= */

[data-enrollment-status]:not(.show) {
  display: none;
}

[data-enrollment-status].show {
  margin-bottom: 20px;
}

[data-enrollment-status].success {
  border-color: #b8d2c0;
  background: #f3f9f5;
  color: #315a3f;
}

[data-enrollment-status].reject {
  border-color: #ddbcbc;
  background: #fff6f6;
  color: #7a3737;
}


/* =========================================================
   DEPOIS DA MATRÍCULA
   ========================================================= */

.enrollment-aftercare .section-header {
  max-width: 760px;
}

.enrollment-aftercare-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 18px;
  margin-top: 24px;
}

.enrollment-aftercare-grid article {
  padding: 22px;
  border: 1px solid #dce3e8;
  border-radius: 13px;
  background: #fff;
}

.enrollment-aftercare-grid strong {
  color: #0b2341;
}

.enrollment-aftercare-grid p {
  margin: 8px 0 0;
  color: #69737c;
  line-height: 1.55;
}


/* =========================================================
   RESPONSIVIDADE
   ========================================================= */

@media (max-width: 900px) {

  .enrollment-intro {
    grid-template-columns: 1fr;
  }

  .enrollment-offerings {
    grid-template-columns: 1fr;
  }

  .enrollment-aftercare-grid {
    grid-template-columns: 1fr;
  }

}


@media (max-width: 720px) {

  .enrollment-step,
  .enrollment-loading,
  .enrollment-guest {
    padding: 23px 18px;
    border-radius: 14px;
  }

  .enrollment-progress {
    grid-template-columns: repeat(5,minmax(52px,1fr));
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .enrollment-progress::before {
    display: none;
  }

  .enrollment-progress-item strong {
    font-size: .69rem;
  }

  .enrollment-progress-item span {
    width: 34px;
    height: 34px;
  }

  .enrollment-identity-grid,
  .enrollment-form-grid {
    grid-template-columns: 1fr;
  }

  .enrollment-form-grid .field-wide {
    grid-column: auto;
  }

  .enrollment-review-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .enrollment-actions-between {
    flex-direction: column-reverse;
  }

  .enrollment-actions-between .btn,
  .enrollment-actions-end .btn {
    width: 100%;
  }

  .enrollment-payment-preview {
    grid-template-columns: 1fr;
  }

}


@media (max-width: 480px) {

  .enrollment-loading {
    align-items: flex-start;
  }

  .enrollment-offering-card {
    padding: 20px 18px;
  }

  .enrollment-account-card {
    padding: 18px;
  }

}
/* Elementos controlados pelo fluxo JavaScript */
.enrollment-loading[hidden],
.enrollment-guest[hidden],
.enrollment-app[hidden] {
  display: none !important;
}