/* ==========================================================================
   Academia Lean-Droid — Sistema visual
   Colores de la tienda Lean-Droid: tinta #232321, azul #4A69E2, naranja #FFA52F.
   Una sola familia (Archivo) usando su ancho variable: expandida para títulos
   y fechas, normal para texto. El elemento propio: los cupos se muestran
   como pads de soldadura (ocupados / libres).
   ========================================================================== */

:root {
  --bg: #f2f3f5;
  --surface: #ffffff;
  --surface-2: #f6f7f9;
  --surface-3: #eceef2;
  --border: #e3e5ea;
  --border-strong: #cdd1d9;

  --text: #232321;
  --muted: #5f6168;
  --faint: #8c8f97;

  --blue: #4a69e2;
  --blue-dark: #3653c7;
  --blue-soft: #edf1fd;
  --blue-line: #c3cef6;
  --orange: #ffa52f;
  --orange-ink: #8a4b00;
  --orange-soft: #fff4e3;
  --orange-line: #ffd49a;
  --green: #127a3a;
  --green-soft: #e6f5ec;
  --green-line: #a9dbbc;
  --red: #c62f2f;
  --red-soft: #fdecec;
  --red-line: #f0b5b5;

  --r-xl: 22px;
  --r-lg: 16px;
  --r: 12px;
  --r-sm: 10px;
  --shadow: 0 10px 30px rgba(35, 35, 33, .10);
  --ease: cubic-bezier(.23, 1, .32, 1);

  --font: 'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font: 15px/1.55 var(--font); -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 750; letter-spacing: -.01em; line-height: 1.15; }
h1 { font-size: 1.6rem; font-stretch: 112%; }
h2 { font-size: 1.12rem; font-stretch: 108%; }
h3 { font-size: 1rem; }
p { margin: 0; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--blue); color: #fff; }

.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: .86rem; }
.tiny { font-size: .76rem; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.link { color: var(--blue); font-weight: 600; }
.link:hover { text-decoration: underline; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.center { text-align: center; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Íconos (SVG propios, sin emojis) ---------- */
.ico { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ico.sm { width: 15px; height: 15px; }
.ico.lg { width: 22px; height: 22px; }
.ico.xl { width: 30px; height: 30px; stroke-width: 1.5; }

/* ---------- Marca ---------- */
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand img { height: 34px; width: auto; max-width: 130px; object-fit: contain; }
.wordmark { font-weight: 800; font-stretch: 125%; font-size: 1.02rem; letter-spacing: -.01em; line-height: 1; white-space: nowrap; }
.wordmark small { display: block; font-weight: 600; font-stretch: 100%; font-size: .72rem; color: var(--blue); letter-spacing: .02em; margin-top: 3px; }

/* ---------- Barra del panel ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 18px;
  min-height: 62px; padding: 0 22px;
  background: rgba(255, 255, 255, .9); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; gap: 2px; align-items: center; }
.nav a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 11px; border-radius: var(--r-sm);
  color: var(--muted); font-weight: 600; font-size: .88rem;
  transition: color .15s, background .15s;
}
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a.active { color: var(--blue); background: var(--blue-soft); }
.nav .count { font: 700 .7rem/1 var(--font); background: var(--orange); color: var(--text); padding: 3px 6px; border-radius: 999px; }
.spacer { flex: 1; }
.who { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .88rem; }
.who .avatar {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--blue-soft); color: var(--blue); font: 700 .78rem/1 var(--font);
}
.who .role { font-size: .7rem; color: var(--blue); font-weight: 600; }

/* ---------- Layout ---------- */
main { flex: 1; }
.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 30px 22px 72px; }
.wrap.narrow { max-width: 780px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head p { color: var(--muted); margin-top: 6px; }
.crumb { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .84rem; font-weight: 600; margin-bottom: 10px; }
.crumb:hover { color: var(--blue); }
.section-title { display: flex; align-items: center; gap: 10px; margin: 34px 0 14px; }
.section-title h2 { font-size: 1.05rem; }
.section-title .line { flex: 1; height: 1px; background: var(--border); }
.foot { padding: 22px; text-align: center; color: var(--faint); font-size: .78rem; border-top: 1px solid var(--border); }

.grid { display: grid; gap: 16px; }
.grid > * { min-width: 0; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols-wide { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.span-2 { grid-column: span 2; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap-row { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.mt { margin-top: 16px; } .mt-sm { margin-top: 8px; } .mt-lg { margin-top: 28px; } .mb { margin-bottom: 16px; }

/* ---------- Tarjetas ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-head h2 { display: flex; align-items: center; gap: 10px; }
.card-head h2 .ico { color: var(--blue); }
.card-sub { color: var(--muted); font-size: .88rem; margin: -8px 0 16px; }
.card.flush { padding: 0; overflow: hidden; }
.card.danger { border-color: var(--red-line); }
.card.tint { background: var(--blue-soft); border-color: var(--blue-line); }
hr.div { border: 0; height: 1px; background: var(--border); margin: 18px 0; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font: 650 .9rem/1 var(--font); cursor: pointer; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s, transform .16s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { border-color: var(--text); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.btn-dark { background: var(--text); border-color: var(--text); color: #fff; }
.btn-dark:hover { background: #000; border-color: #000; }
.btn-wa { background: #1fa855; border-color: #1fa855; color: #fff; }
.btn-wa:hover { background: #178a45; border-color: #178a45; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--border); color: var(--text); }
.btn-outline { background: transparent; }
.btn-danger { background: transparent; color: var(--red); border-color: var(--red-line); }
.btn-danger:hover { background: var(--red-soft); border-color: var(--red); }
.btn.sm { padding: 8px 13px; font-size: .84rem; }
.btn.lg { padding: 15px 24px; font-size: 1rem; }
.btn.icon { padding: 8px; }
.btn.block { width: 100%; }

/* ---------- Formularios ---------- */
.field { margin-bottom: 16px; }
.field > label, .label { display: block; margin-bottom: 7px; font-size: .84rem; font-weight: 600; color: var(--text); }
.hint { display: block; margin-top: 6px; font-size: .78rem; color: var(--faint); }
.input, input[type=text], input[type=email], input[type=password], input[type=tel], input[type=search], input[type=number], input[type=url], input[type=datetime-local], textarea, select {
  width: 100%; padding: 12px 14px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--r-sm);
  font: inherit; font-size: 16px;
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
input:disabled { color: var(--faint); cursor: not-allowed; }
textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
select { appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235f6168' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

.input-wrap { position: relative; }
.input-wrap .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.input-wrap input { padding-left: 38px; }
.input-wrap .toggle-pass { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--faint); padding: 6px; cursor: pointer; border-radius: 6px; }
.input-wrap .toggle-pass:hover { color: var(--text); }
.input-wrap.has-toggle input { padding-right: 42px; }
.input-wrap .toggle-pass .ico { position: static; transform: none; }

/* Zona de subida de archivos */
.dropzone {
  position: relative; display: flex; align-items: center; gap: 14px;
  padding: 16px; border: 1.5px dashed var(--border-strong); border-radius: var(--r);
  background: var(--surface-2); cursor: pointer; transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.drag { border-color: var(--blue); background: var(--blue-soft); }
.dropzone input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dropzone .dz-icon { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: var(--surface); color: var(--blue); flex: none; border: 1px solid var(--border); }
.dropzone .dz-text { flex: 1; min-width: 0; }
.dropzone .dz-text b { display: block; font-size: .9rem; }
.dropzone .dz-text span { display: block; font-size: .78rem; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Casillas */
.check { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-sm); cursor: pointer; transition: background .12s; }
.check:hover { background: var(--surface-2); }
.check input { appearance: none; -webkit-appearance: none; margin: 0; width: 20px; height: 20px; flex: none; cursor: pointer;
  border: 1.5px solid var(--border-strong); border-radius: 6px; background: var(--surface); display: grid; place-items: center; transition: background .12s, border-color .12s; }
.check input::after { content: ""; width: 10px; height: 6px; border: solid #fff; border-width: 0 0 2px 2px; transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.check input:checked { background: var(--blue); border-color: var(--blue); }
.check input:checked::after { opacity: 1; }
.check .meta { flex: 1; min-width: 0; }
.check .meta b { font-weight: 600; font-size: .92rem; }
.check .meta span { display: block; font-size: .78rem; color: var(--faint); }
.check.plain { padding: 6px 0; }
.check.plain:hover { background: none; }

/* Opciones grandes (método de pago) */
.choice { display: grid; gap: 10px; }
.choice label { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1.5px solid var(--border-strong); border-radius: var(--r); cursor: pointer; background: var(--surface); transition: border-color .15s, background .15s; }
.choice label:hover { border-color: var(--text); }
.choice input { margin: 3px 0 0; accent-color: var(--blue); width: 18px; height: 18px; flex: none; }
.choice label:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); }
.choice b { display: block; font-size: .95rem; color: var(--text); }
.choice span { display: block; font-size: .82rem; color: var(--muted); margin-top: 2px; }

/* ---------- Avisos ---------- */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-sm); font-size: .9rem; margin-bottom: 18px; border: 1px solid; }
.alert .ico { margin-top: 1px; }
.alert.error { background: var(--red-soft); border-color: var(--red-line); color: #8f1f1f; }
.alert.ok { background: var(--green-soft); border-color: var(--green-line); color: #0d5a2a; }
.alert.info { background: var(--blue-soft); border-color: var(--blue-line); color: #2a3f99; }
.alert.warn { background: var(--orange-soft); border-color: var(--orange-line); color: var(--orange-ink); }

.toast {
  position: fixed; top: 76px; right: 20px; z-index: 60; max-width: 400px;
  display: flex; gap: 10px; align-items: flex-start;
  padding: 13px 16px; border-radius: var(--r); border: 1px solid; box-shadow: var(--shadow);
  font-size: .9rem; background: var(--surface);
  animation: toast-in .28s var(--ease);
}
.toast.ok { border-color: var(--green-line); color: #0d5a2a; }
.toast.error { border-color: var(--red-line); color: #8f1f1f; }
.toast.info { border-color: var(--blue-line); color: #2a3f99; }
.toast button { margin-left: 6px; background: none; border: 0; color: inherit; opacity: .6; cursor: pointer; padding: 0 2px; font-size: 1.1rem; line-height: 1; }
.toast.hide { opacity: 0; transform: translateY(-6px); transition: opacity .2s var(--ease), transform .2s var(--ease); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------- Badges y etiquetas ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  font: 650 .74rem/1.2 var(--font); border: 1px solid var(--border-strong); color: var(--muted); white-space: nowrap; background: var(--surface);
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.pending, .badge.warn { color: var(--orange-ink); border-color: var(--orange-line); background: var(--orange-soft); }
.badge.active, .badge.ok { color: var(--green); border-color: var(--green-line); background: var(--green-soft); }
.badge.suspended, .badge.bad { color: var(--red); border-color: var(--red-line); background: var(--red-soft); }
.badge.admin, .badge.info, .badge.new { color: var(--blue); border-color: var(--blue-line); background: var(--blue-soft); }
.tag { display: inline-block; padding: 3px 9px; border-radius: 6px; font: 600 .74rem/1.3 var(--font); background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); white-space: nowrap; }
.tag.ok { color: var(--green); border-color: var(--green-line); background: var(--green-soft); }
.tag.info { color: var(--blue); border-color: var(--blue-line); background: var(--blue-soft); }
.tag.bad { color: var(--red); border-color: var(--red-line); background: var(--red-soft); }
.tag.warn { color: var(--orange-ink); border-color: var(--orange-line); background: var(--orange-soft); }

/* ---------- Estadísticas ---------- */
.stat { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px 18px; transition: border-color .15s; }
a.stat:hover { border-color: var(--border-strong); }
.stat .n { font: 800 1.7rem/1 var(--font); font-stretch: 118%; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat .l { display: flex; align-items: center; gap: 7px; margin-top: 8px; color: var(--muted); font-size: .82rem; }
.stat.hot { border-color: var(--orange-line); background: var(--orange-soft); }
.stat.hot .n { color: var(--orange-ink); }
.stat.good .n { color: var(--green); }

/* ---------- Tablas ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
thead th { text-align: left; padding: 11px 14px; color: var(--muted); font: 600 .78rem/1.2 var(--font); border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; }
tbody td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr.clickable, tbody tr[data-href] { cursor: pointer; }
tbody tr:hover td { background: var(--surface-2); }
.cell-user b { display: block; font-weight: 650; }
.cell-user span { display: block; color: var(--faint); font-size: .8rem; }
.kv { width: 100%; }
.kv td { padding: 9px 0; border-bottom: 1px solid var(--border); }
.kv tr:hover td { background: none; }
.kv td:first-child { color: var(--muted); width: 42%; }

/* ---------- Filtros ---------- */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--muted); font-size: .86rem; font-weight: 600; transition: color .15s, border-color .15s, background .15s; }
.chip:hover { color: var(--text); border-color: var(--text); }
.chip.active { color: #fff; border-color: var(--text); background: var(--text); }
.chip .n { font-size: .74rem; opacity: .75; }
.search { display: flex; gap: 8px; }
.search .input-wrap { width: 260px; }

/* ---------- Alumno: material ---------- */
.progress-card { display: flex; align-items: center; gap: 22px; }
.progress-ring { --p: 0; width: 76px; height: 76px; border-radius: 50%; flex: none; display: grid; place-items: center; background: conic-gradient(var(--blue) calc(var(--p) * 1%), var(--surface-3) 0); }
.progress-ring span { width: 62px; height: 62px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font: 800 1rem/1 var(--font); }
.bar { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--blue); border-radius: 99px; }
.course-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 36px 0 14px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.course-head h2 { display: flex; align-items: center; gap: 10px; font-size: 1.15rem; }
.course-head h2 .ico { color: var(--blue); }
.course-head p { color: var(--muted); font-size: .88rem; margin-top: 4px; }
.module { display: flex; flex-direction: column; gap: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 20px; scroll-margin-top: 90px; }
.module.done { border-color: var(--green-line); }
.module-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.module-top h3 { font-size: 1.02rem; }
.module-top p { color: var(--muted); font-size: .86rem; margin-top: 5px; }
.module-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 4px; }
.files { display: flex; flex-direction: column; gap: 8px; }
.file-link { display: flex; align-items: center; gap: 12px; padding: 11px 13px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r); font-size: .9rem; font-weight: 600; transition: border-color .15s, background .15s; }
a.file-link:hover { border-color: var(--blue-line); background: var(--blue-soft); }
.file-link .fi { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; background: var(--surface); color: var(--blue); flex: none; border: 1px solid var(--border); }
.file-link .fn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-link .fk { font-size: .72rem; color: var(--faint); font-weight: 600; }
.file-link .go { color: var(--faint); }

/* ---------- Admin: material ---------- */
.course-block { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); margin-bottom: 18px; overflow: hidden; }
.course-block > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--border); background: var(--surface-2); flex-wrap: wrap; }
.course-block > header h2 { display: flex; align-items: center; gap: 10px; }
.course-block > header h2 .ico { color: var(--blue); }
.course-block > header p { color: var(--muted); font-size: .84rem; margin-top: 3px; }
.course-block > .body { padding: 14px; }
.course-edit { padding: 16px 20px; border-bottom: 1px solid var(--border); background: var(--surface); }
.course-edit[hidden] { display: none; }
details.mod { border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); scroll-margin-top: 90px; }
details.mod + details.mod { margin-top: 10px; }
details.mod[open] { border-color: var(--border-strong); }
details.mod > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
details.mod > summary::-webkit-details-marker { display: none; }
details.mod > summary .chev { display: inline-flex; color: var(--faint); transition: transform .2s var(--ease); }
details.mod[open] > summary .chev { transform: rotate(90deg); color: var(--blue); }
details.mod > summary b { flex: 1; min-width: 0; font-weight: 650; }
details.mod .mod-body { padding: 4px 16px 16px; border-top: 1px solid var(--border); }
details.inner > summary { cursor: pointer; color: var(--muted); font-size: .86rem; display: inline-flex; align-items: center; gap: 6px; list-style: none; font-weight: 600; }
details.inner > summary::-webkit-details-marker { display: none; }
details.inner[open] > summary { color: var(--text); }
.perm-group { border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.perm-group + .perm-group { margin-top: 12px; }
.perm-group > .h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; background: var(--surface-2); font-weight: 650; font-size: .9rem; }
.perm-group > .h button { background: none; border: 0; color: var(--blue); font: 600 .78rem var(--font); cursor: pointer; }
.perm-group > .list { padding: 6px; }

/* ---------- Auditoría / listas ---------- */
.feed { display: flex; flex-direction: column; }
.feed-item { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: .88rem; }
.feed-item:last-child { border-bottom: 0; }
.feed-item .who-line { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pager { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 20px; }

.empty { text-align: center; padding: 40px 20px; border: 1px dashed var(--border-strong); border-radius: var(--r-lg); color: var(--muted); background: var(--surface); }
.empty .ico { width: 34px; height: 34px; stroke-width: 1.4; color: var(--faint); margin-bottom: 10px; }
.empty b { display: block; color: var(--text); font-size: 1.02rem; margin-bottom: 6px; }
.empty.plain { border: 0; padding: 26px 12px; background: none; }

/* ---------- Pantallas de acceso ---------- */
.auth-page { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 18px; }
.auth-card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: 30px; box-shadow: var(--shadow); }
.auth-card.wide { max-width: 560px; }
.auth-logo { display: flex; justify-content: center; margin: 0 0 18px; }
.auth-title { text-align: center; font-size: 1.35rem; }
.auth-sub { text-align: center; color: var(--muted); font-size: .9rem; margin: 6px 0 24px; }
.auth-links { display: flex; justify-content: flex-end; margin: -6px 0 18px; font-size: .84rem; }
.auth-links a { color: var(--muted); }
.auth-links a:hover { color: var(--blue); }
.auth-foot { text-align: center; margin-top: 22px; color: var(--muted); font-size: .88rem; }
.auth-foot a { color: var(--blue); font-weight: 650; }
.status-icon { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; margin: 4px auto 16px; background: var(--green-soft); color: var(--green); border: 1px solid var(--green-line); }
.status-icon.warn { background: var(--orange-soft); color: var(--orange-ink); border-color: var(--orange-line); }
.status-icon.bad { background: var(--red-soft); color: var(--red); border-color: var(--red-line); }
.trust { display: flex; justify-content: center; gap: 16px; margin-top: 22px; color: var(--faint); font-size: .76rem; flex-wrap: wrap; }
.trust span { display: inline-flex; align-items: center; gap: 5px; }

/* ==========================================================================
   ACADEMIA — piezas propias
   ========================================================================== */

/* Cupos como pads de soldadura: llenos = ocupados, con borde = libres */
.pads { display: flex; flex-wrap: wrap; gap: 4px; max-width: 260px; }
.pads i { width: 12px; height: 12px; border-radius: 3px; background: var(--text); }
.pads i.free { background: var(--surface); box-shadow: inset 0 0 0 2px var(--blue); }
.pads.few i.free { box-shadow: inset 0 0 0 2px var(--orange); background: var(--orange-soft); }
.pads.lg i { width: 15px; height: 15px; border-radius: 4px; }
.seats-label { font-size: .84rem; color: var(--muted); margin-top: 6px; font-variant-numeric: tabular-nums; }
.seats-label b { color: var(--text); }
.seats-label.few b { color: var(--orange-ink); }
.meter { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--text); border-radius: 99px; }
.meter.few i { background: var(--orange); }

/* Bloque de fecha: el día grande y expandido */
.datebox { width: 64px; flex: none; text-align: center; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--border); padding: 8px 4px 7px; }
.datebox b { display: block; font-weight: 800; font-stretch: 125%; font-size: 1.65rem; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.datebox span { display: block; font-size: .74rem; font-weight: 650; color: var(--muted); margin-top: 4px; text-transform: capitalize; }

/* ---------- Sitio público ---------- */
.site-head { position: sticky; top: 0; z-index: 40; background: rgba(242, 243, 245, .88); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; }
.site-head.scrolled { border-bottom-color: var(--border); }
.site-head .in { max-width: 1140px; margin: 0 auto; display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 0 22px; }
.site-head nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.site-head nav a.txt { padding: 9px 12px; font-weight: 600; font-size: .9rem; color: var(--muted); border-radius: 999px; }
.site-head nav a.txt:hover { color: var(--text); background: var(--surface); }

.hero { max-width: 1140px; margin: 0 auto; padding: 46px 22px 18px; }
.hero h1 { font-size: clamp(2.1rem, 6.4vw, 4.4rem); font-weight: 800; font-stretch: 125%; line-height: .98; letter-spacing: -.035em; max-width: 13ch; }
.hero p { font-size: clamp(1rem, 2.2vw, 1.18rem); color: var(--muted); max-width: 46ch; margin-top: 18px; }
.hero .row { margin-top: 24px; }

.band { max-width: 1140px; margin: 0 auto; padding: 22px 22px 8px; }
.band-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.band-head h2 { font-size: 1.35rem; font-stretch: 118%; font-weight: 800; }

/* Lista de próximas fechas */
.dates { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); overflow: hidden; }
.date-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto auto; gap: 18px; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.date-row:last-child { border-bottom: 0; }
.date-row .what b { display: block; font-size: 1.02rem; font-weight: 700; }
.date-row .what span { display: block; color: var(--muted); font-size: .86rem; margin-top: 3px; }
.date-row .price { text-align: right; font-variant-numeric: tabular-nums; }
.date-row .price b { display: block; font-weight: 750; }
.date-row .price span { display: block; font-size: .8rem; color: var(--muted); }
.date-row .go { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }

/* Tarjetas de curso */
.courses { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.course-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); overflow: hidden; transition: border-color .15s; }
.course-card:hover { border-color: var(--border-strong); }
.course-card .pic { aspect-ratio: 16 / 10; background: var(--surface-3); position: relative; overflow: hidden; }
.course-card .pic img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s var(--ease); }
@media (hover: hover) and (pointer: fine) { .course-card:hover .pic img { transform: scale(1.03); } }
.course-card:active { transform: scale(.99); transition: transform .12s var(--ease); }
.course-card .pic .tag { position: absolute; left: 12px; top: 12px; background: rgba(255, 255, 255, .94); border: 0; color: var(--text); }
.course-card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.course-card h3 { font-size: 1.12rem; font-stretch: 110%; font-weight: 750; line-height: 1.2; }
.course-card p { color: var(--muted); font-size: .9rem; }
.course-card .meta { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding-top: 6px; }
.course-card .meta .next { font-size: .84rem; color: var(--muted); }
.course-card .meta .next b { color: var(--text); display: block; font-size: .92rem; }
.course-card .meta .price { font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }
.course-card .by { display: flex; align-items: center; gap: 8px; font-size: .84rem; color: var(--muted); font-weight: 600; }
.course-card .by img { height: 22px; width: auto; max-width: 70px; object-fit: contain; }
.placeholder-pic { width: 100%; height: 100%; display: grid; place-items: center; color: var(--faint);
  background: repeating-linear-gradient(90deg, transparent 0 22px, rgba(35, 35, 33, .05) 22px 23px), repeating-linear-gradient(0deg, transparent 0 22px, rgba(35, 35, 33, .05) 22px 23px), var(--surface-3); }

.person { display: flex; align-items: center; gap: 10px; }
.person img, .person .ph { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; font-weight: 800; }
.person b { display: block; font-size: .95rem; }
.person span { display: block; font-size: .8rem; color: var(--muted); }

/* Página del curso */
.course-hero { max-width: 1140px; margin: 0 auto; padding: 22px 22px 0; }
.course-hero .pic { border-radius: var(--r-xl); overflow: hidden; aspect-ratio: 21 / 9; background: var(--surface-3); }
.course-hero .pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.course-layout { max-width: 1140px; margin: 0 auto; padding: 26px 22px 70px; display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 34px; align-items: start; }
.course-title { font-size: clamp(1.9rem, 4.6vw, 3rem); font-weight: 800; font-stretch: 122%; line-height: 1.02; letter-spacing: -.03em; }
.lead { font-size: 1.1rem; color: var(--muted); margin-top: 14px; max-width: 60ch; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 18px; color: var(--muted); font-size: .9rem; }
.facts span { display: inline-flex; align-items: center; gap: 7px; }
.facts .ico { color: var(--blue); }
.prose { max-width: 66ch; }
.prose p { margin: 0 0 12px; color: #3d3f45; }
.block { margin-top: 34px; }
.block h2 { font-size: 1.25rem; font-stretch: 116%; font-weight: 800; margin-bottom: 14px; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; }
.ticks li .ico { color: var(--blue); margin-top: 2px; }
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; display: grid; gap: 0; border-left: 2px solid var(--border); }
.steps li { counter-increment: step; position: relative; padding: 0 0 16px 22px; }
.steps li::before { content: counter(step); position: absolute; left: -13px; top: -2px; width: 24px; height: 24px; border-radius: 50%; background: var(--surface); border: 2px solid var(--border-strong); font-size: .74rem; font-weight: 800; display: grid; place-items: center; color: var(--muted); }
.tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tools a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 15px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); font-weight: 600; font-size: .92rem; transition: border-color .15s; }
.tools a:hover { border-color: var(--blue); color: var(--blue); }

.booking { position: sticky; top: 84px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: 20px; }
.booking .from { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.booking .from b { font-size: 1.6rem; font-weight: 800; font-stretch: 116%; font-variant-numeric: tabular-nums; }
.booking .from span { color: var(--muted); font-size: .86rem; text-align: right; }
.ed { padding: 16px 0; border-bottom: 1px solid var(--border); }
.ed:last-of-type { border-bottom: 0; }
.ed-top { display: flex; gap: 14px; align-items: center; }
.ed-top .info b { display: block; font-weight: 700; }
.ed-top .info span { display: block; font-size: .84rem; color: var(--muted); }
.ed .seats { margin: 12px 0; }
.ed .btn { width: 100%; }
.ed.off { opacity: .75; }

.share { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

.notify { background: var(--text); color: #fff; border-radius: var(--r-xl); padding: 26px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 22px; align-items: center; }
.notify h2 { font-size: 1.35rem; font-stretch: 118%; font-weight: 800; }
.notify p { color: #c9cad0; margin-top: 8px; font-size: .94rem; }
.notify form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.notify input { background: #fff; border-color: #fff; }
.notify .full { grid-column: 1 / -1; }
.notify .btn-primary { border-color: var(--blue); }

.site-foot { border-top: 1px solid var(--border); margin-top: 40px; }
.site-foot .in { max-width: 1140px; margin: 0 auto; padding: 26px 22px 34px; display: flex; gap: 16px 28px; flex-wrap: wrap; align-items: center; justify-content: space-between; color: var(--muted); font-size: .88rem; }
.site-foot nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-foot a:hover { color: var(--blue); }

/* Reserva */
.summary { display: flex; gap: 14px; align-items: center; padding: 16px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r); margin-bottom: 20px; }
.summary b { display: block; font-weight: 750; }
.summary span { display: block; color: var(--muted); font-size: .86rem; }
.track { list-style: none; padding: 0; margin: 0 0 22px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.track li { padding-top: 10px; border-top: 3px solid var(--border-strong); font-size: .82rem; color: var(--faint); font-weight: 600; }
.track li.done { border-color: var(--blue); color: var(--text); }
.track li.now { border-color: var(--orange); color: var(--text); }
.copyline { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 14px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); }
.copyline + .copyline { margin-top: 8px; }
.copyline span { color: var(--muted); font-size: .8rem; display: block; }
.copyline b { font-size: 1rem; word-break: break-all; }
.countdown { font-weight: 750; font-variant-numeric: tabular-nums; }

/* Panel de la academia */
.ed-line { display: grid; grid-template-columns: 64px minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.ed-line:last-child { border-bottom: 0; }
a.ed-line:hover { background: var(--surface-2); }
.ed-line .t b { display: block; font-weight: 700; }
.ed-line .t span { display: block; color: var(--muted); font-size: .84rem; }
.flags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: .9rem; }
.list-plain li:last-child { border-bottom: 0; }
.hbar { display: grid; grid-template-columns: 110px minmax(0, 1fr) 44px; align-items: center; gap: 10px; font-size: .86rem; padding: 5px 0; }
.hbar i { display: block; height: 8px; border-radius: 99px; background: var(--blue); }
.thumb { width: 54px; height: 40px; border-radius: 8px; object-fit: cover; background: var(--surface-3); display: block; }
.img-preview { width: 100%; max-width: 360px; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--r); border: 1px solid var(--border); display: block; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.actions form { margin: 0; }

/* ---------- Visor del aula ---------- */
.viewer-page { background: var(--bg); }
.vbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 18px; background: rgba(255, 255, 255, .94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.vtitle { flex: 1; min-width: 0; }
.vtitle small { display: block; font-size: .76rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vtitle b { display: block; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cobrand { display: flex; align-items: center; gap: 10px; flex: none; }
.cobrand img { height: 30px; width: auto; max-width: 110px; object-fit: contain; }
.cobrand .x { width: 1px; height: 24px; background: var(--border-strong); }
.cobrand .iname { font-weight: 700; font-size: .86rem; }
.vlayout { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 0; align-items: start; }
.vstage { padding: 18px; min-width: 0; }
.vside { position: sticky; top: 60px; max-height: calc(100vh - 60px); overflow: auto; border-left: 1px solid var(--border); background: var(--surface); padding: 14px; }
.vside summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; cursor: pointer; list-style: none; padding: 4px 4px 10px; }
.vside summary::-webkit-details-marker { display: none; }
.vmod + .vmod { margin-top: 12px; }
.vmod-t { font-size: .8rem; font-weight: 700; color: var(--muted); padding: 6px 6px 4px; }
.vitem { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--r-sm); font-size: .88rem; color: var(--text); transition: background-color .15s; }
.vitem span { flex: 1; min-width: 0; }
.vitem:hover { background: var(--surface-2); }
.vitem.on { background: var(--blue-soft); color: var(--blue-dark); font-weight: 650; }
.vitem .ico { color: var(--faint); }
.vitem .ico.ok { color: var(--green); }
.vmedia { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #18191c; border-radius: var(--r-lg); overflow: hidden; }
.vmedia.doc { aspect-ratio: auto; height: calc(100vh - 190px); min-height: 420px; background: var(--surface); border: 1px solid var(--border); }
.vmedia iframe, .vmedia video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: #000; }
.vmedia.doc iframe { background: #fff; }
.vimg { background: #18191c; border-radius: var(--r-lg); overflow: auto; display: flex; justify-content: center; }
.vimg img { max-width: 100%; height: auto; display: block; }
.pdf-tools { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 12px; }
.pdf { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.pdf-page { width: 100%; display: flex; justify-content: center; }
.pdf-page canvas { display: block; background: #fff; box-shadow: 0 1px 3px rgba(35, 35, 33, .12), 0 8px 24px rgba(35, 35, 33, .08); border-radius: 4px; max-width: none; }
.pdf { overflow-x: auto; }
.vtext { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 28px; max-width: 760px; margin: 0 auto; }
.vtext h1 { margin-bottom: 16px; }
.vtext p { line-height: 1.7; }
.qz { border: 1px solid var(--border); border-radius: var(--r-sm); padding: 14px 16px 10px; margin: 0 0 14px; min-width: 0; }
.qz legend { float: left; width: 100%; font-weight: 650; padding: 0; margin-bottom: 8px; line-height: 1.45; }
.qz legend + * { clear: both; }
.qz.bad { border-color: var(--orange-line); background: var(--orange-soft); }
.qopt { display: flex; gap: 10px; align-items: flex-start; padding: 9px 10px; border-radius: 8px; cursor: pointer; line-height: 1.45; transition: background-color .15s ease; }
.qopt:hover { background: var(--surface-2); }
.qopt input { margin-top: 3px; accent-color: var(--blue); flex: none; }
.qopt:has(input:checked) { background: var(--blue-soft); }
.certnote { max-width: 760px; margin-left: auto; margin-right: auto; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .86rem; line-height: 1.5; }
.vcard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 40px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; max-width: 520px; margin: 0 auto; }
.vcard .ico { color: var(--blue); }
.vnav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 18px; }
@media (max-width: 980px) {
  .vlayout { grid-template-columns: minmax(0, 1fr); }
  .vside { position: static; max-height: none; border-left: 0; border-top: 1px solid var(--border); }
  .vside details:not([open]) summary { padding-bottom: 4px; }
}
@media (max-width: 760px) {
  .vbar { padding: 8px 10px; gap: 8px; }
  .cobrand img { height: 24px; max-width: 80px; }
  .cobrand .iname { display: none; }
  .vstage { padding: 12px 10px; }
  .vmedia.doc { height: calc(100vh - 170px); min-height: 360px; }
  .vtext { padding: 20px; }
}

/* ---------- Certificado ---------- */
.cert-bar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 18px; }
.cert { background: var(--surface); border-radius: 6px; box-shadow: 0 1px 3px rgba(35, 35, 33, .12), 0 16px 40px rgba(35, 35, 33, .10); aspect-ratio: 297 / 210; width: 100%; max-width: 1040px; margin: 0 auto; container-type: inline-size; }
.cert-in { height: 100%; padding: 5.5cqw 6cqw 4.5cqw; display: flex; flex-direction: column; border: 1.2cqw solid var(--surface); outline: 2px solid var(--text); outline-offset: -2.2cqw; position: relative; }
.cert-head { display: flex; align-items: center; justify-content: space-between; }
.cert-head img { height: 5cqw; width: auto; }
.cert-code { font-size: 1.3cqw; color: var(--muted); font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.cert-kicker { margin-top: 3cqw; font-size: 1.6cqw; font-weight: 700; color: var(--blue); }
.cert-lead { font-size: 1.7cqw; color: var(--muted); margin-top: 1.6cqw; }
.cert-name { font-size: 5.2cqw; font-weight: 800; font-stretch: 125%; letter-spacing: -.02em; line-height: 1.05; margin-top: .6cqw; }
.cert-course { font-size: 3cqw; font-weight: 750; font-stretch: 112%; margin-top: .6cqw; line-height: 1.15; }
.cert-meta { font-size: 1.5cqw; color: var(--muted); margin-top: 1.4cqw; }
.cert-foot { margin-top: auto; display: flex; align-items: flex-end; gap: 5cqw; }
.sign { display: flex; flex-direction: column; min-width: 18cqw; border-top: 1.5px solid var(--text); padding-top: .8cqw; position: relative; }
.sign img { position: absolute; bottom: 100%; left: 0; height: 6cqw; width: auto; max-width: 22cqw; object-fit: contain; }
.sign-space { display: none; }
.sign b { font-size: 1.5cqw; }
.sign span { font-size: 1.2cqw; color: var(--muted); }
.cert-qr { margin-left: auto; display: flex; align-items: flex-end; gap: 1.2cqw; text-align: right; }
.cert-qr svg { width: 10cqw; height: 10cqw; order: 2; }
.cert-qr span { font-size: 1.05cqw; color: var(--muted); line-height: 1.35; }
@media print {
  @page { size: A4 landscape; margin: 0; }
  body { background: #fff; }
  .site-head, .site-foot, .cert-bar, .toast { display: none !important; }
  main.wrap { padding: 0; max-width: none; }
  .cert { box-shadow: none; border-radius: 0; max-width: none; width: 297mm; height: 210mm; aspect-ratio: auto; }
}

/* Barra fija del curso en celular (precio + ver fechas) */
.mbar { display: none; }
@media (max-width: 980px) {
  .mbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 45;
    padding: 10px 10px 10px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; box-shadow: var(--shadow);
    transition: transform .3s var(--ease), opacity .3s; }
  .mbar b { display: block; font-weight: 800; font-variant-numeric: tabular-nums; }
  .mbar span { display: block; font-size: .78rem; color: var(--muted); }
  .mbar.away { transform: translateY(140%); opacity: 0; pointer-events: none; }
  body:has(.mbar) .site-foot { padding-bottom: 80px; }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols-3, .courses { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .course-layout { grid-template-columns: minmax(0, 1fr); }
  .booking { position: static; }
  .notify { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; gap: 8px 10px; padding: 8px 14px 0; }
  .topbar .nav { order: 3; width: 100%; justify-content: space-between; gap: 0; border-top: 1px solid var(--border); padding: 4px 0; }
  .topbar .nav a { flex-direction: column; gap: 3px; padding: 6px 2px; font-size: .66rem; flex: 1; min-width: 0; }
  .topbar .nav a .lbl { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar .nav .count { position: absolute; margin: -4px 0 0 18px; }
  .topbar .nav a { position: relative; }
  .topbar .nav a.hide-sm { display: none; }
  .who .who-text { display: none; }
  .cols-2, .cols-3, .cols-wide, .row-2, .row-3, .courses, .tools { grid-template-columns: minmax(0, 1fr); }
  .span-2 { grid-column: auto; }
  .wrap { padding: 20px 14px 56px; }
  .hero, .band, .course-hero, .course-layout { padding-left: 16px; padding-right: 16px; }
  .site-head .in { padding: 0 16px; }
  .site-head nav a.txt.hide-sm { display: none; }
  .search, .search .input-wrap { width: 100%; }
  .toast { left: 14px; right: 14px; max-width: none; }
  .progress-card { flex-direction: column; align-items: flex-start; }
  .hide-sm { display: none; }
  .date-row { grid-template-columns: 64px minmax(0, 1fr); gap: 10px 14px; padding: 14px 16px; }
  .date-row .price { grid-column: 2; text-align: left; }
  .date-row .go { grid-column: 1 / -1; align-items: stretch; }
  .date-row .go .btn { width: 100%; }
  .course-hero .pic { aspect-ratio: 16 / 10; }
  .notify { padding: 20px; }
  .notify form { grid-template-columns: minmax(0, 1fr); }
  .ed-line { grid-template-columns: 64px minmax(0, 1fr); }
  .ed-line > :nth-child(3), .ed-line > :nth-child(4) { grid-column: 2; }
  .flags { justify-content: flex-start; }
  .card { padding: 18px; }
  .hbar { grid-template-columns: 90px minmax(0, 1fr) 36px; }
}
/* Movimiento reducido: se quitan desplazamientos y escalas, se mantienen los cambios de color y opacidad */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  .btn:active, .course-card:active, .course-card:hover .pic img { transform: none !important; }
  .mbar { transition: opacity .2s !important; }
  .mbar.away { transform: none; }
}

/* ===== Productos y avisos de la tienda dentro de la academia ===== */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.shop-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; color: inherit; text-decoration: none; transition: border-color .15s; }
.shop-card:hover { border-color: var(--border-strong); }
.shop-card .pic { position: relative; aspect-ratio: 1 / 1; background: #fff; display: grid; place-items: center; color: var(--faint); }
.shop-card .pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; background: #fff; }
.shop-card .body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; }
.shop-card .name { font-size: .86rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.shop-card .price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; font-weight: 800; font-size: .98rem; }
.shop-card .price .now, .shop-card .price s { white-space: nowrap; }
.shop-card .price small { font-weight: 500; color: var(--muted); font-size: .76rem; }
.shop-card .price s { color: var(--muted); font-weight: 500; font-size: .8rem; }
.shop-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 18px; max-width: 1096px; margin: 4px auto 8px; padding: 10px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); font-size: .88rem; color: var(--text); text-decoration: none; }
.shop-strip:hover { border-color: var(--border-strong); }
.shop-strip b { display: inline-flex; align-items: center; gap: 6px; }
.shop-strip .ico { color: var(--muted); }
.shop-strip span::before { content: "·"; margin-right: 18px; color: var(--faint); }
@media (max-width: 600px) { .shop-strip { flex-direction: column; gap: 4px; } .shop-strip span::before { content: none; } }
@media (max-width: 1140px) { .shop-strip { margin-left: 22px; margin-right: 22px; } }
