/* Campus OPTOacademy — navegación flotante en píldora, tipografía display amplia,
   tarjetas grandes y atmósfera en degradado de la marca (azul → turquesa → verde) sobre fondo claro.
   Estados con icono + texto + color (paleta Okabe–Ito, apta para daltónicos). */
:root {
  --ink: #0c1a28; --text: #1b2a38; --muted: #5a6877; --line: #e3e9f0; --line-2: #d3dce6;
  --bg: #f4f7fa; --panel: #ffffff; --soft: #eef3f7;
  --blue: #0a6fae; --blue-2: #1ea6e2; --blue-soft: #e3f2fb; --teal: #12a19b; --mint: #6cc98f;
  --orange: #E69F00; --orange-soft: #fdf3dc; --verm: #D55E00; --verm-soft: #fbe9df;
  --green: #009E73; --green-soft: #e0f3ed; --sky: #56B4E9; --purple: #CC79A7;
  --brand-grad: linear-gradient(100deg, #1ea6e2 0%, #2fbcc4 50%, #6cc98f 100%);
  --mesh: radial-gradient(60% 80% at 8% 10%, rgba(30,166,226,.22), transparent 60%),
          radial-gradient(50% 70% at 92% 20%, rgba(108,201,143,.24), transparent 60%),
          radial-gradient(60% 80% at 60% 110%, rgba(47,188,196,.22), transparent 60%), #fbfdff;
  --radius: 22px; --radius-sm: 14px;
  --shadow: 0 1px 2px rgba(12,26,40,.04), 0 8px 24px rgba(12,26,40,.06);
  --shadow-lg: 0 18px 50px rgba(12,26,40,.12);
  --font-display: "Montserrat", "Segoe UI", system-ui, sans-serif;
  --font-body: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --navy: #1c2b4b; --cta: #3f8f3a; --sky-btn: #0f7fcf;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font-body); background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--blue); }
h1, h2, h3 { font-family: var(--font-display); color: var(--ink); text-wrap: balance; letter-spacing: -.01em; }
h1 { font-size: 28px; font-weight: 700; margin: 0 0 4px; line-height: 1.15; }
h2 { font-size: 19px; font-weight: 600; margin: 0 0 12px; }
h3 { font-size: 16px; font-weight: 600; margin: 0 0 8px; }
.muted { color: var(--muted); } .small { font-size: 13px; } .right { text-align: right; } .nowrap { white-space: nowrap; }
.mono { font-family: var(--font-mono); font-size: 12.5px; }
.num { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 3px solid rgba(30,166,226,.45); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ───────── Botones en píldora ───────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1.5px solid var(--line-2); background: var(--panel); color: var(--ink);
  padding: 9px 18px; border-radius: 999px; cursor: pointer; font: 600 14px/1.2 var(--font-body); text-decoration: none; transition: transform .15s, box-shadow .15s, background .15s; }
.btn:hover { background: var(--soft); }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.primary:hover { background: #26395f; box-shadow: 0 6px 18px rgba(12,26,40,.2); transform: translateY(-1px); }
.btn.accent { background: var(--sky-btn); border-color: var(--sky-btn); color: #fff; }
.btn.cta { background: var(--cta); border-color: var(--cta); color: #fff; text-transform: uppercase; letter-spacing: .08em; font: 700 13px/1.2 var(--font-display); border-radius: 12px; padding: 12px 18px; }
.btn.cta:hover { background: #357a31; }
.btn.danger { color: var(--verm); border-color: #f0c7b0; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { padding: 5px 12px; font-size: 13px; }
.btn.big { padding: 13px 26px; font-size: 16px; }
.btn:disabled { opacity: .5; cursor: default; transform: none; box-shadow: none; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

/* ───────── Panel de administración ───────── */
.layout { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--panel); border-right: 1px solid var(--line); padding: 18px 14px; position: sticky; top: 0; height: 100vh; overflow: auto; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; padding: 4px 8px 16px; }
.brand-logo { height: 40px; width: auto; display: block; }
.sidebar .brand-logo { height: 44px; }
.nav-title { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 16px 12px 6px; font-weight: 600; }
.nav a { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 999px; color: var(--text); text-decoration: none; font-weight: 500; }
.nav a:hover { background: var(--soft); }
.nav a.active { background: var(--navy); color: #fff; }
.nav .ico { width: 20px; text-align: center; }
.main { padding: 26px 32px 70px; min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 22px; flex-wrap: wrap; }
.topbar h1 { font-size: 32px; }
.btn.menu-toggle { display: none; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 18px; min-width: 0; }
.card.narrow { max-width: 520px; margin: 60px auto; }
.grid { display: grid; gap: 18px; }
.g4 { grid-template-columns: repeat(4, minmax(0,1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0,1fr)); } .g2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.kpi { display: flex; gap: 14px; align-items: center; }
.kpi .ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 20px; flex: none; }
.kpi .v { font: 600 26px/1.1 var(--font-display); color: var(--ink); font-variant-numeric: tabular-nums; }
.kpi .l { color: var(--muted); font-size: 13px; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; background: #f8fafc; }
thead th:first-child { border-top-left-radius: 12px; } thead th:last-child { border-top-right-radius: 12px; }
td { font-variant-numeric: tabular-nums; }
tr.click { cursor: pointer; } tr.click:hover td { background: #f7fbfe; }
.table-link, .table-link-button { display: block; width: 100%; color: inherit; text-align: left; text-decoration: none; border-radius: 8px; }
.table-link:hover, .table-link-button:hover { color: var(--blue); text-decoration: underline; }
.table-link b, .table-link span, .table-link-button b, .table-link-button span { display: block; }
.table-link-button { appearance: none; border: 0; padding: 0; background: transparent; font: inherit; cursor: pointer; }
.table-wrap { overflow-x: auto; }

.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 99px; border: 1px solid transparent; white-space: nowrap; }
.b-ok { background: var(--green-soft); color: #00684c; border-color: #a9dccb; }
.b-warn { background: var(--orange-soft); color: #8a5d00; border-color: #f1d18b; }
.b-bad { background: var(--verm-soft); color: #a34700; border-color: #f0c2a3; }
.b-info { background: var(--blue-soft); color: #075a8c; border-color: #b3d6ec; }
.b-neutral { background: #eef1f4; color: #47515e; border-color: #dde2e8; }
.b-live { background: #fff0e6; color: #a34700; border-color: #f3c3a0; }
.b-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--verm); animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .3; } }

input, select, textarea { font: inherit; padding: 10px 13px; border: 1.5px solid var(--line-2); border-radius: 12px; background: #fff; color: var(--text); width: 100%; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue-2); box-shadow: 0 0 0 4px rgba(30,166,226,.15); }
textarea { min-height: 96px; }
label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin: 12px 0 5px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 500; color: var(--text); }
.check input { width: auto; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.form-error { margin: 4px 0 0; padding: 10px 12px; border: 1px solid #f0c2a3; border-radius: 12px; background: var(--verm-soft); color: #8c3d00; font-size: 13px; font-weight: 600; }
.private-course-preview { display: grid; gap: 12px; }
.private-course-preview h3, .private-course-preview p { margin: 0; }
.private-course-preview section { padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: #fbfcfe; }
.private-course-preview ol { margin: 8px 0 0; padding-left: 22px; }

.progress { height: 8px; background: #e6edf3; border-radius: 99px; overflow: hidden; min-width: 80px; }
.progress > i { display: block; height: 100%; background: var(--brand-grad); border-radius: 99px; }

.tabs { display: inline-flex; gap: 4px; background: var(--soft); padding: 4px; border-radius: 999px; margin-bottom: 18px; flex-wrap: wrap; }
.tabs a { padding: 7px 16px; text-decoration: none; color: var(--muted); border-radius: 999px; cursor: pointer; font-weight: 600; }
.tabs a.active { color: var(--ink); background: #fff; box-shadow: var(--shadow); }

.kanban { display: grid; grid-template-columns: repeat(5, minmax(210px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 6px; }
.col { background: #eaf0f5; border-radius: var(--radius); padding: 12px; min-height: 220px; }
.col h3 { display: flex; justify-content: space-between; font-size: 13px; align-items: center; }
.col.drop { outline: 2px dashed var(--blue); }
.lead { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 9px; cursor: grab; box-shadow: var(--shadow); }
.lead b { display: block; }

.modal-bg { position: fixed; inset: 0; background: rgba(12,26,40,.42); backdrop-filter: blur(3px); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: #fff; border-radius: 24px; width: min(680px, 100%); max-height: 90vh; overflow: auto; padding: 24px; box-shadow: var(--shadow-lg); }
.modal.wide { width: min(1000px, 100%); }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; gap: 10px; }
.modal-head h2 { margin: 0; font-size: 22px; }
.x { background: var(--soft); border: none; width: 36px; height: 36px; border-radius: 50%; font-size: 20px; cursor: pointer; color: var(--muted); flex: none; }

.toast { position: fixed; bottom: 22px; right: 22px; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 999px; z-index: 99; box-shadow: var(--shadow-lg); font-weight: 500; }
.toast.err { background: var(--verm); }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: 8px 0 8px 16px; border-left: 2px solid var(--line); position: relative; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 14px; width: 10px; height: 10px; border-radius: 50%; background: var(--blue-2); }
.secret { background: #fff8e6; border: 1px dashed var(--orange); padding: 12px; border-radius: 12px; word-break: break-all; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 7px 18px; margin: 14px 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.module-box { border: 1px solid var(--line); border-radius: 18px; margin-bottom: 14px; background: #fff; overflow: hidden; }
.module-box > header { display: flex; gap: 8px; align-items: center; padding: 12px 16px; background: #f8fafc; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.lesson-row { display: flex; gap: 10px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.lesson-row:last-child { border-bottom: none; }
.chips { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.chip { font-size: 11.5px; padding: 2px 8px; border-radius: 99px; background: var(--soft); color: var(--muted); font-weight: 600; white-space: nowrap; }
.empty { text-align: center; color: var(--muted); padding: 34px; }
.demo-pay { display: block; padding: 16px; }

/* ───────── Web del alumno ───────── */
.site-header { position: sticky; top: 0; z-index: 20; padding-block: 12px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.site-header .in { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; gap: 18px; background: rgba(255,255,255,.92); backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 10px 8px 22px; box-shadow: var(--shadow); }
.site-header .brand { padding: 0; }
.site-header .brand-logo { height: 34px; }
.site-header nav { display: flex; gap: 4px; flex-wrap: wrap; }
.site-header nav a { text-decoration: none; color: var(--text); padding: 8px 14px; border-radius: 999px; font-weight: 500; }
.site-header nav a:hover { background: var(--soft); }
.site-header nav a.active { background: var(--soft); color: var(--ink); font-weight: 700; }
.wrap { max-width: 1200px; margin: 0 auto; padding-block: 18px 70px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.page-title { font-size: clamp(30px, 5vw, 44px); font-weight: 500; margin: 10px 0 6px; }

.hero { background: var(--mesh); border: 1px solid var(--line); border-radius: 32px; padding: clamp(24px, 5vw, 56px); margin-bottom: 34px; position: relative; overflow: hidden; }
.hero-brand { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 36px; align-items: center; }
.hero-text { display: grid; gap: 16px; }
.hero h1 { font-size: clamp(32px, 5vw, 56px); font-weight: 800; text-transform: uppercase; line-height: 1.04; letter-spacing: -.025em; margin: 0; }
.hero h1 em { font-style: normal; background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { font-size: 17px; margin: 0; max-width: 54ch; }
.eyebrow { font: 600 12.5px/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--teal); }
.hero-promo { display: block; border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-lg); max-width: 100%; transform: rotate(1.2deg); transition: transform .3s; }
.hero-promo:hover { transform: rotate(0deg) scale(1.01); }
.hero-promo img { display: block; width: 100%; height: auto; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, max-content)); gap: clamp(18px, 4vw, 40px); margin-top: 10px; }
.stat b { display: block; font: 800 clamp(22px, 2.6vw, 30px)/1.1 var(--font-display); color: var(--ink); }
.stat span { font-size: 13px; color: var(--muted); }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 8px 0 18px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(24px, 3.4vw, 34px); font-weight: 500; margin: 0; }
.courses { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 22px; }
.course-card { --c: var(--navy); background: var(--c); color: #fff; border-radius: 30px; overflow: hidden; box-shadow: var(--shadow-lg); display: grid; grid-template-columns: minmax(0, 1fr); transition: transform .2s; }
.course-card:hover { transform: translateY(-4px); }
.course-card .cover { aspect-ratio: 2.15; display: grid; place-items: center; color: #fff; font-size: 36px; background-size: cover !important; background-position: center !important; max-width: 100%; }
.course-card .body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; }
.course-card .tag { align-self: flex-start; font: 700 10.5px/1 var(--font-display); letter-spacing: .1em; text-transform: uppercase; background: rgba(255,255,255,.14); padding: 6px 10px; border-radius: 99px; }
.course-card .tag::before { content: "● "; color: var(--mint); }
.course-card h3 { font: 800 22px/1.12 var(--font-display); text-transform: uppercase; color: #fff; margin: 0; letter-spacing: -.005em; }
.course-card .sub { color: rgba(255,255,255,.78); font-size: 14px; margin: 0; }
.facts { display: grid; gap: 6px; margin: 4px 0 6px; }
.facts div { display: flex; justify-content: space-between; gap: 10px; background: rgba(255,255,255,.1); border-radius: 10px; padding: 8px 12px; font-size: 13px; }
.facts dt { font: 700 10.5px/1.6 var(--font-display); letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.75); }
.facts dd { margin: 0; font-weight: 600; text-align: right; }
.facts .hl { color: #ffd166; text-transform: uppercase; font: 700 12px/1.6 var(--font-display); }
.course-card .price { color: #fff; }
.course-card .foot { display: flex; align-items: center; gap: 12px; margin-top: auto; flex-wrap: wrap; }
.course-card .foot .btn.cta { flex: 1; }
.divider { display: flex; align-items: center; gap: 18px; margin: 40px 0 26px; color: var(--muted); font-size: 18px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.divider img { height: 40px; width: auto; }
.section-title { font: 300 clamp(30px, 5vw, 52px)/1.1 var(--font-body); color: #7c8794; text-align: center; margin: 0 0 6px; letter-spacing: -.02em; }
.section-sub { text-align: center; color: var(--muted); margin: 0 0 26px; }
.price { font: 800 24px/1 var(--font-display); color: var(--ink); font-variant-numeric: tabular-nums; }

/* Portada del curso (alumno) */
.course-hero { --c: var(--navy); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); background: var(--c); color: #fff; border-radius: 30px; overflow: hidden; margin-bottom: 26px; box-shadow: var(--shadow-lg); }
.ch-cover { min-height: 280px; background-size: cover !important; }
.ch-body { padding: clamp(22px, 4vw, 40px); display: grid; gap: 10px; align-content: center; }
.ch-body h1 { color: #fff; font: 800 clamp(24px, 3.4vw, 36px)/1.1 var(--font-display); text-transform: uppercase; margin: 0; }
.ch-body p { margin: 0; color: rgba(255,255,255,.8); }
.ch-body .tag { align-self: start; justify-self: start; font: 700 10.5px/1 var(--font-display); letter-spacing: .1em; text-transform: uppercase; background: rgba(255,255,255,.14); padding: 6px 10px; border-radius: 99px; }
.ch-body .ring > span { color: var(--ink); }
.mod { background: #fff; border: 1px solid var(--line); border-radius: 20px; margin-bottom: 12px; box-shadow: var(--shadow); overflow: hidden; }
.mod summary { display: flex; align-items: center; gap: 12px; padding: 16px 18px; cursor: pointer; list-style: none; }
.mod summary::-webkit-details-marker { display: none; }
.mod[open] summary { border-bottom: 1px solid var(--line); }
.mod-n { width: 34px; height: 34px; border-radius: 50%; background: var(--soft); display: grid; place-items: center; font: 700 14px var(--font-display); color: var(--ink); flex: none; }
.mod-lesson { display: flex; align-items: center; gap: 12px; padding: 12px 18px; text-decoration: none; color: var(--text); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.mod-lesson:last-child { border-bottom: 0; }
.mod-lesson:hover { background: #f7fbfe; }
.mod-lesson.next { background: var(--blue-soft); font-weight: 600; }
.lesson-row.quick { background: #fbfcfe; }

/* Aula */
.player { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.player aside { position: sticky; top: 92px; display: grid; gap: 16px; }
.lesson-head { background: var(--mesh); border: 1px solid var(--line); border-radius: 26px; padding: 26px; margin-bottom: 18px; }
.lesson-head h1 { font-size: clamp(26px, 3.6vw, 38px); font-weight: 500; }
.block { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 18px; overflow: hidden; }
.block > header { display: flex; gap: 10px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.block > header h3 { margin: 0; }
.block .content { padding: 18px; min-width: 0; overflow-wrap: anywhere; }
.block .content img { border-radius: 12px; }
.kind-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--soft); flex: none; }
.video { aspect-ratio: 16/9; background: #0b1622; overflow: hidden; max-width: 100%; }
.video iframe, .video video { width: 100%; height: 100%; border: 0; display: block; }
.video-ph { display: grid; place-items: center; text-align: center; color: #dbe8f3; background: radial-gradient(80% 90% at 20% 10%, #0f4c73, #0b1622); }
.video-ph > div { max-width: 440px; padding: 16px; }
.video-ph .play { width: 66px; height: 66px; border-radius: 50%; background: rgba(255,255,255,.14); display: grid; place-items: center; font-size: 26px; margin: 0 auto 10px; }
.live { position: relative; padding: 22px; background: linear-gradient(#fff, #fff) padding-box, var(--brand-grad) border-box; border: 2px solid transparent; border-radius: var(--radius); }
.live .when { font: 500 clamp(22px, 3vw, 30px)/1.1 var(--font-display); color: var(--ink); }
.countdown { display: flex; gap: 10px; margin: 14px 0; flex-wrap: wrap; }
.countdown div { background: var(--soft); border-radius: 14px; padding: 10px 14px; min-width: 70px; text-align: center; }
.countdown b { display: block; font: 600 24px/1 var(--font-display); color: var(--ink); font-variant-numeric: tabular-nums; }
.countdown span { font-size: 12px; color: var(--muted); }
.web-frame { width: 100%; min-height: 560px; border: 0; display: block; background: #fff; }
.file-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.file-ico { width: 52px; height: 60px; border-radius: 10px; background: var(--verm-soft); color: #a34700; display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: none; }
.syllabus .lesson-link { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 12px; cursor: pointer; text-decoration: none; color: var(--text); }
.syllabus .lesson-link:hover { background: var(--soft); }
.syllabus .lesson-link.current { background: var(--blue-soft); font-weight: 600; }
.done-mark { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #b8c3cf; display: grid; place-items: center; font-size: 11px; flex: none; }
.done-mark.on { background: var(--green); border-color: var(--green); color: #fff; }
.ring { --p: 0; width: 84px; height: 84px; border-radius: 50%; background: conic-gradient(var(--teal) calc(var(--p) * 1%), #e6edf3 0); display: grid; place-items: center; flex: none; }
.ring > span { width: 66px; height: 66px; border-radius: 50%; background: #fff; display: grid; place-items: center; font: 600 18px var(--font-display); color: var(--ink); }

.pay-methods { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 14px 0; }
.pay-methods label { border: 2px solid var(--line); border-radius: 16px; padding: 14px; cursor: pointer; display: flex; gap: 10px; align-items: center; color: var(--text); margin: 0; font-size: 14px; }
.pay-methods label:has(input:checked) { border-color: var(--ink); background: #f8fafc; }
.pay-methods input { width: auto; }

/* Calendario */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal .dow { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); text-align: center; padding: 4px 0; font-weight: 600; }
.cal .day { background: #fff; border: 1px solid var(--line); border-radius: 14px; min-height: 96px; padding: 6px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cal .day.out { background: #f7f9fb; color: #a3adb8; }
.cal .day.today { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.cal .d { font: 600 13px var(--font-display); }
.ev { font-size: 11.5px; border-radius: 8px; padding: 3px 6px; background: var(--blue-soft); color: #075a8c; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; border-left: 3px solid var(--blue); }
.ev.meet { background: var(--green-soft); color: #00684c; border-left-color: var(--green); }
.ev.past { opacity: .6; }
.session-list { display: grid; gap: 12px; }
.session { display: grid; grid-template-columns: 78px minmax(0, 1fr) auto; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 14px; }
.session .date { text-align: center; background: var(--soft); border-radius: 14px; padding: 8px 4px; }
.session .date b { display: block; font: 600 24px/1 var(--font-display); color: var(--ink); }
.session .date span { font-size: 12px; text-transform: uppercase; color: var(--muted); letter-spacing: .06em; }
.prov { font-weight: 700; font-size: 12px; }

/* Notificaciones */
.bell { position: relative; }
.bell .dot { position: absolute; top: -3px; right: -3px; background: var(--verm); color: #fff; border-radius: 99px; font-size: 11px; padding: 0 6px; font-weight: 700; line-height: 18px; }
.notif-panel { position: absolute; right: 0; top: calc(100% + 10px); width: min(380px, 92vw); background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 10px; z-index: 30; max-height: 70vh; overflow: auto; }
.notif { display: block; padding: 10px 12px; border-radius: 14px; text-decoration: none; color: var(--text); }
.notif:hover { background: var(--soft); }
.notif.unread { background: var(--blue-soft); }
.notif b { display: block; color: var(--ink); }

/* Editor de bloques (panel) */
.res-list { display: grid; gap: 10px; margin: 12px 0; }
.res { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px; background: #fff; }
.res .meta { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.add-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.add-grid button { display: flex; gap: 10px; align-items: center; text-align: left; border: 1.5px dashed var(--line-2); background: #fbfcfe; border-radius: 14px; padding: 10px 12px; cursor: pointer; font: inherit; color: var(--text); }
.add-grid button:hover { border-color: var(--blue-2); background: var(--blue-soft); }
.add-grid small { display: block; color: var(--muted); }
.drop-zone { border: 2px dashed var(--line-2); border-radius: 16px; padding: 22px; text-align: center; color: var(--muted); cursor: pointer; }
.drop-zone.over { border-color: var(--blue-2); background: var(--blue-soft); }

@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 40; width: 270px; left: -280px; transition: left .2s; }
  .sidebar.open { left: 0; box-shadow: var(--shadow-lg); }
  .btn.menu-toggle { display: inline-flex; }
  .main { padding: 18px 16px 60px; }
  .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); } .g3, .g2, .form-grid { grid-template-columns: 1fr; }
  .player { grid-template-columns: 1fr; } .player aside { position: static; }
  .pay-methods, .add-grid { grid-template-columns: 1fr; }
  .hero-brand { grid-template-columns: 1fr; }
  .course-hero { grid-template-columns: 1fr; } .ch-cover { min-height: 160px; }
  .hero-promo { transform: none; }
  .stats { grid-template-columns: 1fr 1fr; }
  .site-header .in { border-radius: 24px; flex-wrap: wrap; padding: 8px 12px; gap: 8px; }
  .cal .day { min-height: 64px; } .ev { font-size: 0; padding: 0; height: 6px; }
  .session { grid-template-columns: 64px minmax(0, 1fr); } .session > :last-child { grid-column: 1 / -1; }
}

.course-card .progress { background: rgba(255,255,255,.22); }
.ch-cover { background-color: #eef4f8 !important; }

/* ───── Landing de acceso ───── */
body.is-landing .wrap { max-width: none; padding: 0; margin: 0; }
body.is-landing .wrap > .card.narrow { margin: 48px auto; }
.landing { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); background: var(--mesh); }
.landing-art { display: flex; flex-direction: column; gap: 28px; padding: clamp(28px, 5vw, 64px); position: relative; }
.landing-art .brand-logo { height: 46px; align-self: flex-start; }
.landing-copy { margin: auto 0; max-width: 560px; }
.landing-copy h1 { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: clamp(30px, 4.2vw, 52px); line-height: 1.04; letter-spacing: -.02em; margin: 10px 0 16px; }
.landing-copy h1 em { font-style: normal; background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.landing-copy > p { font-size: 16px; max-width: 480px; }
.landing-points { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; }
.landing-points li { display: flex; gap: 12px; align-items: center; font-weight: 500; color: var(--ink); }
.landing-points li span { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #fff; box-shadow: var(--shadow); color: var(--blue); font-size: 12px; flex: none; }
.landing-foot { margin: 0; }
.landing-form { display: grid; place-items: center; padding: clamp(20px, 4vw, 56px); background: rgba(255,255,255,.55); backdrop-filter: blur(6px); border-left: 1px solid var(--line); }
.login-card { width: 100%; max-width: 420px; padding: 32px; box-shadow: var(--shadow-lg); border-radius: var(--radius); }
.login-card h2 { font-size: 24px; font-weight: 800; margin-bottom: 6px; }
.login-card .pw { display: flex; gap: 6px; align-items: center; }
.login-card .pw input { flex: 1; }
.login-roles { display: grid; gap: 6px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.demo-logins { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 14px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--orange-soft); }
@media (max-width: 860px) {
  .landing { grid-template-columns: 1fr; }
  .landing-art { gap: 18px; padding-bottom: 8px; }
  .landing-copy h1 { font-size: 30px; }
  .landing-points, .landing-foot { display: none; }
  .landing-form { border-left: 0; background: transparent; padding-top: 8px; align-items: start; }
  .login-card { padding: 24px 20px; }
}

/* Liberación programada */
.rel { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rel select { width: auto; min-width: 0; }
.rel input[type=datetime-local] { width: auto; }
.rel-days { display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.rel-days input { width: 84px; }
.rel-chip { white-space: nowrap; }
.rel-table td { vertical-align: middle; }
.rel-table tr.mod td { background: var(--soft); }
.rel-table tr.les td:first-child { padding-left: 30px; }
.rel-table .when { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.rel-auto { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.rel-auto > div { display: grid; gap: 4px; }
.rel-auto input, .rel-auto select { width: auto; }
.lesson-row.locked { opacity: .62; }
.lesson-row.locked .lock { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.lock-card { text-align: center; padding: 48px 24px; }
.lock-card .big { font-size: 44px; line-height: 1; margin-bottom: 8px; }
.mod-lesson.locked { cursor: default; opacity: .6; }
.lesson-link.locked { opacity: .55; }
[hidden] { display: none !important; }
.rel-auto .rel-days input, .rel .rel-days input { width: 84px; }
.rel-auto input, .rel-auto select { max-width: 100%; }
@media (max-width: 640px) { .rel-table .rel select { max-width: 100%; } .rel-table td { padding-inline: 8px; } }
.rel-auto > div { min-width: 0; max-width: 100%; } .rel-auto select { width: 100%; }

/* Avisos automáticos */
.auto-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin-top: 14px; }
.auto-grid .full { grid-column: 1 / -1; flex-wrap: wrap; }
.auto-col { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.auto-col h3 { margin: 0 0 4px; }
.hour-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.hchip input { position: absolute; opacity: 0; pointer-events: none; }
.hchip span { display: inline-block; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-2); font-weight: 600; font-size: 13px; cursor: pointer; background: #fff; }
.hchip input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.hchip input:checked + span::before { content: "✓ "; }
.hchip input:focus-visible + span { outline: 3px solid rgba(30,166,226,.45); }
.mini-row { display: grid; padding: 8px 0; border-bottom: 1px solid var(--line); }
.mail-preview { width: 100%; height: 520px; border: 1px solid var(--line); border-radius: 12px; background: #f4f7fa; }
.wa-bubble { background: #e7f6dd; border-radius: 12px 12px 12px 2px; padding: 10px 14px; max-width: 460px; font-size: 14px; line-height: 1.45; color: #10301a; }
@media (max-width: 900px) { .auto-grid { grid-template-columns: 1fr; } }
