/* ── Formulario público ── */
/* Cabecera clara "menta suave" */
.hero {
  --hero-ink: var(--ink);
  --hero-muted: var(--ink-2);
  --hero-base: linear-gradient(180deg, #F3FDF8 0%, #E4F8EE 100%);
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(640px 320px at 96% -12%, color-mix(in srgb, var(--brand) 32%, transparent), transparent 65%),
    radial-gradient(560px 300px at -4% 112%, color-mix(in srgb, var(--brand-2) 40%, transparent), transparent 62%),
    var(--hero-base);
  color: var(--hero-ink);
  padding: 22px 16px 120px;
}
/* Trama sutil de puntos en gris de marca */
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(var(--brand-gray) 1.2px, transparent 1.3px) 0 0 / 22px 22px;
  -webkit-mask-image: linear-gradient(115deg, transparent 35%, #000 75%); mask-image: linear-gradient(115deg, transparent 35%, #000 75%); opacity: .9; }
.hero > * { position: relative; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hero { --hero-ink: #eef5f2; --hero-muted: #c9d8d3; --hero-base: linear-gradient(160deg, #0c211c, #10302a); }
  :root:not([data-theme="light"]) .hero::before { opacity: .12; }
  :root:not([data-theme="light"]) .hero-copy h1 em { background: none; color: var(--brand); }
}
:root[data-theme="dark"] .hero { --hero-ink: #eef5f2; --hero-muted: #c9d8d3; --hero-base: linear-gradient(160deg, #0c211c, #10302a); }
:root[data-theme="dark"] .hero::before { opacity: .12; }
:root[data-theme="dark"] .hero-copy h1 em { background: none; color: var(--brand); }
/* Franja de acento con los colores de marca */
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2) 60%, var(--brand-gray)); }
.hero-inner { max-width: 1120px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: block; min-width: 0; flex: 0 1 auto; }
.brand .logo-img { height: 60px; }
.hero-link { background: var(--surface); color: var(--ink-2); border-color: var(--brand-gray); box-shadow: 0 1px 2px rgba(16,24,40,.05); }
.hero-link:hover { border-color: var(--brand); background: var(--surface); }
.hero-copy { max-width: 1120px; margin: 40px auto 0; }
.hero-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--brand-ink); background: var(--brand-2); padding: 4px 10px; border-radius: 999px; margin-bottom: 14px; }
.hero-copy h1 { font-size: clamp(28px, 4vw, 42px); font-weight: 800; letter-spacing: -.02em; }
.hero-copy h1 em { font-style: normal; color: inherit; padding: 0 .06em;
  background: linear-gradient(transparent 60%, color-mix(in srgb, var(--brand) 70%, transparent) 60%, color-mix(in srgb, var(--brand) 70%, transparent) 92%, transparent 92%); }
.hero-copy p { margin-top: 10px; max-width: 620px; color: var(--hero-muted); font-size: 16px; }

.shell { position: relative; z-index: 1; max-width: 1120px; margin: -88px auto 0; padding: 0 16px 40px; display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.form-card, .result-card { padding: 28px; }

/* Pasos */
.steps { list-style: none; margin: 0 0 28px; padding: 0; display: flex; gap: 8px; counter-reset: s; }
.steps li { flex: 1; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); color: var(--muted); font-weight: 600; font-size: 14px; min-width: 0; }
.steps .dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); flex: none; }
.steps .dot .icon { width: 16px; height: 16px; }
.steps li.active { background: var(--primary-soft); color: var(--primary); }
.steps li.active .dot { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.steps li.done { color: var(--success); }
.steps li.done .dot { background: var(--success-soft); color: var(--success); border-color: transparent; }
.steps .lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.step { border: 0; padding: 0; margin: 0; min-width: 0; }
.step-title { font-size: 20px; font-weight: 700; margin-bottom: 18px; padding: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.span-2 { grid-column: span 2; }
.mt { margin-top: 22px; }
.doc-select { width: 112px; flex: none; border-radius: var(--radius-sm) 0 0 var(--radius-sm) !important; border-right: 0; background-color: var(--surface-2); font-weight: 600; }
.input-group .doc-select + .input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.err-line { color: var(--danger); font-size: 13px; margin-top: 8px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--primary); font: 600 13px var(--font); cursor: pointer; text-decoration: underline; }

/* Google */
.google-box { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border: 1px dashed var(--line-strong); border-radius: var(--radius); margin-bottom: 20px; flex-wrap: wrap; }
.google-text { display: flex; flex-direction: column; }
.google-ok { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--success-soft); border-radius: var(--radius-sm); margin-bottom: 20px; font-size: 14px; flex-wrap: wrap; }
.google-ok .icon { color: var(--success); }

/* Alumno registrado */
.volver-box { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--radius); margin-bottom: 16px;
  background: color-mix(in srgb, var(--brand) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--brand) 45%, var(--line)); flex-wrap: wrap; }
.volver-ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); flex: none; }
.volver-txt { display: flex; flex-direction: column; flex: 1; min-width: 200px; }
.bienvenida { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--radius); margin-bottom: 18px; flex-wrap: wrap;
  background: color-mix(in srgb, var(--brand) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--brand) 50%, var(--line)); }
.bv-avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-weight: 800; font-size: 19px; flex: none; }
.bv-txt { display: flex; flex-direction: column; flex: 1; min-width: 200px; }
.bv-txt strong { font-size: 16px; }
.bv-acc { display: flex; gap: 16px; }
.input[readonly].locked { color: var(--muted); }
.otp { font-size: 26px; letter-spacing: .5em; text-align: center; height: 56px; padding-left: .5em; }
.al-links { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.sep { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin: 16px 0 10px; }
.sep::before, .sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }
#al-google { display: flex; justify-content: center; }
.badge-previo { background: var(--primary-soft); color: var(--primary); }

/* Confirmación para certificado */
#dlg-confirmar { width: min(600px, calc(100% - 32px)); }
.cert-preview { text-align: center; padding: 18px 16px; border-radius: 14px; border: 1.5px dashed var(--brand-gray);
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 8%, var(--surface)), var(--surface)); }
.cert-lbl { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.cert-nombre { font-size: clamp(18px, 3.4vw, 24px); font-weight: 800; letter-spacing: .02em; margin-top: 8px; overflow-wrap: anywhere; }
.cert-doc { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.cf-lista { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; font-size: 14px; }
.cf-lista div { min-width: 0; }
.cf-lista dt { font-size: 12px; color: var(--muted); }
.cf-lista dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.cf-lista .full { grid-column: 1 / -1; }
@media (max-width: 600px) { .cf-lista { grid-template-columns: 1fr; } .bv-acc { width: 100%; } }

/* Cursos */
.cursos { display: flex; flex-direction: column; gap: 10px; }
.curso { position: relative; display: flex; gap: 14px; padding: 16px; border: 1.5px solid var(--line); border-radius: var(--radius); cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; }
.curso:hover { border-color: var(--line-strong); }
.curso input { position: absolute; opacity: 0; pointer-events: none; }
.curso .radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-strong); flex: none; margin-top: 2px; display: grid; place-items: center; }
.curso.sel { border-color: var(--primary); background: color-mix(in srgb, var(--primary-soft) 55%, var(--surface)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 12%, transparent); }
.curso.sel .radio { border-color: var(--primary); }
.curso.sel .radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }
.curso:has(input:focus-visible) { box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 25%, transparent); }
.curso.agotado { opacity: .55; cursor: not-allowed; }
.curso-main { flex: 1; min-width: 0; }
.curso-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.curso-nombre { font-weight: 700; font-size: 15px; }
.curso-precio { font-weight: 800; font-size: 17px; white-space: nowrap; }
.curso-precio s { font-weight: 500; font-size: 13px; color: var(--muted); margin-right: 6px; }
.curso-desc { color: var(--muted); font-size: 13px; margin-top: 2px; }
.curso-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 13px; color: var(--ink-2); }
.curso-meta span { display: inline-flex; align-items: center; gap: 5px; }
.curso-meta .icon { width: 15px; height: 15px; color: var(--muted); }

/* Modalidades */
.pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.pill { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; min-width: 150px; flex: 1; position: relative; }
.pill input { position: absolute; opacity: 0; }
.pill strong { font-size: 14px; }
.pill span { font-size: 12px; color: var(--muted); }
.pill.sel { border-color: var(--primary); background: var(--primary-soft); }
.pill:has(input:focus-visible) { box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 25%, transparent); }

/* Métodos de pago */
.metodos { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 8px; }
.metodo { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 16px 10px; border: 1.5px solid var(--line); border-radius: 14px;
  cursor: pointer; font-weight: 700; font-size: 14px; text-align: center; transition: border-color .15s, background .15s; }
.metodo input { position: absolute; opacity: 0; }
.metodo .logo { height: 34px; min-width: 34px; padding: 0 10px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 14px; letter-spacing: -.01em; }
.metodo .logo .icon { width: 20px; height: 20px; }
.metodo .logo.yape { background: var(--yape); }
.metodo .logo.plin { background: linear-gradient(135deg, #00c2b8, #0079c1); }
.metodo .logo.tarjeta { background: #101828; }
.metodo .logo.mercadopago { background: var(--mp); }
.metodo .logo.transferencia { background: #0e7490; }
.metodo.sel { border-color: var(--primary); background: var(--primary-soft); }
.metodo:has(input:focus-visible) { box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 25%, transparent); }
.metodo .demo-tag { position: absolute; top: 6px; right: 6px; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 6px; background: var(--warn-soft); color: var(--warn); }

.metodo-panel:not(:empty) { margin-top: 16px; padding: 18px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); }
.qr-wrap { display: grid; grid-template-columns: 180px 1fr; gap: 20px; align-items: start; }
.qr { width: 180px; aspect-ratio: 1; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; padding: 8px; }
.qr img { width: 100%; height: 100%; object-fit: contain; }
.qr-ph { text-align: center; font-size: 12px; color: var(--muted); padding: 10px; }
.qr-ph b { display: block; font-size: 17px; color: var(--ink); margin: 6px 0; }
.pasos-pago { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--ink-2); }
.pasos-pago b { color: var(--ink); }
.monto-grande { font-size: 22px; font-weight: 800; }
.copiable { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; cursor: pointer; border-bottom: 1px dashed currentColor; }
.copiable .icon { width: 14px; height: 14px; }
.transfer { white-space: pre-line; font-size: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; }

.drop { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1.5px dashed var(--line-strong); border-radius: 12px; background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s; }
.drop:hover, .drop.over { border-color: var(--primary); background: var(--primary-soft); }
.drop .icon { color: var(--primary); width: 22px; height: 22px; }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop-txt { display: flex; flex-direction: column; min-width: 0; }
.drop-txt strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drop.has-file { border-style: solid; border-color: var(--success); background: var(--success-soft); }
.drop.has-file .icon { color: var(--success); }
.field.invalid .drop { border-color: var(--danger); }

.form-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.form-nav .btn-lg { margin-left: auto; }

/* Resumen */
.summary { padding: 22px; position: sticky; top: 20px; }
.summary h3 { font-size: 16px; margin-bottom: 14px; }
.sum-curso { font-weight: 700; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.sum-curso small { display: block; font-weight: 500; color: var(--muted); margin-top: 2px; }
.sum-emp { font-size: 13px; color: var(--ink-2); padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.sum-emp span { color: var(--muted); }
.sum-lines { margin: 12px 0 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.sum-lines > div { display: flex; justify-content: space-between; gap: 12px; }
.sum-lines dt { color: var(--muted); }
.sum-lines dd { margin: 0; font-weight: 600; }
.sum-lines .pos { color: var(--success); }
.sum-lines .total { padding-top: 10px; border-top: 1px solid var(--line); font-size: 16px; }
.sum-lines .total dt { color: var(--ink); font-weight: 700; }
.sum-lines .total dd { font-weight: 800; }
.sum-lines .hoy { background: var(--primary-soft); color: var(--primary); padding: 10px 12px; border-radius: 10px; }
.sum-lines .hoy dt { color: inherit; font-weight: 600; }
.sum-lines .hoy dd { font-weight: 800; }
.trust { list-style: none; margin: 18px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--muted); }
.trust li { display: flex; align-items: center; gap: 8px; }
.trust .icon { width: 16px; height: 16px; color: var(--success); }

/* Resultado */
.result-card { text-align: center; padding: 44px 28px; }
.res-icon { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 18px; }
.res-icon .icon { width: 36px; height: 36px; stroke-width: 2.5; }
.res-icon.ok { background: var(--success-soft); color: var(--success); }
.res-icon.wait { background: var(--warn-soft); color: var(--warn); }
.res-icon.bad { background: var(--danger-soft); color: var(--danger); }
.result-card h2 { font-size: 26px; font-weight: 800; }
.result-card .lead { color: var(--muted); max-width: 480px; margin: 10px auto 0; font-size: 15px; }
.codigo-box { display: inline-flex; align-items: center; gap: 12px; margin: 26px auto 0; padding: 14px 18px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.codigo-box .lbl { font-size: 12px; color: var(--muted); text-align: left; }
.codigo-box .val { font-size: 20px; font-weight: 800; letter-spacing: .02em; }
.res-detalle { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 560px; margin: 24px auto 0; text-align: left; }
.res-detalle div { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.res-detalle dt { font-size: 12px; color: var(--muted); }
.res-detalle dd { margin: 2px 0 0; font-weight: 700; font-size: 14px; }
.res-actions { display: flex; justify-content: center; gap: 10px; margin-top: 28px; flex-wrap: wrap; }

/* Tarjeta demo */
.demo-card { border-radius: 16px; padding: 20px; color: #fff; background: linear-gradient(135deg, #1f2937, #111827 60%, #374151); aspect-ratio: 1.7; max-width: 340px; width: 100%; margin: 0 auto;
  display: flex; flex-direction: column; justify-content: space-between; }
.demo-chip { width: 42px; height: 30px; border-radius: 6px; background: linear-gradient(135deg, #fcd34d, #d97706); }
.demo-num { font-size: 20px; letter-spacing: .08em; }
.demo-row { display: flex; justify-content: space-between; font-size: 12px; opacity: .85; }
.demo-total { text-align: center; color: var(--muted); }
.demo-total strong { display: block; color: var(--ink); font-size: 26px; }

.foot { text-align: center; padding: 0 16px 32px; }

/* ── Responsive ── */
@media (max-width: 920px) {
  .shell { grid-template-columns: 1fr; }
  .summary { position: static; }
  .summary:has(#sum-body[hidden]) { display: none; }
  .result-card { order: 0; }
}
@media (max-width: 600px) {
  .hero { padding-bottom: 104px; }
  .hero-copy { margin-top: 28px; }
  .hero-link span { display: none; }
  .brand .logo-img { height: 46px; }
  .form-card, .result-card { padding: 20px 16px; }
  .grid-2 { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .steps li { justify-content: center; padding: 8px; }
  .steps li:not(.active) .lbl { display: none; }
  .steps li.active { flex: 3; }
  .qr-wrap { grid-template-columns: 1fr; justify-items: center; }
  .res-detalle { grid-template-columns: 1fr; }
  .form-nav .btn-lg { flex: 1; }
  .codigo-box .val { font-size: 17px; }
}
