@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-variable.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  /* superficies claras (todo el formulario) */
  --page: #f6f5fb;
  --card: #ffffff;
  --card-2: #f7f6fb;
  --text: #191c2e;
  --text-dim: rgba(25, 28, 46, 0.6);
  --line: rgba(25, 28, 46, 0.12);

  /* panel oscuro (franja superior + rail del admin) */
  --panel-dark: #1a1436;
  --panel-dark-2: #241d4d;
  --text-invert: #ffffff;
  --text-invert-dim: rgba(255, 255, 255, 0.68);
  --line-invert: rgba(255, 255, 255, 0.16);

  /* marca */
  --brand: #4a3ac1;
  --brand-lift: #5f4de0;
  --brand-soft: rgba(74, 58, 193, 0.08);
  --lilac: #b9adf7;
  --green: #19c356;
  --green-deep: #0e7a37;
  --green-soft: #d8f7e4;
  --red: #d33a34;
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: "Manrope", system-ui, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 780px; margin: 0 auto; padding: 0 20px; }
.wrap-ancho { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ---------- Franja superior (morado oscuro: marca + progreso) ---------- */
.panel-superior {
  background: var(--panel-dark);
  color: var(--text-invert);
  padding: 30px 0 30px;
}
.panel-superior .marca {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: var(--text-invert);
}
.panel-superior .marca .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
h1 {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.05;
  font-weight: 200;
  letter-spacing: -0.038em;
  margin: 14px 0 6px;
  text-wrap: balance;
}
h1 b { font-weight: 800; }
.panel-superior h1 { color: var(--text-invert); }
.panel-superior .lede { color: var(--text-invert-dim); }
.lede { font-size: 15.5px; color: var(--text-dim); max-width: 58ch; margin: 0; }
.eyebrow {
  font-family: "Manrope", monospace;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.6;
  margin: 0 0 4px;
}
.panel-superior .eyebrow { color: var(--text-invert-dim); opacity: 1; }

/* ---------- Stepper (vive dentro de la franja oscura) ---------- */
.stepper { display: flex; gap: 8px; margin: 22px 0 10px; }
.stepper .paso {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
  position: relative;
}
.stepper .paso i {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--lilac), #fff);
  transition: width 0.5s var(--ease);
}
.stepper .paso.hecho i { width: 100%; }
.stepper .paso.actual i { width: 55%; }
.paso-label { display: flex; gap: 8px; font-size: 11.5px; color: var(--text-invert-dim); margin-bottom: 2px; }
.paso-label span { flex: 1; }
.paso-label span.actual { color: #fff; font-weight: 700; }

/* ---------- Tarjeta de sección (clara) ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 20px;
  box-shadow: 0 1px 2px rgba(25, 28, 46, 0.04), 0 10px 30px rgba(25, 28, 46, 0.05);
  animation: entra 0.45s var(--ease);
}
@keyframes entra { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.card h2 { font-size: clamp(21px, 3vw, 27px); font-weight: 200; letter-spacing: -0.03em; margin: 0 0 4px; color: var(--text); }
.card h2 b { font-weight: 800; }
.card .desc { color: var(--text-dim); font-size: 14px; margin: 0 0 26px; }

.banner-reconocido {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--green-soft);
  border: 1px solid rgba(25, 195, 86, 0.35);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 24px;
  font-size: 13.5px;
  color: var(--green-deep);
}
.banner-reconocido b { color: var(--text); }

/* ---------- Campos ---------- */
.campo { margin-bottom: 22px; }
.campo label {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
}
.campo label .req { color: var(--red); margin-left: 3px; }
.campo .ayuda { font-size: 12.5px; color: var(--text-dim); margin: -3px 0 8px; }
.campo .error { font-size: 12.5px; color: var(--red); margin-top: 6px; display: none; }
.campo.con-error .error { display: block; }
.campo.con-error input,
.campo.con-error select { border-color: var(--red) !important; }

input[type="text"],
input[type="email"],
input[type="number"],
input[type="tel"],
select {
  width: 100%;
  background: var(--card-2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 12px;
  padding: 13px 14px;
  font-family: inherit;
  font-size: 14.5px;
  outline: none;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
  appearance: none;
}
select {
  background-color: var(--card-2);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'><path d='M1 1l6 6 6-6' stroke='%234a3ac1' stroke-width='2' fill='none'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}
select option { background: var(--card); color: var(--text); }
input:focus, select:focus { border-color: var(--brand-lift); background: var(--card); }
input::placeholder { color: rgba(25, 28, 46, 0.35); }

.fila-pais-tel { display: grid; grid-template-columns: 150px 1fr; gap: 10px; }

.opciones-select { display: flex; flex-direction: column; gap: 8px; }
.opcion-radio, .opcion-check {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.opcion-radio:hover, .opcion-check:hover { border-color: var(--brand-lift); }
.opcion-radio.sel, .opcion-check.sel { border-color: var(--brand-lift); background: var(--brand-soft); }
.opcion-radio input, .opcion-check input { accent-color: var(--brand-lift); width: 16px; height: 16px; }

.otro-wrap { margin-top: 8px; }

/* Dropzone archivo */
.dropzone {
  border: 1.5px dashed rgba(74, 58, 193, 0.35);
  border-radius: 14px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  background: var(--card-2);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.dropzone:hover, .dropzone.arrastrando { border-color: var(--brand-lift); background: var(--brand-soft); }
.dropzone .icono { font-size: 26px; margin-bottom: 6px; }
.dropzone .txt { font-size: 13.5px; color: var(--text-dim); }
.dropzone .archivo-elegido { color: var(--green-deep); font-weight: 700; margin-top: 6px; font-size: 13.5px; }
.dropzone input { display: none; }

.nota-igv {
  margin-top: 10px;
  font-size: 13px;
  background: var(--brand-soft);
  border: 1px solid rgba(95, 77, 224, 0.3);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--brand);
}

ul.notas { padding-left: 18px; margin: 0 0 22px; color: var(--text-dim); font-size: 13.5px; line-height: 1.7; }
ul.notas a { color: var(--brand); }

/* ---------- Botones ---------- */
.acciones { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; }
.btn {
  border: none;
  border-radius: 999px;
  padding: 13px 26px;
  font-family: inherit;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.18s var(--ease), background 0.18s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn:hover { transform: translateY(-2px); }
.btn--brand { background: var(--brand); color: #fff; }
.btn--brand:hover { background: var(--brand-lift); }
.btn--green { background: var(--green); color: #04170a; }
.btn--ghost { background: transparent; color: var(--text-dim); border: 1px solid var(--line); }
.btn--ghost:hover { color: var(--text); border-color: rgba(25, 28, 46, 0.3); }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; transform: none; }
.btn--sm { padding: 8px 16px; font-size: 12.5px; }

/* ---------- Pantalla de éxito ---------- */
.exito { text-align: center; padding: 70px 0; }
.exito .icono { font-size: 54px; margin-bottom: 16px; }
.exito h1 { text-align: center; color: var(--text); }
.exito p { color: var(--text-dim); max-width: 46ch; margin: 10px auto 26px; }
.exito .codigo { font-family: monospace; letter-spacing: 0.1em; font-size: 13px; color: var(--brand); background: var(--card-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 16px; display: inline-block; margin-bottom: 22px; }

/* ---------- Aecodito ---------- */
.aecodito-flota {
  position: fixed;
  bottom: 22px;
  right: 22px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid rgba(74, 58, 193, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  box-shadow: 0 8px 30px rgba(74, 58, 193, 0.2);
  animation: flota 4s ease-in-out infinite;
  z-index: 30;
}
.aecodito-flota img { width: 38px; height: 38px; }
@keyframes flota { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ---------- Panel admin (rail oscuro + contenido claro) ---------- */
.admin-shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.admin-rail {
  background: var(--panel-dark);
  color: var(--text-invert);
  padding: 24px 14px;
}
.admin-rail .marca { font-weight: 800; font-size: 14px; margin-bottom: 22px; padding: 0 10px; display: flex; align-items: center; gap: 8px; color: var(--text-invert); }
.admin-rail .marca .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.admin-rail nav a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text-invert-dim);
  text-decoration: none;
  font-size: 13.5px;
  margin-bottom: 4px;
  cursor: pointer;
}
.admin-rail nav a.activo, .admin-rail nav a:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }
.admin-main { padding: 34px 40px; max-width: 980px; background: var(--page); }
.admin-main h1 { text-align: left; color: var(--text); }
.admin-main .eyebrow { color: var(--text-dim); opacity: 1; }

.pregunta-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 14px;
}
.pregunta-card .fila-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 10px; }
.pregunta-card .tag-tipo {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
}
.pregunta-card.inactivo { opacity: 0.5; }
.mini-label { font-size: 11.5px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.06em; margin: 12px 0 5px; }
.fila-botones { display: flex; gap: 8px; }
.chip-opcion { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.chip-opcion input { flex: 1; }
.icon-btn {
  background: var(--card-2);
  border: 1px solid var(--line);
  color: var(--text-dim);
  border-radius: 8px;
  width: 30px;
  height: 30px;
  cursor: pointer;
  font-size: 13px;
  flex-shrink: 0;
}
.icon-btn:hover { color: var(--text); border-color: rgba(25, 28, 46, 0.3); }
.switch {
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: var(--card-2);
  border: 1px solid var(--line);
  cursor: pointer;
  flex-shrink: 0;
}
.switch i { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--text-dim); transition: 0.2s var(--ease); }
.switch.on { background: var(--green-soft); border-color: var(--green); }
.switch.on i { left: 18px; background: var(--green-deep); }

table.tabla-cursos { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.tabla-cursos th { text-align: left; color: var(--text-dim); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em; padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.tabla-cursos td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.tabla-cursos input[type="text"], table.tabla-cursos input[type="number"] { padding: 8px 10px; font-size: 13px; }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--panel-dark);
  color: #fff;
  font-weight: 700;
  font-size: 13.5px;
  padding: 12px 22px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: 0.3s var(--ease);
  z-index: 50;
  box-shadow: 0 10px 30px rgba(25, 28, 46, 0.25);
}
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Catálogo /inscripcion ---------- */
.catalogo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 10px;
}
.curso-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.curso-card .cohorte {
  display: inline-flex;
  align-self: flex-start;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 999px;
  padding: 5px 12px;
}
.curso-card h3 { font-size: 19px; font-weight: 800; letter-spacing: -0.02em; margin: 0; color: var(--text); }
.curso-card .btn { align-self: flex-start; text-decoration: none; }
.catalogo-vacio { color: var(--text-dim); font-size: 14px; padding: 40px 0; text-align: center; }

@media (max-width: 720px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-rail { display: flex; overflow-x: auto; padding: 12px; }
  .admin-rail .marca { display: none; }
  .admin-rail nav { display: flex; gap: 6px; }
  .admin-main { padding: 24px 16px; }
  .fila-pais-tel { grid-template-columns: 120px 1fr; }
}
