/* Inteficial Academia — estilo basado en inteficial.com */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('/fonts/plus-jakarta-sans-latin-wght-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('/fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #04080a;
  --bg-2: #070d11;
  --card: #0b141a;
  --card-2: #0f1b22;
  --line: rgba(68, 197, 251, 0.14);
  --line-strong: rgba(68, 197, 251, 0.32);
  --text: #c2cfce;
  --muted: #7d8f94;
  --white: #ffffff;
  --blue: #008fe4;
  --blue-2: #0078d4;
  --cyan: #44c5fb;
  --ok: #2fd39a;
  --warn: #f5b84a;
  --bad: #ff6b6b;
  --radius: 18px;
  --display: -apple-system, system-ui, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --body: 'Plus Jakarta Sans', Inter, -apple-system, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--body);
  font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(1px 1px at 10% 20%, rgba(68,197,251,.35) 50%, transparent 51%),
    radial-gradient(1px 1px at 80% 12%, rgba(68,197,251,.25) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 30% 70%, rgba(68,197,251,.25) 50%, transparent 51%),
    radial-gradient(1px 1px at 65% 55%, rgba(68,197,251,.3) 50%, transparent 51%),
    radial-gradient(1px 1px at 92% 82%, rgba(68,197,251,.25) 50%, transparent 51%);
  background-size: 900px 700px; background-attachment: fixed;
}
a { color: var(--cyan); text-decoration: none; }
a:hover { color: var(--white); }
h1, h2, h3, h4 { font-family: var(--display); color: var(--white); font-weight: 500; line-height: 1.1; margin: 0 0 .5em; }
h1 { font-size: clamp(40px, 6vw, 74px); letter-spacing: -0.04em; }
h2 { font-size: clamp(32px, 4.4vw, 56px); letter-spacing: -0.035em; }
h3 { font-size: 22px; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }
.grad { background: linear-gradient(135deg, #fff 0%, #fff 25%, var(--blue) 70%, var(--blue-2) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.grad-blue { background: linear-gradient(135deg, var(--cyan), var(--blue-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.wrap { width: min(1180px, 100% - 40px); margin: 0 auto; }
.narrow { width: min(760px, 100% - 40px); margin: 0 auto; }

/* Logo: intefic + IA (azul) + l */
.logo { font-family: var(--display); font-weight: 800; font-size: 26px; letter-spacing: -0.04em; color: var(--white); white-space: nowrap; }
.logo b { background: linear-gradient(135deg, var(--cyan), var(--blue-2)); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 800; }
.logo small { font-family: var(--body); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-left: 10px; vertical-align: middle; }

/* Cabecera */
.top { position: sticky; top: 0; z-index: 20; background: rgba(4,8,10,.82); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(255,255,255,.06); }
.top .wrap { display: flex; align-items: center; gap: 28px; height: 76px; }
.top nav { display: flex; gap: 26px; margin-left: auto; align-items: center; }
.top nav a { color: var(--text); font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.top nav a:hover, .top nav a.on { color: var(--white); }
.pill-live { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-strong); border-radius: 999px; padding: 4px 12px; font-size: 11px; font-weight: 700; letter-spacing: .1em; color: var(--text); text-transform: uppercase; }
.pill-live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #ff6a3d; box-shadow: 0 0 8px #ff6a3d; }

/* Botones (píldora, mayúsculas) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border-radius: 999px; padding: 15px 28px; font-family: var(--display); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; border: 1px solid var(--line-strong); background: rgba(11,20,26,.8); color: var(--white); transition: .2s; text-decoration: none; }
.btn:hover { border-color: var(--cyan); color: var(--white); box-shadow: 0 0 24px rgba(0,143,228,.25); }
.btn-primary { background: linear-gradient(135deg, var(--blue), var(--blue-2)); border-color: transparent; box-shadow: 0 8px 30px rgba(0,120,212,.35); }
.btn-primary:hover { box-shadow: 0 10px 40px rgba(0,143,228,.55); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 9px 16px; font-size: 11px; }
.btn-danger { border-color: rgba(255,107,107,.4); color: var(--bad); background: transparent; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.arrow::after { content: '↗'; font-size: 14px; }

/* Hero */
.hero { padding: 96px 0 70px; text-align: center; position: relative; }
.hero::before { content: ''; position: absolute; inset: -40px 0 auto; height: 520px; background: radial-gradient(ellipse at 50% 30%, rgba(0,120,212,.22), transparent 60%); pointer-events: none; }
.hero > * { position: relative; }
.tag { display: inline-flex; gap: 10px; align-items: center; border: 1px solid var(--line-strong); border-radius: 999px; padding: 6px 14px; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--text); background: rgba(11,20,26,.6); margin-bottom: 28px; }
.tag i { font-style: normal; color: var(--cyan); }
.hero p.lead { max-width: 720px; margin: 22px auto 34px; font-size: 18px; color: var(--text); }
.hero .ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.badges { display: flex; gap: 26px; justify-content: center; flex-wrap: wrap; margin-top: 30px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.badges span::before { content: '◇ '; color: var(--cyan); }

/* Secciones */
section.block { padding: 90px 0; border-top: 1px solid rgba(255,255,255,.04); }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--cyan); margin-bottom: 14px; display: block; }
.section-head { max-width: 760px; margin: 0 auto 50px; text-align: center; }
.section-head p { color: var(--text); font-size: 17px; }

.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .g3, .g4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } .top nav .hide-m { display: none; } .top nav { gap: 14px; } }

.card { background: linear-gradient(180deg, var(--card-2), var(--card)); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; position: relative; }
.card:hover { border-color: var(--line-strong); }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--text); font-size: 15px; margin: 0; }
.icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(0,143,228,.12); border: 1px solid var(--line-strong); color: var(--cyan); font-size: 20px; margin-bottom: 18px; }

.steps { counter-reset: s; }
.steps .card::before { counter-increment: s; content: '0' counter(s); font-family: var(--display); font-size: 44px; font-weight: 600; letter-spacing: -0.04em; display: block; margin-bottom: 10px; background: linear-gradient(135deg, var(--cyan), var(--blue-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Temario */
.syllabus { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (max-width: 760px) { .syllabus { grid-template-columns: 1fr; } }
.syllabus div { display: flex; gap: 16px; align-items: center; padding: 18px 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.syllabus b { font-family: var(--display); color: var(--cyan); font-size: 14px; min-width: 28px; }
.syllabus span { color: var(--white); font-weight: 600; }
.syllabus em { margin-left: auto; font-style: normal; color: var(--muted); font-size: 13px; white-space: nowrap; }

/* Oferta: lo que incluye */
.stack { border: 1px solid var(--line-strong); border-radius: 22px; overflow: hidden; background: var(--card); }
.stack .row { display: flex; gap: 18px; padding: 20px 26px; border-bottom: 1px solid var(--line); align-items: flex-start; }
.stack .row:last-child { border-bottom: 0; }
.stack .check { color: var(--ok); font-weight: 800; }
.stack .row h4 { font-size: 17px; margin: 0 0 4px; }
.stack .row p { margin: 0; font-size: 14px; }
.stack .val { margin-left: auto; color: var(--muted); white-space: nowrap; font-weight: 600; }
.stack .total { background: rgba(0,143,228,.08); color: var(--white); font-weight: 700; }

/* Precios */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 22px; max-width: 1120px; margin: 0 auto; }
.plan { padding: 34px; display: flex; flex-direction: column; }
.plan.hl { border-color: var(--cyan); box-shadow: 0 0 60px rgba(0,143,228,.18); }
.plan .ribbon { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: linear-gradient(135deg, var(--blue), var(--blue-2)); color: #fff; padding: 4px 14px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
.price { font-family: var(--display); font-size: 52px; color: var(--white); font-weight: 600; letter-spacing: -0.04em; line-height: 1; margin: 18px 0 6px; }
.price small { font-size: 16px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.price s { font-size: 22px; color: var(--muted); margin-right: 10px; }
.plan ul { list-style: none; padding: 0; margin: 20px 0 28px; flex: 1; }
.plan li { padding: 7px 0 7px 26px; position: relative; font-size: 15px; }
.plan li::before { content: '✓'; position: absolute; left: 0; color: var(--cyan); font-weight: 800; }
.seats { color: var(--warn); font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }

/* FAQ */
details { border: 1px solid var(--line); border-radius: 14px; background: var(--card); padding: 0 22px; margin-bottom: 12px; }
details summary { cursor: pointer; padding: 20px 0; color: var(--white); font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 20px; }
details summary::after { content: '+'; color: var(--cyan); font-size: 22px; line-height: 1; }
details[open] summary::after { content: '–'; }
details p { padding-bottom: 18px; margin: 0; }

/* Pie */
footer.foot { border-top: 1px solid rgba(255,255,255,.06); padding: 40px 0; margin-top: 40px; font-size: 14px; color: var(--muted); }
footer.foot .wrap { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
footer.foot nav { display: flex; gap: 18px; flex-wrap: wrap; }
footer.foot a { color: var(--muted); }
footer.foot a:hover { color: var(--white); }

/* Formularios */
.auth { min-height: calc(100vh - 220px); display: grid; place-items: center; padding: 60px 0; }
.auth .card { width: min(460px, 100% - 40px); padding: 38px; }
.auth h1 { font-size: 34px; letter-spacing: -0.03em; }
label { display: block; font-size: 13px; font-weight: 600; color: var(--white); margin: 16px 0 7px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=url], input[type=tel], select, textarea {
  width: 100%; background: var(--bg-2); color: var(--white); border: 1px solid var(--line-strong); border-radius: 12px;
  padding: 13px 15px; font: inherit; font-size: 15px; outline: none; transition: .15s;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(68,197,251,.12); }
.check-row { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; margin: 16px 0; font-weight: 400; color: var(--text); }
.check-row input { margin-top: 4px; accent-color: var(--blue); }
.alert { border-radius: 12px; padding: 13px 16px; font-size: 14px; margin: 14px 0; border: 1px solid; }
.alert-bad { background: rgba(255,107,107,.08); border-color: rgba(255,107,107,.35); color: #ffb4b4; }
.alert-ok { background: rgba(47,211,154,.08); border-color: rgba(47,211,154,.35); color: #9cf0cf; }
.alert-warn { background: rgba(245,184,74,.08); border-color: rgba(245,184,74,.35); color: #f8d69a; }
.form-foot { margin-top: 22px; font-size: 14px; text-align: center; color: var(--muted); }
.row-flex { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.demo-banner { background: rgba(245,184,74,.12); border-bottom: 1px solid rgba(245,184,74,.3); color: #f8d69a; text-align: center; font-size: 13px; padding: 7px 12px; }

/* Aula */
.aula-top { display: flex; justify-content: space-between; gap: 20px; align-items: flex-end; flex-wrap: wrap; margin: 46px 0 28px; }
.aula-top h1 { font-size: 40px; margin: 0; }
.progress { height: 8px; background: rgba(255,255,255,.06); border-radius: 99px; overflow: hidden; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--blue-2)); border-radius: 99px; }
.status-pill { display: inline-flex; gap: 6px; align-items: center; border-radius: 999px; padding: 3px 11px; font-size: 12px; font-weight: 700; border: 1px solid var(--line-strong); }
.st-active, .st-completed { color: var(--ok); border-color: rgba(47,211,154,.35); }
.st-suspended, .st-past_due, .st-pending { color: var(--warn); border-color: rgba(245,184,74,.35); }
.st-revoked, .st-canceled, .st-refunded { color: var(--bad); border-color: rgba(255,107,107,.35); }
.panel-card { display: flex; gap: 22px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: radial-gradient(circle at 0% 0%, rgba(0,143,228,.25), transparent 60%), var(--card); }

.lesson-layout { display: grid; grid-template-columns: 1fr 340px; gap: 28px; margin: 30px 0 60px; align-items: start; }
@media (max-width: 980px) { .lesson-layout { grid-template-columns: 1fr; } }
.video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video.empty { display: grid; place-items: center; color: var(--muted); background: radial-gradient(circle, rgba(0,120,212,.15), transparent 70%), var(--card); }
.prose { color: var(--text); }
.prose h1, .prose h2, .prose h3 { font-size: 24px; margin-top: 1.4em; }
.prose code { background: var(--bg-2); padding: 2px 6px; border-radius: 6px; }
.prose em { color: var(--muted); }
.toc { position: sticky; top: 96px; max-height: calc(100vh - 120px); overflow: auto; padding: 18px; }
.toc h4 { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 18px 0 8px; }
.toc h4:first-child { margin-top: 0; }
.toc a { display: flex; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--text); font-size: 14px; line-height: 1.35; }
.toc a:hover { background: rgba(255,255,255,.04); color: var(--white); }
.toc a.on { background: rgba(0,143,228,.14); color: var(--white); }
.toc a .dot { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--line-strong); flex: none; margin-top: 1px; display: grid; place-items: center; font-size: 10px; }
.toc a .dot.done { background: var(--ok); border-color: var(--ok); color: #03130d; }
.lesson-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.module-list .lesson-row { display: flex; gap: 14px; align-items: center; padding: 14px 4px; border-top: 1px solid var(--line); color: var(--text); }
.module-list .lesson-row:hover { color: var(--white); }
.module-list .lesson-row em { margin-left: auto; font-style: normal; font-size: 13px; color: var(--muted); }
.resources a { display: flex; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; }

/* Administración */
.admin { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
@media (max-width: 860px) { .admin { grid-template-columns: 1fr; } .admin aside { position: static; height: auto; } }
.admin aside { background: var(--bg-2); border-right: 1px solid rgba(255,255,255,.06); padding: 24px 16px; }
.admin aside .logo { font-size: 22px; display: block; padding: 0 10px 24px; }
.admin aside a { display: block; padding: 10px 12px; border-radius: 10px; color: var(--text); font-size: 14px; font-weight: 600; }
.admin aside a:hover { background: rgba(255,255,255,.04); color: var(--white); }
.admin aside a.on { background: rgba(0,143,228,.14); color: var(--white); }
.admin aside .sep { height: 1px; background: rgba(255,255,255,.06); margin: 14px 0; }
.admin main { padding: 34px clamp(18px, 3vw, 44px) 80px; min-width: 0; }
.admin h1 { font-size: 34px; letter-spacing: -0.03em; }
.admin .head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.stat { padding: 22px; }
.stat b { display: block; font-family: var(--display); font-size: 34px; color: var(--white); font-weight: 600; letter-spacing: -0.03em; }
.stat span { font-size: 13px; color: var(--muted); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line-strong); }
td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:hover td { background: rgba(255,255,255,.015); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs a { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; color: var(--text); }
.tabs a.on { border-color: var(--cyan); color: var(--white); background: rgba(0,143,228,.12); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }
.form-grid .full { grid-column: 1 / -1; }
.inline-form { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.inline-form label { margin-top: 0; }
.hint { font-size: 13px; color: var(--muted); margin-top: 6px; }
.mod-box { margin-bottom: 18px; }
.mod-box .lessons a { display: flex; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--text); font-size: 14px; }
.mod-box .lessons a:hover { background: rgba(255,255,255,.04); color: var(--white); }
.copy { word-break: break-all; background: var(--bg-2); padding: 12px; border-radius: 10px; border: 1px solid var(--line-strong); color: var(--white); font-size: 13px; }

/* ---- v2: aula ampliada ---- */
.aula-nav { border-bottom: 1px solid rgba(255,255,255,.06); background: rgba(7,13,17,.7); }
.aula-nav .wrap { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0; }
.aula-nav a { white-space: nowrap; padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--text); }
.aula-nav a:hover { color: var(--white); background: rgba(255,255,255,.04); }
.aula-nav a.on { color: var(--white); background: rgba(0,143,228,.16); }
.aula-nav a .count { display: inline-block; min-width: 18px; padding: 0 6px; margin-left: 6px; border-radius: 99px; background: var(--blue); color: #fff; font-size: 11px; text-align: center; }

.module-card { margin-bottom: 16px; padding: 24px 26px 14px; }
.module-card.locked { opacity: .62; }
.module-card .mod-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.module-card .lock { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px dashed var(--line-strong); font-size: 14px; margin: 8px 0 10px; }
.item-row { display: flex; gap: 14px; align-items: center; padding: 13px 4px; border-top: 1px solid var(--line); color: var(--text); }
a.item-row:hover { color: var(--white); }
.item-row em { margin-left: auto; font-style: normal; font-size: 13px; color: var(--muted); white-space: nowrap; }
.item-row .kind { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--cyan); border: 1px solid var(--line-strong); padding: 2px 8px; border-radius: 99px; }
.mark { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; font-size: 12px; flex: none; }
.mark.done { background: var(--ok); border-color: var(--ok); color: #03130d; font-weight: 800; }
.mark.wait { border-color: rgba(245,184,74,.5); color: var(--warn); }

.next-step { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.req { list-style: none; padding: 0; margin: 14px 0; }
.req li { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.req li:first-child { border-top: 0; }

/* Vídeo protegido */
.video-box { position: relative; border-radius: var(--radius); overflow: hidden; background: #000; }
.video-box:fullscreen { border-radius: 0; display: grid; place-items: center; }
.video-box:fullscreen .video { width: 100%; height: 100%; aspect-ratio: auto; border: 0; border-radius: 0; }
.watermark { position: absolute; z-index: 5; pointer-events: none; user-select: none; color: rgba(255,255,255,.38); font-size: 13px; font-weight: 600; letter-spacing: .02em; text-shadow: 0 1px 2px rgba(0,0,0,.6); transition: left 1.2s ease, top 1.2s ease; white-space: nowrap; }
.video-tools { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; font-size: 12px; color: var(--muted); }

/* Tests */
.q { padding: 22px 24px; margin-bottom: 14px; }
.q h4 { font-family: var(--body); font-size: 16px; font-weight: 700; margin-bottom: 12px; line-height: 1.45; }
.opt { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; cursor: pointer; font-size: 15px; color: var(--text); font-weight: 400; }
.opt:hover { border-color: var(--line-strong); }
.opt input { margin-top: 4px; accent-color: var(--blue); }
.opt.right { border-color: rgba(47,211,154,.5); background: rgba(47,211,154,.06); }
.opt.wrong { border-color: rgba(255,107,107,.5); background: rgba(255,107,107,.06); }
.q.ok { border-color: rgba(47,211,154,.35); }
.q.ko { border-color: rgba(255,107,107,.35); }
.score { font-family: var(--display); font-size: 64px; font-weight: 600; letter-spacing: -0.04em; line-height: 1; }

/* Directos */
.live-card { display: grid; grid-template-columns: 110px 1fr auto; gap: 22px; align-items: center; margin-bottom: 14px; }
@media (max-width: 700px) { .live-card { grid-template-columns: 1fr; } }
.live-date { text-align: center; border-right: 1px solid var(--line); padding-right: 18px; }
.live-date b { display: block; font-family: var(--display); font-size: 36px; color: var(--white); line-height: 1; }
.live-date span { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--cyan); font-weight: 700; }
.badge-live { color: #fff; background: #e5484d; border-radius: 99px; padding: 3px 10px; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }

/* Guion en modo presentación */
.script-view { max-width: 980px; margin: 0 auto; padding: 50px 30px 120px; font-size: 26px; line-height: 1.55; color: #e9f2f2; }
.script-view h1, .script-view h2 { color: var(--cyan); margin-top: 1.6em; }
.script-view h1 { font-size: 46px; } .script-view h2 { font-size: 36px; } .script-view h3 { font-size: 30px; color: var(--white); }
.script-view blockquote { border-left: 4px solid var(--blue); margin: 1em 0; padding: 6px 0 6px 22px; color: var(--warn); }
.script-view li { margin-bottom: .4em; }
.script-bar { position: sticky; top: 0; background: rgba(4,8,10,.92); border-bottom: 1px solid var(--line); padding: 12px 20px; display: flex; gap: 12px; align-items: center; justify-content: space-between; z-index: 5; }

/* Certificado */
.cert-page { padding: 40px 0 70px; }
.cert { width: min(1000px, 100% - 40px); margin: 0 auto; aspect-ratio: 1.414 / 1; background: #fff; color: #10181c; border-radius: 6px; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 6% 7%; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.cert::before { content: ''; position: absolute; inset: 18px; border: 2px solid #0078d4; border-radius: 4px; pointer-events: none; }
.cert::after { content: ''; position: absolute; right: -120px; top: -120px; width: 380px; height: 380px; border-radius: 50%; background: radial-gradient(circle, rgba(0,143,228,.16), transparent 65%); }
.cert .logo { color: #0b1216; font-size: 30px; }
.cert .t1 { font-size: 13px; letter-spacing: .3em; text-transform: uppercase; color: #0078d4; font-weight: 800; }
.cert h1 { color: #0b1216; font-size: clamp(30px, 5vw, 54px); margin: .25em 0 .3em; letter-spacing: -0.03em; }
.cert h2 { color: #0b1216; font-size: clamp(20px, 2.8vw, 30px); letter-spacing: -0.02em; margin: 0; }
.cert p { color: #3c4a50; margin: 0; font-size: clamp(12px, 1.4vw, 16px); }
.cert .foot-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; font-size: clamp(10px, 1.2vw, 13px); color: #3c4a50; }
.cert .sign { border-top: 1.5px solid #10181c; padding-top: 6px; min-width: 200px; text-align: center; }
@media print {
  @page { size: A4 landscape; margin: 0; }
  body { background: #fff !important; }
  .top, .demo-banner, .foot, .no-print, .aula-nav { display: none !important; }
  .cert-page { padding: 0; }
  .cert { width: 100vw; height: 100vh; aspect-ratio: auto; box-shadow: none; border-radius: 0; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---- Ajustes de maquetación ---- */
body { overflow-x: clip; }
.inline-form input[type=text], .inline-form input[type=number], .inline-form input[type=date], .inline-form input[type=email] { width: auto; flex: 1 1 170px; min-width: 0; }
.inline-form > div { min-width: 0; }
.card > form > .form-grid:first-child > div:first-child label, .card > form > .form-grid:first-child > .full:first-child label { margin-top: 0; }
@media (max-width: 640px) {
  .top .wrap { gap: 10px; height: 64px; }
  .top .pill-live { display: none; }
  .top nav a { font-size: 11px; letter-spacing: .06em; }
  .logo { font-size: 22px; }
  .item-row { flex-wrap: wrap; }
  .item-row em { margin-left: 40px; width: 100%; }
  .aula-top h1 { font-size: 32px; }
  .admin main { padding-top: 20px; }
}

/* =====================================================================
   APLICACIÓN (aula y administración): espacio de trabajo sobrio.
   La web pública conserva el estilo de marca; dentro, todo es más calmado:
   textos en minúscula inicial, superficies sólidas, un solo acento azul.
   ===================================================================== */
.ico { flex: none; display: inline-block; vertical-align: -3px; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

body.app { background: #05090c; background-image: none; }
.app { --surface: #0a1217; --raised: #0e1920; --rule: #17303a; --rule-soft: #12252d; }
.shell { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: #070d11; border-right: 1px solid var(--rule-soft); padding: 22px 14px 16px; overflow-y: auto; }
.demo-banner + .shell .side { height: calc(100vh - 34px); top: 0; }
.side-brand { display: flex; flex-direction: column; gap: 2px; padding: 4px 12px 26px; color: var(--white); }
.side-brand .logo { font-size: 24px; }
.side-brand small { font-size: 12px; color: var(--muted); font-weight: 600; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a, .side-link { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 9px; color: #a9b8ba; font-size: 14px; font-weight: 600; background: none; border: 0; width: 100%; text-align: left; cursor: pointer; font-family: inherit; }
.side-nav a:hover, .side-link:hover { color: var(--white); background: rgba(255,255,255,.04); }
.side-nav a.on { color: var(--white); background: #0f2330; box-shadow: inset 2px 0 0 var(--blue); }
.side-nav a .ico { color: #6f8a92; }
.side-nav a.on .ico, .side-nav a:hover .ico { color: var(--cyan); }
.side-nav .count { margin-left: auto; font-style: normal; background: var(--blue); color: #fff; font-size: 11px; font-weight: 700; border-radius: 99px; padding: 1px 7px; }
.side-group { margin: 18px 12px 6px; font-size: 12px; font-weight: 600; color: #5f777e; }
.side-sep { height: 1px; background: var(--rule-soft); margin: 14px 8px; }
.side-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--rule-soft); }
.side-user { padding: 4px 12px 10px; display: flex; flex-direction: column; min-width: 0; }
.side-user strong { color: var(--white); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user span { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.main { padding: 40px clamp(20px, 4vw, 56px) 80px; min-width: 0; }
.main > * { max-width: 1060px; }
.main.wide > * { max-width: none; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: sticky; top: 0; z-index: 30; height: auto !important; flex-direction: row; align-items: center; gap: 8px; padding: 10px 12px; overflow-x: auto; overflow-y: hidden; border-right: 0; border-bottom: 1px solid var(--rule-soft); }
  .side-brand { padding: 0 8px 0 4px; }
  .side-brand .logo { font-size: 20px; }
  .side-brand small, .side-group, .side-sep, .side-user { display: none; }
  .side-nav { flex-direction: row; gap: 2px; }
  .side-nav a, .side-link { white-space: nowrap; padding: 8px 10px; }
  .side-nav a.on { box-shadow: inset 0 -2px 0 var(--blue); }
  .side-foot { margin: 0; padding: 0; border: 0; }
  .side-link span { display: none; }
  .main { padding: 26px 18px 60px; }
}

/* Cabecera de página */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.page-head h1 { font-size: clamp(28px, 3.2vw, 36px); letter-spacing: -0.025em; font-weight: 600; margin: 0; }
.page-head p { margin: 8px 0 0; color: var(--muted); max-width: 68ch; }
.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: 10px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--white); }
.crumbs .ico { opacity: .6; }

/* Botones dentro de la aplicación: minúscula inicial, forma más sobria */
.app .btn { font-family: var(--body); text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 600; border-radius: 10px; padding: 10px 16px; gap: 8px; background: var(--raised); border-color: var(--rule); box-shadow: none; }
.app .btn:hover { border-color: #2a5566; box-shadow: none; background: #112029; }
.app .btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.app .btn-primary:hover { background: #0a99f0; border-color: #0a99f0; }
.app .btn-ghost { background: transparent; border-color: transparent; color: var(--text); }
.app .btn-ghost:hover { background: rgba(255,255,255,.05); border-color: transparent; }
.app .btn-danger { background: transparent; border-color: #4a2427; color: #f08a8a; }
.app .btn-danger:hover { background: rgba(239,107,107,.08); border-color: #6b2f33; }
.app .btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 8px; }
.app .btn .ico { margin: 0 -2px; }
.app .arrow::after { content: none; }

/* Superficies */
.app .card { background: var(--surface); border: 1px solid var(--rule-soft); border-radius: 14px; padding: 24px; }
.app .card:hover { border-color: var(--rule-soft); }
.app a.card:hover { border-color: var(--rule); background: #0c161c; }
.panel-box { background: var(--surface); border: 1px solid var(--rule-soft); border-radius: 14px; overflow: hidden; }
.panel-box + .panel-box { margin-top: 16px; }
.panel-box > header { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 22px; border-bottom: 1px solid var(--rule-soft); flex-wrap: wrap; }
.panel-box > header h2, .panel-box > header h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; margin: 0; }
.panel-box > header p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.panel-box > .body { padding: 20px 22px; }
.section-title { font-family: var(--display); font-size: 18px; font-weight: 600; color: var(--white); margin: 34px 0 12px; letter-spacing: -0.01em; }

/* Filas (lecciones, tests, entregas, directos…) */
.row-list { list-style: none; margin: 0; padding: 0; }
.row-item { display: flex; align-items: center; gap: 14px; padding: 13px 22px; border-top: 1px solid var(--rule-soft); color: var(--text); font-size: 15px; }
.row-list .row-item:first-child { border-top: 0; }
a.row-item:hover { background: rgba(255,255,255,.025); color: var(--white); }
.row-item .row-main { flex: 1; min-width: 0; }
.row-item .row-main small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.row-item .row-meta { color: var(--muted); font-size: 13px; white-space: nowrap; }
.row-item.disabled { color: #6b7f84; }
.state { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; border: 1.5px solid #2a4651; color: #7d969c; }
.state .ico { width: 14px; height: 14px; }
.state.done { background: var(--ok); border-color: var(--ok); color: #04150e; }
.state.wait { border-color: #6b5323; color: var(--warn); }
.state.lock { border-color: #24363d; color: #557078; }
.tagline { font-size: 12px; font-weight: 600; color: var(--cyan); background: rgba(68,197,251,.08); border-radius: 6px; padding: 2px 8px; }

/* Estado con punto de color */
.app .status-pill { border: 0; background: rgba(255,255,255,.05); color: var(--text); font-size: 12px; font-weight: 600; padding: 4px 10px 4px 9px; gap: 7px; }
.app .status-pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #6f8a92; }
.app .st-active::before, .app .st-completed::before { background: var(--ok); }
.app .st-active, .app .st-completed { color: #9fe8c8; background: rgba(52,200,138,.09); }
.app .st-suspended::before, .app .st-past_due::before, .app .st-pending::before { background: var(--warn); }
.app .st-suspended, .app .st-past_due, .app .st-pending { color: #f1d29a; background: rgba(232,176,75,.09); }
.app .st-revoked::before, .app .st-canceled::before, .app .st-refunded::before { background: var(--bad); }
.app .st-revoked, .app .st-canceled, .app .st-refunded { color: #f6b0b0; background: rgba(239,107,107,.09); }

/* Avisos */
.app .alert { display: flex; gap: 12px; align-items: flex-start; border-radius: 10px; padding: 12px 14px; font-size: 14px; }
.app .alert .ico { margin-top: 1px; }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 10px; background: #0c1a22; border: 1px solid var(--rule-soft); color: var(--text); font-size: 14px; }
.notice .ico { color: var(--cyan); margin-top: 1px; }
.lockline { display: flex; gap: 10px; align-items: center; margin: 0 22px 16px; padding: 12px 14px; border-radius: 10px; background: #0c161b; border: 1px dashed #24414c; font-size: 14px; color: var(--text); }
.lockline .ico { color: var(--warn); }

/* Formularios en la aplicación */
.app label { font-size: 13px; font-weight: 600; color: #d8e3e4; margin: 18px 0 7px; }
.app input[type=text], .app input[type=email], .app input[type=password], .app input[type=number], .app input[type=date], .app input[type=time], .app input[type=url], .app input[type=tel], .app select, .app textarea { background: #060c10; border-color: var(--rule); border-radius: 9px; padding: 11px 13px; font-size: 15px; }
.app input:focus, .app select:focus, .app textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,143,228,.15); }
.app .hint { font-size: 13px; color: var(--muted); }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--rule-soft); }
.app .check-row { color: var(--text); font-weight: 400; }
.app .inline-form { align-items: flex-end; }

/* Tablas y métricas */
.app .table-wrap { background: var(--surface); border-color: var(--rule-soft); border-radius: 14px; }
.app th { font-size: 12px; letter-spacing: 0; text-transform: none; font-weight: 600; color: var(--muted); border-bottom-color: var(--rule); padding: 12px 16px; }
.app td { border-bottom-color: var(--rule-soft); padding: 13px 16px; }
.app tr:last-child td { border-bottom: 0; }
.app .tabs a { border-radius: 8px; border-color: transparent; background: transparent; font-weight: 600; color: var(--muted); padding: 8px 12px; }
.app .tabs a.on { background: #0f2330; color: var(--white); border-color: transparent; }
.app .stat { padding: 20px 22px; }
.app .stat b { font-size: 30px; }
.app .stat span { font-size: 13px; }
.metric-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
@media (max-width: 1000px) { .metric-row { grid-template-columns: 1fr 1fr; } }

/* Estado vacío */
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .ico { color: #3b6573; margin-bottom: 10px; }
.empty strong { display: block; color: var(--white); font-size: 16px; margin-bottom: 4px; }

/* Progreso */
.progress-line { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--muted); }
.progress-line .progress { flex: 1; height: 6px; background: #12232b; }

/* Lecciones */
.app .lesson-layout { margin-top: 0; grid-template-columns: minmax(0, 1fr) 300px; }
.app .toc { padding: 10px; top: 24px; border-radius: 14px; }
.app .toc h4 { font-family: var(--body); font-size: 12px; letter-spacing: 0; text-transform: none; color: var(--muted); font-weight: 600; margin: 14px 10px 6px; display: flex; gap: 6px; align-items: center; }
.app .toc a { font-size: 14px; padding: 8px 10px; border-radius: 8px; align-items: flex-start; }
.app .toc a.on { background: #0f2330; }
.app .toc .state { width: 18px; height: 18px; border-width: 1.5px; margin-top: 1px; }
.app .toc .state .ico { width: 11px; height: 11px; }
.app .video-box { border: 1px solid var(--rule-soft); }
.app .video { border: 0; border-radius: 0; }
.app .prose { line-height: 1.7; max-width: 72ch; }
.app .prose h2, .app .prose h3 { font-size: 20px; font-weight: 600; }
.app .resources a { background: var(--surface); border-color: var(--rule-soft); align-items: center; color: var(--text); }
.app .resources a:hover { color: var(--white); border-color: var(--rule); }

/* Tests */
.app .q { padding: 22px; border-radius: 14px; }
.app .opt { border-color: var(--rule-soft); background: #08121a; }
.app .opt:hover { border-color: var(--rule); }
.app .score { font-size: 56px; }

/* Directos */
.app .live-card { padding: 18px 22px; }
.app .live-date b { font-size: 30px; }
.app .live-date span { letter-spacing: 0; text-transform: capitalize; font-size: 13px; }
.app .badge-live { letter-spacing: 0; text-transform: none; font-size: 12px; }

/* Panel del alumno */
.app .panel-card { background: linear-gradient(120deg, #0b2233 0%, var(--surface) 70%); border-color: #173a4d; }

/* Pantallas de una sola columna (detalle) */
.narrow-col { max-width: 760px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
fieldset.card { min-width: 0; margin: 0 0 14px; }
.tag .dot-live { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); display: inline-block; }
.icon .ico { width: 20px; height: 20px; }
.stack .check .ico { color: var(--ok); }
/* Cabeceras de la administración */
.app .head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.app .head h1 { font-size: clamp(28px, 3.2vw, 34px); letter-spacing: -0.025em; font-weight: 600; margin: 0; }
.app .head p { color: var(--muted); }
.app .mod-box .lessons a { align-items: center; }
.app .alert { display: block; }
.app .alert:has(> .ico) { display: flex; }
.app .inline-form:not(:has(label)) { align-items: center; }
.app .inline-form input[type=text], .app .inline-form input[type=number], .app .inline-form input[type=date] { padding: 9px 12px; font-size: 14px; }
.app .card > form:first-child > .form-grid:first-of-type { margin-top: -16px; }
.form-grid.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 700px) { .form-grid.three { grid-template-columns: 1fr; } }
.app .card > h3 { font-size: 18px; font-weight: 600; margin-bottom: 14px; }
.app .head h1 + p, .app .head p { margin: 6px 0 0; }
.app label.opt { font-size: 15px; font-weight: 400; margin: 0 0 8px; color: var(--text); }
.app .check-row { font-size: 14px; }

/* ---- Página de venta (repaso) ---- */
.facts { list-style: none; padding: 0; margin: 46px auto 0; display: grid; grid-template-columns: repeat(4, 1fr); max-width: 900px; border: 1px solid var(--line); border-radius: 18px; background: rgba(11,20,26,.55); }
.facts li { padding: 18px 16px; text-align: center; border-left: 1px solid var(--line); }
.facts li:first-child { border-left: 0; }
.facts b { display: block; font-family: var(--display); color: var(--white); font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.facts span { font-size: 13px; color: var(--muted); }
@media (max-width: 760px) { .facts { grid-template-columns: 1fr 1fr; } .facts li:nth-child(3) { border-left: 0; } .facts li:nth-child(n+3) { border-top: 1px solid var(--line); } }
ol.syllabus { list-style: none; padding: 0; margin: 0; }
.syllabus li { display: flex; gap: 16px; align-items: center; padding: 18px 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.syllabus li b { font-family: var(--display); color: var(--cyan); font-size: 14px; min-width: 28px; }
.syllabus li span { color: var(--white); font-weight: 600; }
.syllabus li em { margin-left: auto; font-style: normal; color: var(--muted); font-size: 13px; white-space: nowrap; }
.grid.fit { max-width: 1000px; margin: 0 auto; }
.ticks { list-style: none; padding: 0; margin: 12px 0 0; }
.ticks li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); font-size: 15px; }
.ticks li:first-child { border-top: 0; }
.ticks .ico { color: var(--ok); margin-top: 2px; }
.ticks.no .ico { color: var(--bad); transform: rotate(45deg); }
.quote { margin: 0; display: flex; flex-direction: column; gap: 14px; }
.quote blockquote { margin: 0; color: var(--white); font-size: 16px; line-height: 1.6; }
.quote .result { color: var(--cyan); font-weight: 600; font-size: 14px; }
.quote figcaption { margin-top: auto; font-size: 14px; }
.quote figcaption strong { color: var(--white); display: block; }
.quote figcaption span { color: var(--muted); }
.guarantee { display: flex; gap: 20px; align-items: flex-start; border-color: rgba(47,211,154,.3); }
.guarantee .icon { margin: 0; color: var(--ok); border-color: rgba(47,211,154,.35); background: rgba(47,211,154,.08); flex: none; }
.final-cta { border-top: 1px solid rgba(255,255,255,.04); background: radial-gradient(ellipse at 50% 100%, rgba(0,120,212,.18), transparent 60%); }
.section-head h2 { text-wrap: balance; }
.hero h1 { text-wrap: balance; }
