/* =========================================================
   Aula · sistema visual v1.0 (fijo)
   Lavanda y morado, tarjetas muy redondeadas, botones píldora, Poppins.
   Sin compilación: este archivo se sube tal cual al hosting.
   ========================================================= */

:root {
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: var(--font);

  --violet: #6B4FD8;          /* acción principal */
  --violet-hover: #5A3FC6;
  --violet-ink: #4B32A8;
  --lavender: #DCD3F8;        /* bloque destacado */
  --lavender-2: #EDE8FC;      /* bloque suave */
  --lavender-3: #F6F3FE;      /* fondo de tarjeta suave */
  --plum: #241431;            /* bloque oscuro */
  --pink: #F8C9E0;            /* bloque rosa */
  --pink-strong: #F5B3D3;
  --page: #ECE9F6;            /* fondo exterior */
  --surface: #FFFFFF;

  --ink: #17131F;
  --text: #2C2738;
  --muted: #6A6577;
  --line: #ECE8F4;
  --line-strong: #DCD6EA;
  --chip: #F1EEF7;

  --ok: #2E7D57;
  --ok-soft: #E3F4EA;
  --danger: #B42318;
  --danger-soft: #FDEDEC;

  --r-pill: 999px;
  --r-xl: 28px;
  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 12px;
  --shadow: 0 1px 2px rgba(var(--shadow-rgb), .04);
  --shadow-lg: 0 18px 40px rgba(var(--shadow-rgb), .14);

  /* Derivados (Ajustes → Marca los recalcula si cambias los colores) */
  --violet-soft: #A894F0;     /* inicio del degradado de progreso */
  --pink-ink: #8E2C5C;        /* texto sobre bloques de acento */
  --plum-2: #6E4488;          /* degradados oscuros */
  --plum-3: #4B2A63;
  --plum-4: #7A4C8F;
  --on-dark: #EDE6F5;         /* texto sobre bloques oscuros */
  --soft-icon: #A9A1C2;       /* iconos tenues */
  --soft-icon-2: #9F97B8;
  --soft-border: #B9B3C8;
  --shadow-rgb: 36, 20, 49;   /* sombras */
  --violet-rgb: 107, 79, 216; /* halos del color principal */

  /* Alias usados en algunas vistas */
  --brand: var(--violet);
  --accent: var(--violet);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--violet); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; font-weight: 700; color: var(--ink); letter-spacing: -.015em; font-family: var(--font-head); }
p { margin: 0 0 1em; }
.icon { flex-shrink: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.serif { font-family: var(--font-head); }
[hidden] { display: none !important; }
::selection { background: var(--lavender); }

/* ---------- Botones (píldora) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 20px; border-radius: var(--r-pill);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  font: 600 14px/1 var(--font); cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, transform .1s;
}
.btn:hover { background: var(--lavender-3); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, .input:focus-visible, a:focus-visible, button:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.btn-primary { background: var(--violet); border-color: var(--violet); color: #fff; }
.btn-primary:hover { background: var(--violet-hover); border-color: var(--violet-hover); }
.btn-pink { background: var(--pink-strong); border-color: var(--pink-strong); color: var(--plum); }
.btn-pink:hover { background: var(--pink-strong); border-color: var(--pink-strong); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: rgba(var(--violet-rgb), .08); }
.btn-danger { color: var(--danger); border-color: #F1C9C5; }
.btn-danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn-lg { height: 50px; padding: 0 26px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-icon { width: 36px; height: 36px; padding: 0; }

/* ---------- Formularios ---------- */
.field { margin-bottom: 18px; }
.field label, .label { display: block; font-weight: 600; font-size: 13.5px; color: var(--ink); margin-bottom: 7px; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.input, select.input, textarea.input {
  width: 100%; height: 46px; padding: 0 16px; border: 1px solid var(--line-strong);
  border-radius: var(--r-sm); background: var(--surface); color: var(--ink);
  font: 14.5px var(--font);
}
.input::placeholder { color: #9C97A8; }
textarea.input { height: auto; min-height: 110px; padding: 12px 16px; resize: vertical; }
.input-group { display: flex; align-items: center; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); overflow: hidden; }
.input-group .prefix { padding: 0 12px; color: var(--muted); font-size: 13px; border-right: 1px solid var(--line); white-space: nowrap; align-self: stretch; display: flex; align-items: center; background: var(--lavender-3); }
.input-group .input { border: 0; border-radius: 0; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--violet); flex-shrink: 0; }
.check strong { display: block; color: var(--ink); }
.check > span > span { display: block; font-weight: 400; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ---------- Avisos ---------- */
.flash { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; padding: 13px 18px; border-radius: var(--r-md); margin-bottom: 20px; font-size: 14px; }
.flash ul { margin: 4px 0 0; padding-left: 18px; width: 100%; }
.flash-ok { background: var(--ok-soft); color: var(--ok); }
.flash-error { background: var(--danger-soft); color: var(--danger); }
.callout { padding: 14px 18px; border-radius: var(--r-md); background: var(--lavender-2); font-size: 14px; }

/* ---------- Etiquetas ---------- */
.pill { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 11px; border-radius: var(--r-pill); font-size: 12px; font-weight: 500; background: var(--chip); color: #4A4558; white-space: nowrap; }
.pill-live { background: var(--ok-soft); color: var(--ok); }
.pill-brand { background: var(--lavender-2); color: var(--violet-ink); }
.pill-white { background: #fff; color: var(--ink); font-weight: 600; }
.pill-soon { background: var(--chip); color: var(--muted); font-size: 10px; height: 20px; padding: 0 8px; text-transform: uppercase; letter-spacing: .05em; }

/* ---------- Tarjetas y bloques ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.card-pad { padding: 24px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 24px 0; }
.card-head h2 { font-size: 18px; font-weight: 600; }
.card-head + .card-pad { padding-top: 16px; }
.block { border-radius: var(--r-lg); padding: 22px 22px 24px; }
.block h2 { font-size: 19px; font-weight: 600; margin-bottom: 16px; }
.block-lavender { background: var(--lavender); }
.block-soft { background: var(--lavender-3); border: 1px solid var(--line); }
.block-plum { background: var(--plum); color: #fff; }
.block-plum h2, .block-plum h3 { color: #fff; }
.block-pink { background: var(--pink); }
.block-white { background: var(--surface); border: 1px solid var(--line); }
.block-dashed { background: var(--surface); border: 1.5px dashed var(--line-strong); }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.block-head h2 { margin: 0; }
.big-number { font-size: 56px; font-weight: 700; letter-spacing: -.03em; line-height: 1; margin: 4px 0 12px; }
.section-title { font-size: 21px; font-weight: 600; margin: 40px 0 16px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 40px 0 16px; flex-wrap: wrap; }
.section-head .section-title { margin: 0; }
.eyebrow { font-weight: 600; color: var(--ink); font-size: 14.5px; margin-bottom: 12px; }

/* Lista de tareas (checkbox) */
.task { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: #fff; border-radius: var(--r-md); margin-bottom: 10px; color: var(--ink); font-weight: 500; font-size: 14.5px; }
a.task:hover { text-decoration: none; box-shadow: 0 4px 14px rgba(var(--shadow-rgb), .08); }
.task .box { width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid var(--soft-border); display: grid; place-items: center; flex-shrink: 0; }
.task.done .box { background: var(--violet); border-color: var(--violet); color: #fff; }
.task.done .t { text-decoration: line-through; color: var(--muted); }
.task .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Lista con filas (tipo agenda) */
.rows { border-top: 1px solid rgba(23, 19, 31, .08); }
.rows .row { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(23, 19, 31, .08); font-size: 14px; color: var(--text); }
.rows .row:last-child { border-bottom: 0; }
.rows .row strong { font-weight: 600; color: var(--ink); font-size: 13px; }
a.row:hover { text-decoration: none; color: var(--violet); }

/* ---------- Tira de portadas ---------- */
.cover-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.cover-strip a { color: var(--ink); }
.cover-strip a:hover { text-decoration: none; }
.cover-strip .cover { border-radius: var(--r-md); margin-bottom: 10px; }
.cover-strip .t { font-weight: 600; font-size: 14px; line-height: 1.3; }
.cover-strip .s { font-size: 12.5px; color: var(--muted); }

/* =========================================================
   SITIO DE LA ESTUDIANTE: marco blanco sobre fondo lavanda
   ========================================================= */
.site-frame { max-width: 1240px; margin: 24px auto; background: var(--surface); border-radius: var(--r-xl); min-height: calc(100vh - 48px); display: flex; flex-direction: column; overflow: hidden; }
.site-header .inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; padding: 24px 40px; }
.site-logo { display: flex; align-items: center; gap: 10px; color: var(--ink); font: 700 19px var(--font); letter-spacing: -.01em; }
.site-logo:hover { text-decoration: none; }
.site-logo .mark { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--ink); display: grid; place-items: center; font-size: 13px; }
.top-tabs { display: inline-flex; gap: 4px; padding: 5px; background: var(--lavender-3); border-radius: var(--r-pill); }
.top-tabs a { padding: 9px 20px; border-radius: var(--r-pill); color: var(--ink); font-size: 14px; font-weight: 500; }
.top-tabs a:hover { text-decoration: none; background: rgba(var(--violet-rgb), .08); }
.top-tabs a.active { background: var(--violet); color: #fff; }
.site-nav { justify-self: end; display: flex; align-items: center; gap: 10px; font-size: 14px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--lavender); color: var(--violet-ink); display: grid; place-items: center; font-size: 13px; font-weight: 700; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.container { width: 100%; padding: 0 40px; }
.site-main { flex: 1; padding-bottom: 48px; }
.site-footer { padding: 22px 40px; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line); }

.hero { padding: 40px 40px 8px; }
.hero h1 { font-size: clamp(32px, 4.2vw, 46px); margin-bottom: 12px; }
.hero p { color: var(--text); font-size: 16px; max-width: 460px; }
.dash-hero { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr); gap: 40px; align-items: center; padding: 28px 40px 8px; }
.dash-hero h1 { font-size: clamp(32px, 3.8vw, 44px); margin-bottom: 14px; }
.dash-hero p { font-size: 15.5px; color: var(--text); max-width: 420px; margin: 0; }
.dash-grid { display: grid; grid-template-columns: 1.15fr 1fr 0.85fr; gap: 20px; padding: 32px 40px 0; align-items: start; }
.dash-grid .stack { display: grid; gap: 20px; }

/* Tarjetas de curso */
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.course-grid.lg { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 22px; }
.course-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; color: inherit; transition: box-shadow .15s, transform .15s; }
.course-card:hover { text-decoration: none; box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.course-card .cover { border-radius: 0; }
.cover { aspect-ratio: 16 / 10; background: linear-gradient(135deg, var(--lavender) 0%, var(--pink) 100%); display: grid; place-items: center; overflow: hidden; border-radius: var(--r-md); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover .placeholder { font: 600 20px/1.2 var(--font); color: var(--violet-ink); text-align: center; padding: 16px; letter-spacing: -.01em; }
.course-card .body { padding: 16px 18px; display: flex; flex-direction: column; flex: 1; }
.course-card .kind { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.course-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.course-card .by { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.course-card .foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* Página del curso */
.course-hero .inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; padding: 28px 40px 12px; }
.course-hero h1 { font-size: clamp(32px, 4vw, 46px); margin-bottom: 12px; }
.course-hero .sub { font-size: 16.5px; color: var(--text); margin-bottom: 10px; }
.course-hero .by { font-size: 14px; color: var(--muted); margin-bottom: 24px; }
.course-hero .cover { border-radius: var(--r-lg); }
.course-hero .progress { max-width: 380px; margin-top: 18px; }
.course-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; padding: 28px 40px 0; align-items: start; }
.prose { font-size: 15.5px; line-height: 1.75; color: var(--text); }
.prose h2 { font-size: 24px; margin: 1.4em 0 .5em; }
.prose h3 { font-size: 18px; margin: 1.3em 0 .5em; }
.prose img { border-radius: var(--r-md); margin: 1em 0; height: auto; }
.prose blockquote { margin: 1.2em 0; padding: .9em 1.2em; border-radius: var(--r-md); background: var(--lavender-3); color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose a { text-decoration: underline; }
.prose > :first-child { margin-top: 0; }

.curriculum h2 { font-size: 21px; font-weight: 600; margin-bottom: 16px; }
.cur-module { border-radius: var(--r-lg); background: var(--lavender-3); border: 1px solid var(--line); margin-bottom: 12px; overflow: hidden; }
.cur-module > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 18px 20px; font-weight: 600; color: var(--ink); }
.cur-module > summary::-webkit-details-marker { display: none; }
.cur-module > summary .icon { transition: transform .2s; }
.cur-module[open] > summary .icon.chev { transform: rotate(180deg); }
.cur-module > summary .count { margin-left: auto; font-weight: 400; font-size: 13px; color: var(--muted); display: flex; align-items: center; }
.cur-module .lessons { padding: 0 12px 12px; }
.cur-lesson { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: #fff; border-radius: var(--r-sm); margin-top: 8px; font-size: 14.5px; color: var(--ink); }
a.cur-lesson:hover { text-decoration: none; box-shadow: 0 4px 14px rgba(var(--shadow-rgb), .07); }
.cur-lesson .t { flex: 1; }
.cur-lesson .done { color: var(--violet); }

.progress { height: 8px; background: var(--chip); border-radius: var(--r-pill); overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--violet-soft), var(--violet)); border-radius: var(--r-pill); transition: width .3s; }
.progress-label { font-size: 13px; margin-top: 8px; color: var(--muted); }

/* ---------- Reproductor ---------- */
.player { display: grid; grid-template-columns: 340px minmax(0, 1fr); grid-template-rows: 68px minmax(0, 1fr); height: 100vh; background: var(--page); padding: 12px; gap: 12px; }
.player-top { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; padding: 0 16px 0 10px; background: var(--plum); color: #fff; border-radius: var(--r-lg); min-width: 0; }
.player-top a { color: #fff; }
.player-top a.btn:not(.btn-ghost) { color: var(--ink); }
.player-top .course-title { font-weight: 600; font-size: 16px; flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.player-top .prog { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; min-width: 200px; }
.player-top .prog .progress { flex: 1; background: rgba(255, 255, 255, .16); }
.player-top .prog .progress > span { background: var(--pink-strong); }
.player-top .menu-toggle { display: none; background: none; border: 0; color: #fff; padding: 6px; cursor: pointer; }
.player-side { overflow-y: auto; background: var(--lavender); border-radius: var(--r-lg); padding: 10px 12px 16px; }
.player-side .mod { padding: 14px 8px 8px; font-size: 13px; font-weight: 600; color: var(--ink); }
.player-side .les { display: flex; align-items: flex-start; gap: 11px; padding: 11px 12px; color: var(--ink); font-size: 14px; font-weight: 500; border-radius: var(--r-sm); background: rgba(255, 255, 255, .55); margin-bottom: 6px; }
.player-side .les:hover { background: #fff; text-decoration: none; }
.player-side .les.active { background: #fff; box-shadow: 0 0 0 2px var(--violet); }
.player-side .les .st { color: var(--soft-icon-2); margin-top: 1px; }
.player-side .les .st.done { color: var(--violet); }
.player-side .les .meta { display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 400; color: var(--muted); margin-top: 2px; }
.player-side .les.locked { opacity: .65; cursor: default; }
.player-side .les.locked:hover { background: rgba(255, 255, 255, .55); }
.player-main { overflow-y: auto; display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-lg); min-width: 0; }
.player-content { flex: 1; width: 100%; max-width: 900px; margin: 0 auto; padding: 36px 40px 48px; }
.player-content h1 { font-size: 32px; margin-bottom: 24px; }
.player-content .video { aspect-ratio: 16/9; background: #000; border-radius: var(--r-lg); overflow: hidden; margin-bottom: 28px; }
.player-content .video iframe { width: 100%; height: 100%; border: 0; }
.pdf-frame { width: 100%; height: 76vh; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--lavender-3); margin-bottom: 14px; }
.downloads { margin-top: 28px; padding: 22px; border-radius: var(--r-lg); background: var(--lavender-3); }
.downloads h2 { font-size: 16px; font-weight: 600; margin-bottom: 12px; }
.download-item { display: flex; align-items: center; gap: 12px; padding: 13px 16px; background: #fff; border-radius: var(--r-sm); margin-bottom: 8px; color: var(--ink); font-size: 14px; }
.download-item:hover { box-shadow: 0 4px 14px rgba(var(--shadow-rgb), .08); text-decoration: none; }
.download-item .n { flex: 1; font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.player-foot { position: sticky; bottom: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 24px; border-top: 1px solid var(--line); background: rgba(255, 255, 255, .95); backdrop-filter: blur(6px); }
.player-foot form { margin: 0; }

/* ---------- Acceso ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: 100%; max-width: 440px; }
.auth-card .card { border-radius: var(--r-xl); padding: 36px 32px; }
.auth-card h1 { font-size: 32px; text-align: center; margin-bottom: 6px; }
.auth-card .lead { text-align: center; color: var(--muted); margin-bottom: 28px; }

/* =========================================================
   PANEL DE ADMINISTRACIÓN
   ========================================================= */
.admin { background: var(--page); }
.admin-shell { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; gap: 12px; padding: 12px; }
.sidebar {
  position: sticky; top: 12px; height: calc(100vh - 24px); overflow-y: auto;
  background: var(--surface); border-radius: var(--r-lg);
  display: flex; flex-direction: column;
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 22px 20px 16px; }
.sidebar-brand .mark { width: 34px; height: 34px; border-radius: 50%; background: var(--violet); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 15px; }
.sidebar-brand .name { font-weight: 700; font-size: 15px; line-height: 1.15; color: var(--ink); }
.sidebar-brand .name small { display: block; font-weight: 500; font-size: 11.5px; color: var(--muted); }
.nav { padding: 8px 12px; display: flex; flex-direction: column; gap: 3px; }
.nav + .nav { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 6px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: var(--r-pill);
  color: var(--text); font-weight: 500; font-size: 14.5px;
}
.nav-item:hover { background: var(--lavender-3); text-decoration: none; }
.nav-item.active { background: var(--violet); color: #fff; }
.nav-item.disabled { color: #A9A4B6; cursor: default; }
.nav-item.disabled:hover { background: none; }
.nav-item .pill-soon { margin-left: auto; }
.nav-sub { display: flex; flex-direction: column; gap: 2px; margin: 4px 0 6px 26px; }
.nav-sub a { padding: 7px 14px; color: var(--text); font-size: 14px; border-radius: var(--r-pill); }
.nav-sub a:hover { text-decoration: none; background: var(--lavender-3); }
.nav-sub a.active { color: var(--violet-ink); background: var(--lavender-2); font-weight: 600; }
.sidebar-foot { margin-top: auto; padding: 12px; border-top: 1px solid var(--line); }
.sidebar-foot .nav-item { font-size: 14px; }
.sidebar-foot form { margin: 0; }
.sidebar-foot button.nav-item { width: 100%; background: none; border: 0; cursor: pointer; font-family: inherit; }

.admin-main { min-width: 0; background: var(--surface); border-radius: var(--r-lg); }
.admin-topbar { display: none; }
.page { max-width: 1400px; padding: 36px 44px 64px; }
.page-narrow { max-width: 980px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { font-size: 32px; }
.page-head .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.crumbs a { color: var(--muted); }
.welcome { font-size: 42px !important; }
.tabs { display: inline-flex; gap: 4px; padding: 5px; background: var(--lavender-3); border-radius: var(--r-pill); margin-bottom: 28px; max-width: 100%; overflow-x: auto; }
.tabs a { padding: 9px 20px; font-weight: 500; font-size: 14px; color: var(--ink); border-radius: var(--r-pill); white-space: nowrap; }
.tabs a:hover { text-decoration: none; background: rgba(var(--violet-rgb), .08); }
.tabs a.active { background: var(--violet); color: #fff; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; background: none; border: 0; box-shadow: none; }
.stat { padding: 22px; border-radius: var(--r-lg); background: var(--lavender-3); border: 1px solid var(--line); }
.stat:first-child { background: var(--lavender); border-color: var(--lavender); }
.stat .value { font-size: 36px; font-weight: 700; color: var(--ink); letter-spacing: -.02em; }
.stat .label { font-size: 14px; font-weight: 500; color: var(--text); margin: 0; }

.toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.toolbar .search { position: relative; flex: 1 1 320px; max-width: 460px; }
.toolbar .search .icon { position: absolute; left: 16px; top: 13px; color: var(--muted); }
.toolbar .search .input { padding-left: 44px; border-radius: var(--r-pill); }
.toolbar .divider { width: 1px; height: 28px; background: var(--line-strong); }
.seg { display: inline-flex; gap: 3px; padding: 4px; background: var(--lavender-3); border-radius: var(--r-pill); }
.seg a, .seg label { display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; height: 36px; font-size: 13.5px; font-weight: 500; color: var(--ink); border-radius: var(--r-pill); }
.seg a.active { background: #fff; box-shadow: 0 1px 3px rgba(var(--shadow-rgb), .12); }
.seg a:hover { text-decoration: none; }

.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 600; font-size: 13px; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .thumb { width: 76px; }
.table .thumb .cover { border-radius: 10px; }
.pager { display: flex; justify-content: space-between; align-items: center; padding: 14px 4px; font-size: 13.5px; color: var(--muted); }
.pager nav { display: flex; gap: 6px; }

.empty { text-align: center; padding: 56px 24px; }
.empty .icon { color: var(--violet); margin: 0 auto 14px; }
.empty h3 { font-size: 21px; font-weight: 600; margin-bottom: 8px; }
.empty p { color: var(--muted); max-width: 440px; margin: 0 auto 20px; }

/* ---------- Constructor del curso ---------- */
.builder { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.module { background: var(--lavender-3); border: 1px solid var(--line); border-radius: var(--r-lg); margin-bottom: 16px; }
.module-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px 8px; }
.module-head .title { font-weight: 600; font-size: 16px; color: var(--ink); flex: 1; min-width: 0; }
.module-head .count { font-size: 12.5px; color: var(--muted); }
.handle { cursor: grab; color: var(--soft-icon); display: flex; }
.handle:active { cursor: grabbing; }
.lesson-list { list-style: none; margin: 0; padding: 4px 12px; min-height: 14px; }
.lesson-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #fff; border-radius: var(--r-sm); margin-bottom: 8px; }
.lesson-row:hover { box-shadow: 0 4px 14px rgba(var(--shadow-rgb), .07); }
.lesson-row .type { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--lavender-2); color: var(--violet-ink); }
.lesson-row a.name { flex: 1; color: var(--ink); font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lesson-row .meta { font-size: 12.5px; color: var(--muted); }
.module-foot { padding: 4px 18px 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.sortable-ghost { opacity: .4; }
.sortable-chosen { box-shadow: var(--shadow-lg); }

.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-pop { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; min-width: 220px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-lg); padding: 6px; }
.menu-pop.right { left: auto; right: 0; }
.menu-pop button, .menu-pop a { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; background: none; border: 0; border-radius: 10px; font: 500 14px var(--font); color: var(--ink); cursor: pointer; text-align: left; }
.menu-pop button:hover, .menu-pop a:hover { background: var(--lavender-3); text-decoration: none; }
.menu-pop .danger { color: var(--danger); }
.menu-pop form { margin: 0; }
.inline-form { display: flex; gap: 8px; padding: 8px; }

.side-card { position: sticky; top: 24px; }
.side-card > .cover { border-radius: var(--r-lg) var(--r-lg) 0 0; }
.kv { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.kv:last-child { border-bottom: 0; }

/* ---------- Editor de lección ---------- */
.editor-shell { display: grid; grid-template-columns: 290px minmax(0, 1fr); min-height: 100vh; gap: 12px; padding: 12px; }
.editor-nav { background: var(--surface); border-radius: var(--r-lg); position: sticky; top: 12px; height: calc(100vh - 24px); overflow-y: auto; padding-bottom: 16px; }
.editor-nav .back { display: flex; align-items: center; gap: 6px; padding: 20px 20px 12px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.editor-nav .course-name { padding: 4px 20px 6px; font-weight: 700; color: var(--ink); }
.editor-nav .mod { padding: 14px 20px 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.editor-nav a.les { display: flex; align-items: center; gap: 9px; padding: 9px 14px; margin: 0 8px; border-radius: var(--r-pill); font-size: 14px; color: var(--text); }
.editor-nav a.les:hover { background: var(--lavender-3); text-decoration: none; }
.editor-nav a.les.active { background: var(--violet); color: #fff; font-weight: 500; }
.editor-main { min-width: 0; background: var(--surface); border-radius: var(--r-lg); }
.editor-bar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 32px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); border-radius: var(--r-lg) var(--r-lg) 0 0; }
.editor-bar .type-label { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink); }
.editor-body { padding: 28px 32px 80px; max-width: 920px; }
.editor-body .card { background: var(--lavender-3); }
.file-list { list-style: none; padding: 0; margin: 0 0 14px; }
.file-list li { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); margin-bottom: 8px; background: #fff; }
.file-list .fname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.dropzone { border: 1.5px dashed var(--line-strong); border-radius: var(--r-md); padding: 22px; text-align: center; background: #fff; }
.dropzone input { margin-top: 8px; }
.video-preview { aspect-ratio: 16/9; border-radius: var(--r-md); overflow: hidden; background: #111; margin-top: 12px; }
.video-preview iframe { width: 100%; height: 100%; border: 0; }

/* Quill */
.ql-toolbar.ql-snow { border-color: var(--line-strong); border-radius: var(--r-sm) var(--r-sm) 0 0; background: #fff; font-family: var(--font); }
.ql-container.ql-snow { border-color: var(--line-strong); border-radius: 0 0 var(--r-sm) var(--r-sm); background: #fff; font: 15px/1.65 var(--font); }
.ql-editor { min-height: 220px; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1100px) {
  .builder, .course-body { grid-template-columns: 1fr; }
  .side-card { position: static; }
  .dash-grid { grid-template-columns: 1fr 1fr; }
  .dash-grid > :last-child { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .site-frame { margin: 0; border-radius: 0; min-height: 100vh; }
  .site-header .inner { grid-template-columns: 1fr auto; padding: 16px; row-gap: 12px; }
  .site-header .top-tabs { grid-column: 1 / -1; grid-row: 2; justify-self: start; }
  .container, .hero, .site-footer { padding-left: 16px; padding-right: 16px; }
  .dash-hero, .course-hero .inner { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 16px 16px 0; }
  .dash-grid, .course-body { grid-template-columns: minmax(0, 1fr); padding: 24px 16px 0; }
  .site-logo { font-size: 17px; }
  .dash-grid > :last-child { grid-column: auto; }
  .cover-strip { grid-template-columns: repeat(3, minmax(150px, 1fr)); overflow-x: auto; }

  .admin-shell { grid-template-columns: 1fr; padding: 0; gap: 0; }
  .admin-main { border-radius: 0; }
  .sidebar { position: fixed; inset: 0 auto 0 0; top: 0; height: 100vh; width: 284px; z-index: 50; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); border-radius: 0 var(--r-lg) var(--r-lg) 0; }
  body.nav-open .sidebar { transform: none; }
  .admin-topbar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
  .page { padding: 24px 16px 48px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .welcome { font-size: 30px !important; }
  .toolbar .divider { display: none; }
  .editor-shell { grid-template-columns: 1fr; padding: 0; }
  .editor-nav { display: none; }
  .editor-main, .editor-bar { border-radius: 0; }
  .editor-bar, .editor-body { padding-left: 16px; padding-right: 16px; }

  .player { grid-template-columns: 1fr; padding: 0; gap: 0; grid-template-rows: 60px minmax(0, 1fr); }
  .player-top { border-radius: 0; gap: 8px; padding: 0 10px; }
  .player-top .course-title { font-size: 15px; }
  .player-main { border-radius: 0; }
  .player-side { position: fixed; top: 60px; bottom: 0; left: 0; width: 86%; max-width: 340px; z-index: 30; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); border-radius: 0 var(--r-lg) var(--r-lg) 0; }
  body.nav-open .player-side { transform: none; }
  .player-top .menu-toggle { display: inline-flex; }
  .player-top .prog { min-width: 0; }
  .player-top .prog .progress { display: none; }
  .player-content { padding: 24px 16px 32px; }
  .player-content h1 { font-size: 26px; }
  .player-foot { padding: 12px 16px; }
  .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .player-foot .btn span.long { display: none; }
  .course-grid, .course-grid.lg { grid-template-columns: 1fr; }
  .top-tabs a { padding: 8px 14px; }
  .big-number { font-size: 46px; }
}

/* ---------- Bloque "Toma un respiro" ---------- */
.breath { text-align: center; }
.breath h2 { text-align: left; }
.breath-circle { width: 150px; height: 150px; margin: 6px auto 16px; border-radius: 50%; background: #fff; transform: scale(.78); transition: transform .6s; }
.breath.running .breath-circle { animation: breathe 8s ease-in-out infinite; }
.breath-label { font-size: 13.5px; font-weight: 500; color: var(--ink); margin-bottom: 14px; }
@keyframes breathe { 0%, 100% { transform: scale(.62); } 50% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .breath.running .breath-circle { animation: none; transform: scale(.9); } }
.block-lavender .kv { border-color: rgba(23, 19, 31, .08); }

/* ---------- Precio ---------- */
.price { display: inline-flex; align-items: baseline; gap: 8px; flex-wrap: wrap; color: var(--ink); }
.price .amount { font-weight: 700; letter-spacing: -.02em; }
.price .was { color: var(--muted); font-weight: 500; }
.price-sm .amount { font-size: 16px; }
.price-sm .was { font-size: 13px; }
.price-lg { margin-bottom: 18px; }
.price-lg .amount { font-size: 34px; line-height: 1; }
.price-lg .was { font-size: 18px; }
.price-lg .note { flex-basis: 100%; font-size: 13.5px; color: var(--muted); }
.buy-box { display: inline-flex; flex-direction: column; padding: 20px 22px; border-radius: var(--r-lg); background: var(--lavender-3); border: 1px solid var(--line); }

/* ---------- Menú de acciones (3 puntos) ---------- */
.pill-off { background: var(--danger-soft); color: var(--danger); }
.actions-pop { width: 300px; padding: 4px 6px; text-align: left; max-height: 70vh; overflow-y: auto; }
.actions-pop .pop-title { font-weight: 700; color: var(--ink); padding: 10px 10px 6px; }
.actions-pop .pop-section { padding: 8px 4px 10px; border-bottom: 1px solid var(--line); }
.actions-pop .pop-label { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 2px 6px 6px; }
.actions-pop .pop-form { display: grid; gap: 8px; padding: 0 6px; }
.actions-pop .pop-form .input { height: 38px; font-size: 13.5px; padding: 0 10px; }
.actions-pop .pop-form .check { font-size: 12.5px; gap: 8px; }
.actions-pop .pop-form .check input { width: 16px; height: 16px; }
.actions-pop .pop-note { margin: 0; padding: 0 6px; }
details.menu[data-float][open] > .menu-pop { position: fixed; }
.menu-pop button.btn { justify-content: center; border: 1px solid var(--line-strong); border-radius: var(--r-pill); height: 34px; font-weight: 600; font-size: 13px; }
.menu-pop button.btn-primary { background: var(--violet); border-color: var(--violet); color: #fff; }
.menu-pop button.btn-primary:hover { background: var(--violet-hover); }

/* =========================================================
   LANDINGS (páginas de venta)
   ========================================================= */
.lp { display: flex; flex-direction: column; }
.lp-inner { max-width: 1080px; margin: 0 auto; padding: 0 40px; width: 100%; }
.lp-narrow { max-width: 780px; }
.lp-center { text-align: center; }
.lp-center .lp-actions { justify-content: center; }
.lp-section { padding: 72px 0; }
.lp-section h2 { font-size: clamp(26px, 3.2vw, 38px); margin-bottom: 14px; }
.lp-lead { font-size: 18px; color: var(--text); margin-bottom: 16px; }
.lp-eyebrow { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--violet); margin-bottom: 8px; }
.lp-text { font-size: 16px; line-height: 1.75; }
.lp-text p:last-child { margin-bottom: 0; }
.lp-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.lp-actions:empty { display: none; }
.lp-btn { background: var(--violet); border-color: var(--violet); color: #fff; }
.lp-btn:hover { background: var(--violet-hover); }
.lp-rounded { border-radius: var(--r-lg); width: 100%; }
.lp-img-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; aspect-ratio: 4 / 3; border-radius: var(--r-lg); border: 2px dashed var(--line-strong); color: var(--muted); background: rgba(255, 255, 255, .6); font-size: 14px; }
.lp-empty { text-align: center; padding: 120px 24px; color: var(--muted); }
.lp-empty h3 { margin: 12px 0 6px; }

/* Fondos */
.lp-bg-white { background: #fff; }
.lp-bg-soft { background: var(--lavender-3); }
.lp-bg-lavender { background: var(--lavender); }
.lp-bg-pink { background: var(--pink); }
.lp-bg-plum { background: var(--plum); color: var(--on-dark); }
.lp-bg-plum h2, .lp-bg-plum h3 { color: #fff; }
.lp-bg-plum .lp-btn { background: var(--pink-strong); border-color: var(--pink-strong); color: var(--plum); }
.lp-bg-pink .lp-btn, .lp-bg-lavender .lp-btn { background: var(--plum); border-color: var(--plum); }

/* Portada */
.lp-banner { position: relative; display: flex; align-items: center; background: var(--plum) center / cover no-repeat; color: #fff; min-height: 520px; padding: 80px 0; }
.lp-banner.lp-banner-plain { background: linear-gradient(135deg, var(--plum) 0%, var(--plum-3) 55%, var(--plum-4) 100%); }
.lp-banner.lp-h-tall { min-height: 680px; }
.lp-banner.lp-h-short { min-height: 360px; }
.lp-banner h1 { color: #fff; font-size: clamp(34px, 5vw, 60px); margin-bottom: 16px; max-width: 820px; }
.lp-banner .lp-sub { font-size: 18px; opacity: .92; max-width: 640px; }
.lp-banner.lp-align-center { text-align: center; }
.lp-banner.lp-align-center h1, .lp-banner.lp-align-center .lp-sub { margin-left: auto; margin-right: auto; }
.lp-banner.lp-align-center .lp-actions { justify-content: center; }
.lp-banner .lp-btn { background: var(--pink-strong); border-color: var(--pink-strong); color: var(--plum); }
.lp-banner .lp-btn:hover { background: var(--pink-strong); }

/* Dos columnas */
.lp-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.lp-split-top { align-items: start; }
.lp-split-rev .lp-media { order: -1; }
.lp-media img { width: 100%; }
.lp-portrait { aspect-ratio: 4 / 5; object-fit: cover; border-radius: 200px 200px var(--r-lg) var(--r-lg); width: 100%; max-width: 420px; margin: 0 auto; }

/* Lista con checks */
.lp-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; text-align: left; }
.lp-checks li { display: flex; gap: 14px; align-items: flex-start; background: #fff; border-radius: var(--r-md); padding: 16px 18px; color: var(--ink); font-size: 15px; box-shadow: 0 1px 2px rgba(var(--shadow-rgb), .05); }
.lp-checks li p { margin: 0; }
.lp-check { width: 26px; height: 26px; border-radius: 50%; background: var(--violet); color: #fff; display: grid; place-items: center; flex-shrink: 0; margin-top: 1px; }
.lp-checks-compact li { background: transparent; box-shadow: none; padding: 6px 0; }
.lp-bg-plum .lp-checks-compact li { color: var(--on-dark); }
.lp-bg-plum .lp-check { background: var(--pink-strong); color: var(--plum); }
.lp-narrow.lp-center .lp-checks { max-width: 620px; margin: 24px auto 0; }

/* Imagen destacada y video */
.lp-figure { margin: 0 auto; text-align: center; }
.lp-figure img { margin: 0 auto; }
.lp-w-small { max-width: 420px; }
.lp-w-medium { max-width: 720px; }
.lp-w-wide { max-width: 1080px; }
.lp-figure figcaption { margin-top: 12px; color: var(--muted); font-size: 14px; }
.lp-video { aspect-ratio: 16 / 9; border-radius: var(--r-lg); overflow: hidden; background: #000; margin-top: 24px; }
.lp-video iframe { width: 100%; height: 100%; border: 0; }

/* Precio */
.lp-price-card { text-align: center; }
.lp-price-card .lp-checks { max-width: 520px; margin: 22px auto 0; }
.lp-price { display: flex; justify-content: center; align-items: baseline; gap: 10px; margin-top: 28px; }
.lp-price .amount { font-size: 56px; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.lp-price .per { font-size: 18px; opacity: .8; }
.lp-price .was { font-size: 22px; opacity: .6; }
.lp-note { margin: 10px 0 0; opacity: .8; font-size: 14px; }
.lp-price-card .lp-actions { justify-content: center; }
.lp-bg-plum .lp-price .amount { color: #fff; }

/* Testimonios */
.lp-quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-top: 28px; }
.lp-quote { margin: 0; background: #fff; border-radius: var(--r-lg); padding: 26px; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; color: var(--ink); }
.lp-quote blockquote { margin: 0; font-size: 15.5px; line-height: 1.7; }
.lp-quote blockquote p:last-child { margin: 0; }
.lp-quote figcaption { display: flex; align-items: center; gap: 12px; font-size: 13.5px; }
.lp-quote figcaption img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.lp-quote figcaption span span { display: block; color: var(--muted); }

/* Preguntas frecuentes */
.lp-faq { display: grid; gap: 10px; margin-top: 24px; }
.lp-faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 0 20px; }
.lp-faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 18px 0; font-weight: 600; color: var(--ink); }
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq details[open] .chev { transform: rotate(180deg); }
.lp-faq .lp-text { padding-bottom: 18px; font-size: 15px; }
.lp-bg-plum .lp-faq details, .lp-bg-plum .lp-faq summary { color: var(--ink); }

/* Llamado a la acción */
.lp-cta.lp-cta-img { background-size: cover; background-position: center; color: #fff; padding: 110px 0; }
.lp-cta.lp-cta-img h2 { color: #fff; }

@media (max-width: 900px) {
  .lp-inner { padding: 0 16px; }
  .lp-section { padding: 52px 0; }
  .lp-split { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .lp-split-rev .lp-media { order: 0; }
  .lp-banner { min-height: 420px; padding: 64px 0; }
  .lp-banner.lp-h-tall { min-height: 520px; }
  .lp-price .amount { font-size: 44px; }
}

/* =========================================================
   EDITOR DE PÁGINAS (landing builder)
   ========================================================= */
.lb-body { overflow: hidden; }
.lb { display: grid; grid-template-columns: 360px minmax(0, 1fr); grid-template-rows: 64px minmax(0, 1fr); height: 100vh; }
.lb-top { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; padding: 0 16px; background: var(--plum); color: #fff; }
.lb-close { color: #fff; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; }
.lb-close:hover { background: rgba(255, 255, 255, .1); }
.lb-brand { display: flex; flex-direction: column; line-height: 1.2; padding-right: 16px; border-right: 1px solid rgba(255, 255, 255, .15); }
.lb-brand span { font-size: 12px; opacity: .7; }
.lb-title { flex: 1; text-align: center; font-weight: 600; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.lb-title .pill { margin-left: 8px; vertical-align: middle; }
.pill-off-dark { background: rgba(255, 255, 255, .14); color: #fff; }
.lb-devices { display: flex; gap: 4px; padding: 4px; background: rgba(255, 255, 255, .08); border-radius: var(--r-pill); }
.lb-devices button { display: flex; align-items: center; gap: 6px; background: none; border: 0; color: rgba(255, 255, 255, .7); font: 500 13px var(--font); padding: 7px 12px; border-radius: var(--r-pill); cursor: pointer; }
.lb-devices button.active { background: #fff; color: var(--plum); }
.lb-actions { display: flex; align-items: center; gap: 8px; }
.lb-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .3); }
.lb-ghost:hover { background: rgba(255, 255, 255, .1); }
.lb-dirty { font-size: 12.5px; color: var(--pink-strong); white-space: nowrap; }

.lb-panel { background: #fff; border-right: 1px solid var(--line); overflow-y: auto; padding: 18px 16px 28px; }
.lb-panel-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 14px; }
.lb-panel-head strong { font-size: 16px; color: var(--ink); }
.lb-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 18px 2px 8px; }
.lb-fixed { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-radius: var(--r-sm); background: var(--lavender-3); border: 1px solid var(--line); font-weight: 600; font-size: 14px; color: var(--ink); }
.lb-sections { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.lb-item { display: flex; align-items: center; gap: 4px; padding: 6px 6px 6px 8px; border-radius: var(--r-sm); background: #fff; border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(var(--shadow-rgb), .05); }
.lb-item:hover { border-color: var(--line-strong); }
.lb-item.active { border-color: var(--violet); box-shadow: 0 0 0 2px rgba(var(--violet-rgb), .15); }
.lb-item .handle { color: var(--soft-icon); cursor: grab; display: flex; padding: 4px; }
.lb-item-main { flex: 1; min-width: 0; text-align: left; background: none; border: 0; cursor: pointer; padding: 4px; font-family: inherit; }
.lb-item-main strong { display: block; font-size: 14px; color: var(--ink); }
.lb-item-main span { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-item .btn-icon { width: 30px; height: 30px; color: var(--muted); }
.lb-empty { color: var(--muted); font-size: 14px; padding: 12px; text-align: center; border: 1.5px dashed var(--line-strong); border-radius: var(--r-sm); }

.lb-edit-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 16px; }
.lb-edit-head strong { font-size: 16px; color: var(--ink); }
.lb-form .field { display: block; margin-bottom: 16px; }
.lb-form .input { height: 42px; font-size: 14px; }
.lb-form textarea.input { min-height: 96px; height: auto; }
.lb-group { padding: 12px; border-radius: var(--r-sm); background: var(--lavender-3); margin-bottom: 16px; }
.lb-group .field:last-child { margin-bottom: 0; }
.lb-image { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px; border: 1px dashed var(--line-strong); border-radius: var(--r-sm); }
.lb-image img { width: 100%; max-height: 150px; object-fit: cover; border-radius: 8px; }
.lb-image-empty { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; flex: 1; }
.lb-list-item { padding: 12px; border-radius: var(--r-sm); background: var(--lavender-3); border: 1px solid var(--line); margin-bottom: 10px; }
.lb-list-head { display: flex; align-items: center; gap: 2px; margin-bottom: 8px; }
.lb-list-head strong { flex: 1; font-size: 13px; color: var(--ink); }
.lb-list-head .btn-icon { width: 28px; height: 28px; }
.lb-list-head .btn-icon[disabled] { opacity: .3; cursor: default; }
.lb-list-item .field { margin-bottom: 10px; }
.lb-list-item .field:last-child { margin-bottom: 0; }
.lb-edit-foot { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 14px; border-top: 1px solid var(--line); }

.lb-stage { background: var(--page); overflow: auto; padding: 20px; }
.lb-canvas { height: 100%; margin: 0 auto; max-width: 1400px; border-radius: var(--r-lg); overflow: hidden; background: #fff; box-shadow: 0 10px 30px rgba(var(--shadow-rgb), .10); transition: max-width .25s; }
.lb-canvas.is-mobile { max-width: 400px; border-radius: 34px; border: 10px solid var(--plum); }
.lb-canvas iframe { width: 100%; height: 100%; border: 0; display: block; }

.lb-dialog { border: 0; border-radius: var(--r-xl); padding: 0; width: min(860px, calc(100vw - 32px)); max-height: calc(100vh - 64px); box-shadow: var(--shadow-lg); }
.lb-dialog::backdrop { background: rgba(var(--shadow-rgb), .45); }
.lb-dialog-head { display: flex; justify-content: space-between; align-items: center; padding: 22px 26px 8px; }
.lb-dialog-head h2 { font-size: 21px; }
.lb-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; padding: 14px 26px 26px; }
.lb-type { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; padding: 16px; border-radius: var(--r-md); border: 1px solid var(--line); background: #fff; cursor: pointer; font-family: inherit; transition: transform .1s, box-shadow .15s; }
.lb-type:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(var(--shadow-rgb), .10); border-color: var(--line-strong); }
.lb-type .ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 6px; }
.lb-type-0 .ico { background: var(--lavender); color: var(--violet-ink); }
.lb-type-1 .ico { background: var(--pink); color: var(--pink-ink); }
.lb-type-2 .ico { background: var(--plum); color: #fff; }
.lb-type strong { color: var(--ink); font-size: 14.5px; }
.lb-type span:last-child { color: var(--muted); font-size: 12.5px; line-height: 1.4; }

.lb-toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--plum); color: #fff; padding: 12px 20px; border-radius: var(--r-pill); font-size: 14px; box-shadow: var(--shadow-lg); z-index: 100; }
.lb-toast.error { background: var(--danger); }

@media (max-width: 1000px) {
  .lb { grid-template-columns: 300px minmax(0, 1fr); }
  .lb-brand, .lb-devices span { display: none; }
}
@media (max-width: 720px) {
  .lb { grid-template-columns: 1fr; grid-template-rows: 64px auto minmax(60vh, 1fr); height: auto; }
  .lb-body { overflow: auto; }
  .lb-title { display: none; }
}
.landing-card-0 .cover { background: linear-gradient(135deg, var(--lavender), var(--pink)); }
.landing-card-1 .cover { background: linear-gradient(135deg, var(--plum), var(--plum-2)); }
.landing-card-1 .cover .placeholder { color: #fff; }
.pill-pink { background: var(--pink); color: var(--pink-ink); }

/* =========================================================
   COLOR: acentos variados (lavanda, rosa, ciruela, durazno)
   ========================================================= */
:root { --peach: #FFE7C7; --peach-ink: #8A5300;  }

/* Tarjetas de resumen del panel: cada una de un color */
.stat:nth-child(1) { background: var(--lavender); border-color: var(--lavender); }
.stat:nth-child(2) { background: var(--pink); border-color: var(--pink); }
.stat:nth-child(3) { background: var(--plum); border-color: var(--plum); }
.stat:nth-child(3) .value, .stat:nth-child(3) .label { color: #fff; }

/* Accesos rápidos del panel */
.quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.quick a { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-radius: var(--r-lg); color: var(--ink); font-weight: 600; transition: transform .12s, box-shadow .15s; }
.quick a:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.quick a small { display: block; font-weight: 400; font-size: 12.5px; color: var(--muted); }
.quick .ico { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: rgba(255, 255, 255, .7); flex-shrink: 0; }
.quick a:nth-child(1) { background: var(--lavender-2); }
.quick a:nth-child(2) { background: var(--pink); }
.quick a:nth-child(3) { background: var(--plum); color: #fff; }
.quick a:nth-child(3) small { color: rgba(255, 255, 255, .7); }
.quick a:nth-child(3) .ico { background: rgba(255, 255, 255, .12); }

/* Tipos de lección con su propio color */
.t-video { background: var(--pink) !important; color: var(--pink-ink) !important; }
.t-text { background: var(--lavender-2) !important; color: var(--violet-ink) !important; }
.t-download { background: var(--plum) !important; color: #fff !important; }
.lesson-row .type.t-download { color: #fff; }

/* Avatares de estudiantes en colores alternos */
.avatar.c1 { background: var(--pink); color: var(--pink-ink); }
.avatar.c3 { background: var(--plum); color: #fff; }

/* Página del curso: resumen rosa, compra lavanda */
.course-body aside .block-lavender { background: var(--pink); }
.buy-box { background: var(--lavender-2); border-color: var(--lavender); }
.membership-card .cover { background: linear-gradient(135deg, var(--plum), var(--plum-2)); }
.membership-card .cover .placeholder { color: #fff; }

/* Tarjetas de curso: franja de color según su posición */
.course-grid > .course-card:nth-child(3n+2) .cover .placeholder { color: var(--pink-ink); }

@media (max-width: 900px) { .quick { grid-template-columns: 1fr; } }

/* =========================================================
   INICIO DEL PANEL v2 — sin naranja, colores alternados
   Fila de resumen:   lavanda · lavanda suave · ciruela · rosa
   Fila de accesos:   ciruela · lavanda · lavanda suave
   ========================================================= */
.adm-hero { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr); gap: 40px; align-items: center; margin-bottom: 30px; }
.adm-hero p { font-size: 15.5px; color: var(--text); max-width: 440px; margin: 0; }
.adm-hero .welcome { margin-bottom: 12px; }
.adm-grid { display: grid; grid-template-columns: 1.1fr 1fr 0.85fr; gap: 20px; align-items: start; }
.adm-grid .stack { display: grid; gap: 20px; }
.cohort { display: block; padding: 12px 14px; background: #fff; border-radius: var(--r-md); margin-bottom: 10px; color: var(--ink); }
.cohort:last-child { margin-bottom: 0; }
.cohort:hover { text-decoration: none; box-shadow: 0 4px 14px rgba(var(--shadow-rgb), .07); }
.cohort-top { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; margin-bottom: 8px; }
.cohort-top span { font-weight: 700; color: var(--violet-ink); }
.cohort-meta { font-size: 12.5px; color: var(--muted); margin-top: 7px; }
.soon-note { display: flex; gap: 8px; align-items: flex-start; margin-top: 16px; padding: 12px 14px; border-radius: var(--r-md); background: rgba(255, 255, 255, .6); font-size: 13px; color: var(--ink); }
.soon-note .icon { margin-top: 2px; color: var(--pink-ink); }

/* Resumen: 4 colores distintos, sin naranja */
.stat:nth-child(1) { background: var(--lavender); border-color: var(--lavender); }
.stat:nth-child(2) { background: var(--lavender-3); border-color: var(--line); }
.stat:nth-child(3) { background: var(--plum); border-color: var(--plum); }
.stat:nth-child(3) .value, .stat:nth-child(3) .label { color: #fff; }
.stat:nth-child(4) { background: var(--pink); border-color: var(--pink); }

/* Accesos rápidos: orden distinto para no repetir la fila de arriba */
.quick a:nth-child(1) { background: var(--plum); color: #fff; }
.quick a:nth-child(1) small { color: rgba(255, 255, 255, .7); }
.quick a:nth-child(1) .ico { background: rgba(255, 255, 255, .12); }
.quick a:nth-child(2) { background: var(--lavender); color: var(--ink); }
.quick a:nth-child(2) .ico { background: rgba(255, 255, 255, .7); }
.quick a:nth-child(3) { background: var(--lavender-3); color: var(--ink); border: 1px solid var(--line); }
.quick a:nth-child(3) small { color: var(--muted); }
.quick a:nth-child(3) .ico { background: #fff; }

/* Fuera el durazno/naranja en el resto de tarjetas */
.t-pdf { background: var(--lavender) !important; color: var(--violet-ink) !important; }
.avatar.c2 { background: var(--lavender-2); color: var(--violet-ink); }
.course-grid > .course-card:nth-child(3n+2) .cover:not(:has(img)) { background: linear-gradient(135deg, var(--pink), var(--lavender-2)); }
.course-grid > .course-card:nth-child(3n) .cover:not(:has(img)) { background: linear-gradient(135deg, var(--lavender-2), var(--lavender)); }
.landing-card-2 .cover { background: linear-gradient(135deg, var(--pink), var(--lavender-2)); }
.lb-type-3 .ico { background: var(--lavender-3); color: var(--violet-ink); border: 1px solid var(--line); }
.pill-warn { background: var(--pink); color: var(--pink-ink); }

@media (max-width: 1100px) {
  .adm-grid { grid-template-columns: 1fr 1fr; }
  .adm-grid > :last-child { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .adm-hero, .adm-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .adm-grid > :last-child { grid-column: auto; }
}
.task.all-clear .box { background: var(--violet); border-color: var(--violet); color: #fff; }
.buy-link { padding: 16px; border-radius: var(--r-md); margin-bottom: 22px; }
.buy-link label { display: block; font-weight: 600; font-size: 14px; color: var(--ink); margin-bottom: 8px; }
.buy-link.ok { background: var(--lavender-2); }
.buy-link.missing { background: var(--pink); }
.buy-link .input { background: #fff; }

/* ---------- Instalador ---------- */
.install-steps { display: flex; gap: 6px; justify-content: center; margin-bottom: 18px; flex-wrap: wrap; }
.install-steps span { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 7px; border-radius: var(--r-pill); background: #fff; color: var(--muted); font-size: 13px; font-weight: 500; }
.install-steps b { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--chip); font-size: 12px; }
.install-steps .active { color: var(--ink); }
.install-steps .active b { background: var(--violet); color: #fff; }
.install-steps .done b { background: var(--lavender); color: var(--violet-ink); }
.req-list { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 8px; }
.req-list li { display: flex; gap: 12px; align-items: center; padding: 10px 14px; border-radius: var(--r-sm); background: var(--lavender-3); }
.req-list .dot { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; flex-shrink: 0; }
.req-list .ok .dot { background: var(--violet); color: #fff; }
.req-list .bad { background: var(--danger-soft); }
.req-list .bad .dot { background: var(--danger); color: #fff; }
.req-list strong { display: block; font-size: 14px; color: var(--ink); }
.req-list small { color: var(--muted); font-size: 12px; }

/* =========================================================
   COMUNIDAD
   ========================================================= */
.cm { display: grid; grid-template-columns: 250px minmax(0, 1fr) 280px; gap: 24px; padding: 20px 32px 0; align-items: start; }
.cm-side { position: sticky; top: 16px; }
.cm-search { display: flex; align-items: center; gap: 8px; padding: 0 14px; height: 42px; border-radius: var(--r-pill); background: var(--lavender-3); border: 1px solid var(--line); color: var(--muted); margin-bottom: 14px; }
.cm-search input { border: 0; background: transparent; font: 14px var(--font); width: 100%; outline: none; color: var(--ink); }
.cm-nav { display: flex; flex-direction: column; gap: 2px; }
.cm-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--r-pill); color: var(--text); font-weight: 500; font-size: 14.5px; }
.cm-nav a:hover { background: var(--lavender-3); text-decoration: none; }
.cm-nav a.active { background: var(--lavender); color: var(--violet-ink); font-weight: 600; }
.cm-badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--r-pill); background: var(--violet); color: #fff; font-size: 12px; display: grid; place-items: center; }
.cm-label { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 20px 14px 8px; }
.cm-label a { color: var(--muted); display: flex; }
.cm-spaces a { padding: 8px 12px; }
.sp-ico { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; }
.sp-ico.big { width: 48px; height: 48px; }
.sp-lavender, .sp-ico.sp-lavender { background: var(--lavender); color: var(--violet-ink); }
.sp-pink, .sp-ico.sp-pink { background: var(--pink); color: var(--pink-ink); }
.sp-plum, .sp-ico.sp-plum { background: var(--plum); color: #fff; }

.cm-main { min-width: 0; }
.cm-right { position: sticky; top: 16px; display: grid; gap: 16px; }
.cm-mini { padding: 20px; }
.cm-mini h2 { font-size: 16px; margin-bottom: 12px; }
.cm-event-mini { display: flex; gap: 12px; align-items: center; padding: 8px 0; color: inherit; border-top: 1px solid rgba(255, 255, 255, .12); }
.cm-event-mini:first-of-type { border-top: 0; }
.cm-event-mini:hover { text-decoration: none; opacity: .9; }
.cm-event-mini .date { width: 44px; height: 48px; border-radius: 12px; background: rgba(255, 255, 255, .12); display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 11px; text-transform: uppercase; flex-shrink: 0; }
.cm-event-mini .date b { font-size: 18px; line-height: 1; }
.cm-event-mini strong { display: block; font-size: 13.5px; }
.cm-event-mini small { opacity: .75; font-size: 12px; }

.cm-hero { border-radius: var(--r-lg); overflow: hidden; background: #fff; border: 1px solid var(--line); margin-bottom: 18px; }
.cm-hero img, .cm-hero-art { width: 100%; height: 190px; object-fit: cover; display: block; }
.cm-hero-art { background: radial-gradient(circle at 20% 30%, var(--pink) 0 18%, transparent 19%), radial-gradient(circle at 75% 60%, var(--lavender) 0 24%, transparent 25%), radial-gradient(circle at 50% 10%, #fff 0 8%, transparent 9%), linear-gradient(120deg, var(--plum), var(--plum-2) 60%, var(--plum-4)); }
.cm-hero-body { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 20px 24px; }
.cm-hero-body h1 { font-size: 24px; margin-bottom: 6px; }
.cm-hero-body p { margin: 0; color: var(--text); font-size: 15px; }
.cm-faces { display: flex; align-items: center; flex-shrink: 0; }
.cm-faces > * { margin-left: -9px; border: 2px solid #fff; box-shadow: none; }
.cm-faces > *:first-child { margin-left: 0; }
.cm-faces .more { margin-left: 6px; border: 0; font-weight: 700; color: var(--ink); font-size: 14px; }
.cm-faces.static { flex-wrap: wrap; gap: 4px; }
.cm-faces.static > * { margin-left: 0; }
.avatar-img { border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 2px solid #fff; }

.cm-space-head { display: flex; align-items: center; gap: 14px; padding: 20px 22px; border-radius: var(--r-lg); margin-bottom: 18px; flex-wrap: wrap; }
.cm-space-head h1 { font-size: 24px; }
.cm-space-head p { margin: 2px 0 0; font-size: 14px; }
.cm-space-head.sp-plum h1 { color: #fff; }
.cm-space-head .pill { margin-left: auto; }
.cm-title { font-size: 26px; margin: 4px 0 18px; }
.cm-title-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.cm-title-row .cm-title { margin: 0; }
.cm-section { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 26px 0 12px; }
.cm-back { display: inline-flex; align-items: center; gap: 4px; font-size: 13.5px; font-weight: 600; color: var(--muted); margin-bottom: 12px; }

.cm-composer { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; margin-bottom: 8px; }
.cm-composer-top { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 14.5px; color: var(--text); }
.cm-space-select { border: 0; background: var(--lavender-3); border-radius: var(--r-pill); padding: 7px 12px; font: 600 14px var(--font); color: var(--ink); cursor: pointer; }
.cm-composer-box { border: 1px solid var(--line-strong); border-radius: var(--r-md); padding: 10px 12px 8px; }
.cm-composer-box:focus-within { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(var(--violet-rgb), .12); }
.cm-title-input { width: 100%; border: 0; font: 600 15px var(--font); color: var(--ink); outline: none; padding: 4px 2px; }
.cm-composer textarea, .cm-comment-form textarea, .cm-reply-form textarea { width: 100%; border: 0; resize: vertical; font: 15px/1.55 var(--font); color: var(--ink); outline: none; padding: 4px 2px; min-height: 60px; }
.cm-composer-tools { display: flex; align-items: center; gap: 6px; border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; }
.cm-icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 0; background: none; color: var(--muted); cursor: pointer; list-style: none; }
.cm-icon-btn:hover { background: var(--lavender-3); color: var(--violet-ink); }
summary.cm-icon-btn::-webkit-details-marker { display: none; }

.cm-post { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 20px 12px; margin-bottom: 14px; }
.cm-post.pinned { border-color: var(--lavender); box-shadow: 0 0 0 3px var(--lavender-2); }
.cm-post-meta { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.cm-in { font-size: 12.5px; color: var(--muted); text-decoration: underline; }
.cm-post-head { display: flex; gap: 12px; align-items: center; }
.cm-post-head .who { flex: 1; min-width: 0; line-height: 1.25; }
.cm-post-head .who strong { display: block; color: var(--ink); font-size: 15px; }
.cm-post-head .who span { font-size: 12.5px; color: var(--muted); }
.mod { font-style: normal; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--violet); }
.cm-follow { border: 0; background: none; font: 500 13px var(--font); color: var(--muted); cursor: pointer; padding: 6px 10px; border-radius: var(--r-pill); }
.cm-follow:hover { background: var(--lavender-3); }
.cm-follow.on { color: var(--violet-ink); }
.cm-post-body { display: block; color: var(--ink); margin: 12px 0 0; }
.cm-post-body:hover { text-decoration: none; }
.cm-post-body h3 { font-size: 18px; margin-bottom: 6px; }
.cm-text { font-size: 15px; line-height: 1.65; color: var(--text); word-wrap: break-word; }
.cm-text p { margin: 0 0 .7em; }
.cm-text p:last-child { margin-bottom: 0; }
.cm-text.clamp { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.mention { color: var(--violet-ink); font-weight: 600; background: var(--lavender-2); border-radius: 6px; padding: 0 4px; }
.cm-post-img { width: 100%; max-height: 520px; object-fit: cover; border-radius: var(--r-md); margin-top: 12px; }
.cm-post .download-item { margin-top: 12px; }
.cm-post-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.cm-comments { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13.5px; font-weight: 500; }

.cm-reactions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cm-react { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 10px; border-radius: var(--r-pill); border: 1px solid var(--line); background: #fff; font-size: 14px; cursor: pointer; }
.cm-react b { font-size: 12.5px; color: var(--text); font-weight: 600; }
.cm-react.mine { background: var(--lavender-2); border-color: var(--lavender); }
.cm-react-pick { position: relative; display: inline-flex; }
.cm-react-menu { position: absolute; bottom: calc(100% + 6px); left: 0; display: flex; gap: 2px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-pill); padding: 4px; box-shadow: var(--shadow-lg); z-index: 15; }
.cm-react-menu button { border: 0; background: none; font-size: 20px; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; transition: transform .1s; }
.cm-react-menu button:hover { background: var(--lavender-3); transform: scale(1.15); }

.cm-thread { margin-top: 6px; }
.cm-comment { display: flex; gap: 10px; margin-bottom: 14px; scroll-margin-top: 20px; }
.cm-comment.reply { margin: 12px 0 0; }
.cm-comment-main { flex: 1; min-width: 0; }
.cm-bubble { background: var(--lavender-3); border-radius: 4px var(--r-md) var(--r-md) var(--r-md); padding: 10px 14px; }
.cm-bubble .who { font-size: 13px; margin-bottom: 2px; }
.cm-bubble .who strong { color: var(--ink); }
.cm-bubble .who span { color: var(--muted); }
.cm-bubble .cm-text { font-size: 14.5px; }
.cm-comment-actions { display: flex; align-items: center; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.cm-comment-actions form { margin: 0; }
.cm-comment-actions .cm-react { height: 26px; font-size: 13px; }
.cm-comment-actions .cm-icon-btn { width: 28px; height: 28px; }
.cm-link { border: 0; background: none; color: var(--muted); font: 500 13px var(--font); cursor: pointer; display: inline-flex; align-items: center; gap: 4px; padding: 0; }
.cm-link:hover { color: var(--violet-ink); }
.cm-comment-form, .cm-reply-form { display: flex; gap: 10px; align-items: flex-start; background: #fff; border: 1px solid var(--line-strong); border-radius: var(--r-md); padding: 10px 12px; margin-top: 12px; }
.cm-comment-form textarea, .cm-reply-form textarea { min-height: 44px; }
.cm-comment:target .cm-bubble { box-shadow: 0 0 0 2px var(--violet); }

.cm-event { display: flex; gap: 16px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px; margin-bottom: 12px; }
.cm-event-date { width: 56px; height: 62px; border-radius: 16px; background: var(--pink); color: var(--pink-ink); display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; text-transform: uppercase; font-size: 12px; font-weight: 600; }
.cm-event-date b { font-size: 24px; line-height: 1; color: var(--ink); }
.cm-event-date.big { width: 70px; height: 78px; }
.cm-event-main { flex: 1; min-width: 0; }
.cm-event-main h3 { font-size: 17px; color: var(--ink); margin-bottom: 4px; }
.cm-event-main p { margin: 0 0 6px; }
.cm-event-page { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px 24px; }
.cm-event-page .cm-post-img { margin: 0 0 18px; }
.cm-event-page-head { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
.cm-event-page-head h1 { font-size: 26px; }
.cm-event-page-head p { margin: 4px 0 0; }
.cm-event-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 20px; }
.cm-event-actions form { margin: 0; }

.cm-members { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.cm-member { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 16px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.cm-member strong { color: var(--ink); font-size: 15px; }
.cm-member p { margin: 0; font-size: 13px; color: var(--text); }

.cm-notif { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: var(--r-md); color: var(--ink); }
.cm-notif:hover { background: var(--lavender-3); text-decoration: none; }
.cm-notif.unread { background: var(--lavender-2); }
.cm-notif-ico { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: var(--lavender); color: var(--violet-ink); }
.cm-notif-ico.k-reaction { background: var(--pink); color: var(--pink-ink); }
.cm-notif-ico.k-mention { background: var(--plum); color: #fff; }
.cm-notif-text { flex: 1; min-width: 0; }
.cm-notif-text strong { display: block; font-size: 14px; font-weight: 500; }
.cm-notif-text small { color: var(--muted); font-size: 12.5px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.mention-pop { position: absolute; z-index: 60; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-lg); padding: 4px; min-width: 220px; }
.mention-pop button { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; padding: 8px 10px; border-radius: 10px; font: 500 14px var(--font); color: var(--ink); cursor: pointer; text-align: left; }
.mention-pop button.on, .mention-pop button:hover { background: var(--lavender-3); }

.site-nav .bell { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--ink); }
.site-nav .bell:hover { background: var(--lavender-3); }
.site-nav .bell span { position: absolute; top: 4px; right: 4px; min-width: 17px; height: 17px; border-radius: var(--r-pill); background: var(--violet); color: #fff; font-size: 10.5px; display: grid; place-items: center; padding: 0 4px; }

@media (max-width: 1150px) {
  .cm { grid-template-columns: 220px minmax(0, 1fr); }
  .cm-right { display: none; }
}
@media (max-width: 800px) {
  .cm { grid-template-columns: minmax(0, 1fr); padding: 12px 16px 0; }
  .cm-side { position: static; }
  .cm-nav { flex-direction: row; overflow-x: auto; }
  .cm-nav a { white-space: nowrap; }
  .cm-hero-body { flex-direction: column; align-items: flex-start; }
}
.cm-event-mini.light { color: var(--ink); border: 0; padding: 4px 0 10px; }
.cm-event-mini.light .date { background: var(--pink); color: var(--pink-ink); }
.cm-event-mini.light small { color: var(--muted); opacity: 1; }
a.soon-note:hover { text-decoration: none; background: #fff; }

/* ---------- Salón de reuniones y grabaciones ---------- */
.cm-rooms { display: grid; gap: 12px; }
.cm-room { display: flex; align-items: center; gap: 16px; padding: 20px 22px; border-radius: var(--r-lg); flex-wrap: wrap; }
.cm-room-0 { background: var(--lavender); }
.cm-room-1 { background: var(--pink); }
.cm-room-2 { background: var(--lavender-3); border: 1px solid var(--line); }
.cm-room .sp-ico { background: #fff; color: var(--violet-ink); }
.cm-room-main { flex: 1; min-width: 200px; }
.cm-room-main h3 { font-size: 18px; margin-bottom: 4px; }
.cm-room-main p { margin: 0; font-size: 14px; }
.cm-room-when { display: flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink); margin-bottom: 4px !important; }
.cm-recs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.cm-rec { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; color: var(--ink); transition: transform .12s, box-shadow .15s; }
.cm-rec:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.cm-rec-thumb { position: relative; aspect-ratio: 16 / 9; display: grid; place-items: center; overflow: hidden; }
.cm-rec-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cm-rec-thumb.thumb-0 { background: linear-gradient(135deg, var(--plum), var(--plum-2)); }
.cm-rec-thumb.thumb-1 { background: linear-gradient(135deg, var(--pink), var(--lavender)); }
.cm-rec-thumb.thumb-2 { background: linear-gradient(135deg, var(--lavender), var(--lavender-3)); }
.cm-rec-thumb .play { position: relative; width: 52px; height: 52px; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--plum); display: grid; place-items: center; box-shadow: 0 6px 18px rgba(0, 0, 0, .2); }
.cm-rec-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 2px; }
.cm-rec-body strong { font-size: 14.5px; line-height: 1.35; }
.cm-post-video { margin-top: 12px; }

/* ---------- Perfil y muro ---------- */
.cm-profile { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; margin-bottom: 8px; }
.cm-profile-cover { height: 120px; background: radial-gradient(circle at 80% 30%, var(--pink) 0 16%, transparent 17%), radial-gradient(circle at 25% 80%, var(--lavender) 0 22%, transparent 23%), linear-gradient(120deg, var(--plum), var(--plum-2) 60%, var(--plum-4)); }
.cm-profile-body { display: flex; gap: 18px; align-items: flex-end; padding: 0 24px 20px; margin-top: -46px; flex-wrap: wrap; }
.cm-profile-body > .avatar, .cm-profile-body > .avatar-img { border: 4px solid #fff; box-shadow: var(--shadow); font-size: 32px !important; }
.cm-profile-info { flex: 1; min-width: 220px; padding-top: 52px; }
.cm-profile-info h1 { font-size: 26px; margin-bottom: 4px; }
.cm-profile-info p { margin: 0 0 4px; }
.cm-socials { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.cm-socials .pill { border: 1px solid var(--line); }
.cm-socials .s-instagram { background: var(--pink); color: var(--pink-ink); }
.cm-socials .s-facebook { background: var(--lavender); color: var(--violet-ink); }
.cm-socials .s-tiktok { background: var(--plum); color: #fff; }
.cm-profile-grid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 20px; align-items: start; }
.cm-wall-item { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px 4px; margin-bottom: 12px; }
a.cm-member { color: inherit; }
a.cm-member:hover { text-decoration: none; box-shadow: var(--shadow-lg); }
@media (max-width: 1150px) { .cm-profile-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Biblioteca ---------- */
.cm-count { margin-left: auto; font-size: 12px; color: var(--muted); font-weight: 500; }
.cm-lib-filter { display: flex; gap: 8px; }
.cm-lib-filter .input { height: 40px; border-radius: var(--r-pill); }
.cm-lib-filter select.input { width: auto; }
.cm-library { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.cm-res { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; color: var(--ink); transition: transform .12s, box-shadow .15s; }
.cm-res:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.cm-res-top { position: relative; height: 110px; display: flex; align-items: flex-end; justify-content: space-between; padding: 12px; overflow: hidden; }
.cm-res-top img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cm-res-top > * { position: relative; }
.cm-res-top.k-file { background: var(--lavender); }
.cm-res-top.k-link { background: var(--pink); }
.cm-res-top.k-video { background: var(--plum); }
.cm-res-ico { width: 42px; height: 42px; border-radius: 14px; background: #fff; color: var(--violet-ink); display: grid; place-items: center; box-shadow: 0 4px 12px rgba(var(--shadow-rgb), .12); }
.cm-res-body { padding: 12px 14px 16px; }
.cm-res-cat { display: block; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--violet); margin-bottom: 4px; }
.cm-res-body strong { display: block; font-size: 15px; line-height: 1.35; }
.cm-res-body p { margin: 6px 0 0; font-size: 13px; color: var(--muted); }

/* ---------- Selector de íconos ---------- */
.icon-picker { display: grid; grid-template-columns: repeat(auto-fill, 42px); gap: 6px; }
.icon-picker label { cursor: pointer; }
.icon-picker span { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: #fff; border: 1px solid var(--line); color: var(--text); transition: background .12s, border-color .12s, transform .1s; }
.icon-picker label:hover span { border-color: var(--line-strong); background: var(--lavender-3); }
.icon-picker input:checked + span { background: var(--lavender); border-color: var(--violet); color: var(--violet-ink); box-shadow: 0 0 0 2px rgba(var(--violet-rgb), .2); }
.icon-picker input:focus-visible + span { outline: 2px solid var(--violet); outline-offset: 2px; }
.t-live { background: var(--violet) !important; color: #fff !important; }

/* ---------- Encuentro en vivo ---------- */
.live-card { border-radius: var(--r-lg); padding: 24px 26px; margin-bottom: 28px; background: var(--plum); color: var(--on-dark); }
.live-card.live-ended, .live-card.live-unscheduled { background: var(--lavender); color: var(--ink); }
.live-badge { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; padding: 6px 12px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .14); }
.live-ended .live-badge, .live-unscheduled .live-badge { background: #fff; color: var(--violet-ink); }
.live-badge .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--pink-strong); box-shadow: 0 0 0 0 rgba(245, 179, 211, .7); animation: livepulse 1.6s infinite; }
@keyframes livepulse { 70% { box-shadow: 0 0 0 9px rgba(245, 179, 211, 0); } 100% { box-shadow: 0 0 0 0 rgba(245, 179, 211, 0); } }
.live-date { display: flex; gap: 16px; align-items: center; margin: 18px 0 6px; }
.live-date strong { display: block; font-size: 20px; color: inherit; }
.live-date span { display: block; opacity: .85; }
.live-card .cm-event-date { background: var(--pink); }
.live-sched { margin: 16px 0 6px; font-size: 16px; }
.live-count { margin-top: 10px; font-size: 15px; }
.live-count b { font-size: 18px; color: #fff; }
.live-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 18px; }
.live-disabled { background: rgba(255, 255, 255, .12); border-color: transparent; color: rgba(255, 255, 255, .75); cursor: default; }
.live-disabled:hover { background: rgba(255, 255, 255, .12); }
.live-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }
.live-ghost:hover { background: rgba(255, 255, 255, .1); }
@media (prefers-reduced-motion: reduce) { .live-badge .dot { animation: none; } }
.lb-buylink { display: grid; gap: 8px; padding: 14px; border-radius: var(--r-md); margin-bottom: 14px; }
.lb-buylink label { font-weight: 600; font-size: 13.5px; color: var(--ink); }
.lb-buylink.ok { background: var(--lavender-2); }
.lb-buylink.missing { background: var(--pink); }
.lb-buylink .input { background: #fff; height: 40px; font-size: 13.5px; }
.lb-buylink-row { display: flex; gap: 6px; }
.lb-buylink .hint { margin: 0; }
.lp-btn-off { opacity: .5; cursor: not-allowed; filter: grayscale(.3); }

/* ---- Tarjetas de cifras: nunca se salen del ancho (móvil) ---- */
.stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stats.stats-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat { min-width: 0; }
.stat .label { overflow-wrap: break-word; hyphens: auto; }
.lesson-row .name { min-width: 0; }
.lesson-row .meta { white-space: nowrap; }
@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats.stats-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
}
@media (max-width: 520px) {
  .stat { padding: 14px 12px; }
  .stat .value { font-size: 26px; }
  .stat .label { font-size: 12.5px; line-height: 1.35; }
}
/* Columnas que no deben ensancharse por su contenido (tablas, enlaces largos) */
@media (max-width: 1100px) { .builder, .course-body { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) { .admin-shell { grid-template-columns: minmax(0, 1fr); } }
.admin-main, .page { min-width: 0; }
.input-group { max-width: 100%; }
.input-group .input { min-width: 0; flex: 1; }
.input-group .prefix { max-width: 55%; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 520px) { .toolbar select.input { min-width: 0 !important; flex: 1 1 140px; } .toolbar .search { flex: 1 1 100%; } }
.table-wrap { position: relative; }   /* contiene textos ocultos y menús absolutos dentro del desplazamiento */
@media (max-width: 520px) {
  .form-row { grid-template-columns: minmax(0, 1fr) !important; }
  .editor-bar { flex-wrap: wrap; row-gap: 8px; }
}
@media (max-width: 720px) {
  .lb { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(60vh, 1fr); }
  .lb-top { flex-wrap: wrap; padding: 10px 12px; row-gap: 8px; min-width: 0; }
  .lb-actions { flex-wrap: wrap; }
  .lb-panel, .lb-panel-head { min-width: 0; }
}
.lesson-row span.name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Botón secundario de pago (PayPal) junto al de compra */
.lp-btn.lp-btn-alt { background: #fff; color: var(--violet-ink); border-color: var(--line-strong); }
.lp-btn.lp-btn-alt:hover { background: var(--lavender-3); }


/* ===== Estilos de marca (Ajustes → Marca) ===== */
/* Títulos editoriales: mayúsculas con serifa y conectivos en cursiva */
.t-editorial h1, .t-editorial h2, .t-editorial h3, .t-editorial h4, .t-editorial .lp-title {
  text-transform: uppercase; font-weight: 300; letter-spacing: .005em; line-height: 1.12;
}
.t-editorial h1 em, .t-editorial h2 em, .t-editorial h3 em, .t-editorial h4 em, .t-editorial .lp-title em {
  font-style: italic; text-transform: lowercase; font-weight: 300; letter-spacing: 0;
}
.t-editorial .eyebrow { letter-spacing: .14em; }
/* Esquinas rectas */
.c-square { --r-pill: 2px; --r-xl: 2px; --r-lg: 2px; --r-md: 2px; --r-sm: 2px; }
.c-square .btn, .c-square .pill, .c-square .input, .c-square .card, .c-square .block { border-radius: 2px; }
/* Editorial: en el reproductor, lecciones en la variante gruesa para que se lean bien; tareas del inicio en la fina */
.t-editorial .task { font-weight: 400; }
.t-editorial .player-side .les .meta { color: var(--text); opacity: .7; }
.t-editorial .player-side .les.locked { opacity: .8; }