:root {
  --ink: #1f2933;
  --muted: #65717d;
  --line: #d9e2ea;
  --paper: #ffffff;
  --soft: #f5f8fa;
  --soft-2: #eaf1f3;
  --accent: #0f766e;
  --accent-dark: #0b5f59;
  --ok: #256b3a;
  --danger: #9f2f2f;
  --shadow: 0 12px 28px rgba(31, 41, 51, 0.08);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--soft); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 24px; min-height: 64px; padding: 0 28px; background: var(--paper); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 850; }
.brand-mark, .profile-avatar { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 900; }
.main-nav { display: flex; gap: 6px; margin-left: auto; }
.main-nav a, .ghost-action { min-height: 38px; padding: 9px 14px; border-radius: 8px; color: var(--muted); font-weight: 800; }
.main-nav a:hover, .ghost-action { background: var(--soft-2); color: var(--ink); }
.page-shell, .quiz-shell { width: min(1120px, calc(100vw - 36px)); margin: 28px auto; }
.page-heading, .quiz-header, .lesson-toolbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.eyebrow { margin: 0 0 8px; color: var(--accent-dark); font-size: 12px; font-weight: 900; letter-spacing: 0; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 32px; line-height: 1.1; }
.course-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.course-card, .empty-state, .video-panel, .transcript-panel, .quiz-shell, .progress-card { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.course-card, .empty-state, .progress-card { padding: 20px; }
.course-art { display: grid; place-items: center; height: 92px; margin-bottom: 16px; border-radius: 8px; background: linear-gradient(135deg, rgba(15, 118, 110, 0.16), rgba(43, 95, 117, 0.12)), repeating-linear-gradient(90deg, rgba(255,255,255,.6) 0 10px, rgba(255,255,255,.15) 10px 20px); color: var(--accent-dark); font-size: 28px; font-weight: 950; }
/*.course-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    display: block;
}*/
.course-art {
    height: 150px;
    margin-bottom: 22px;
    overflow: hidden;
}

.course-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

.course-card h2 {
    margin-top: 10px;
}
.course-card h2, .progress-card h2 { margin-bottom: 8px; }
.course-card p { color: var(--muted); line-height: 1.55; }
.course-meta, .lesson-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.course-meta span, .lesson-meta span, .badge { min-height: 28px; padding: 5px 10px; border-radius: 999px; background: var(--soft-2); color: var(--muted); font-size: 13px; font-weight: 850; }
.primary-action { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 16px; border: 0; border-radius: 8px; background: var(--accent); color: #fff; font-weight: 900; cursor: pointer; }
.primary-action:hover { background: var(--accent-dark); }
.primary-action:disabled { opacity: .65; cursor: default; }
.learn-layout { display: grid; grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); min-height: calc(100vh - 64px); }
.course-rail { padding: 28px 20px; background: #fbfcfd; border-right: 1px solid var(--line); }
.course-rail h1 { font-size: 25px; }
.progress-shell { height: 10px; overflow: hidden; border-radius: 999px; background: #dfe8ec; }
.progress-shell span { display: block; height: 100%; background: var(--accent); }
.progress-copy { margin: 10px 0 20px; color: var(--muted); font-size: 14px; }
.module-card { overflow: hidden; margin-bottom: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; }
.module-card header { padding: 14px; border-bottom: 1px solid var(--line); }
.module-card h2 { margin: 0; font-size: 15px; }
.module-card small, .module-row small { display: block; color: var(--muted); font-size: 13px; font-weight: 750; }
.module-row { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; padding: 11px 14px; }
.module-row:hover, .module-row.active { background: var(--soft); }
.status-dot { width: 18px; height: 18px; margin-top: 2px; border: 2px solid #9aa8b5; border-radius: 50%; }
.status-dot.done { background: var(--ok); border-color: var(--ok); box-shadow: inset 0 0 0 4px #fff; }
.lesson-stage { min-width: 0; padding: 28px; }
.lesson-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); gap: 20px; align-items: start; }
.video-panel { overflow: hidden; }
.video-frame { aspect-ratio: 16 / 9; background: #111820; }
.video-frame iframe { width: 100%; height: 100%; border: 0; }
.lesson-meta { padding: 18px 18px 8px; margin-bottom: 0; }
.video-panel p { padding: 0 18px 20px; color: var(--muted); line-height: 1.6; }
.transcript-panel { position: sticky; top: 84px; max-height: calc(100vh - 104px); overflow: hidden; }
.transcript-panel header { padding: 16px; border-bottom: 1px solid var(--line); }
.transcript-panel h3 { margin: 0; }
.transcript-list { max-height: calc(100vh - 170px); overflow: auto; padding: 8px 16px 16px; }
.transcript-item { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.transcript-item span { color: var(--accent-dark); font-size: 13px; font-weight: 900; }
.transcript-item p { margin: 0; color: #3d4750; line-height: 1.5; }
.quiz-shell { padding: 24px; }
.quiz-form { display: grid; gap: 16px; }
.question-card { border: 1px solid var(--line); border-radius: 8px; padding: 18px; }
.question-card legend { padding: 0 6px; font-weight: 850; }
.question-card label { display: flex; gap: 10px; align-items: flex-start; min-height: 38px; padding: 8px 0; color: #3d4750; }
.quiz-result { margin-top: 18px; padding: 16px; border-radius: 8px; background: #eef8f1; color: var(--ok); font-weight: 900; }
.quiz-result.failed { background: #fff1f1; color: var(--danger); }
.progress-list { display: grid; gap: 16px; }
.progress-row { display: grid; grid-template-columns: minmax(0, 1fr) 140px 170px; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.badge.done { background: #e5f4ea; color: var(--ok); }
@media (max-width: 980px) { .learn-layout, .lesson-grid, .course-grid { grid-template-columns: 1fr; } .course-rail { border-right: 0; border-bottom: 1px solid var(--line); } .transcript-panel { position: static; max-height: none; } }
@media (max-width: 640px) { .topbar, .page-heading, .quiz-header, .lesson-toolbar { display: grid; } .topbar { padding: 12px; } .main-nav { margin-left: 0; } .lesson-stage, .course-rail { padding: 18px; } h1 { font-size: 26px; } .progress-row { grid-template-columns: 1fr; } }
.course-side-header {
    border-bottom: 1px solid #d9e4ea;
    padding-bottom: 18px;
    margin-bottom: 18px;
}

.course-side-header h1 {
    font-size: 24px;
    margin: 0;
}

.module-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.module-card {
    border: 1px solid #d9e4ea;
    border-radius: 14px;
    background: #fff;
    padding: 0;
    overflow: hidden;
}

.module-card summary {
    cursor: pointer;
    list-style: none;
    padding: 16px;
    font-weight: 800;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.module-card summary::-webkit-details-marker {
    display: none;
}

.module-card summary::after {
    content: "▾";
    font-size: 14px;
}

.module-card:not([open]) summary::after {
    content: "▸";
}

.module-lessons {
    border-top: 1px solid #edf2f5;
    padding: 8px;
}

.module-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 10px;
    border-radius: 10px;
    color: inherit;
    text-decoration: none;
}

.module-row:hover,
.module-row.active {
    background: #eef7f6;
    color: #087f73;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #b8c6cc;
    flex: 0 0 auto;
}

.status-dot.done {
    background: #087f73;
}

.content-panel {
    background: #fff;
    border: 1px solid #d9e4ea;
    border-radius: 16px;
    padding: 24px;
    margin-top: 18px;
    line-height: 1.7;
}

.empty-mini {
    padding: 10px;
    color: #6b7c8f;
    font-size: 14px;
}

.lesson-stage {
    padding: 28px 32px;
    max-width: 980px;
}

.video-panel,
.content-panel {
    max-width: 900px;
}

.video-frame,
.local-video {
    height: 380px;
    border-radius: 14px;
}

.content-panel {
    font-size: 16px;
    line-height: 1.8;
    color: #223142;
}

.content-panel h1,
.content-panel h2,
.content-panel h3 {
    color: #0f172a;
    margin-top: 24px;
}

.content-panel p {
    margin-bottom: 16px;
}

.content-panel pre {
    background: #0f172a;
    color: #e5e7eb;
    padding: 18px;
    border-radius: 14px;
    overflow-x: auto;
    font-family: "Ubuntu Mono", "Fira Code", "Courier New", monospace;
    font-size: 15px;
    line-height: 1.6;
    border: 1px solid #1e293b;
}

.content-panel code {
    background: #e8f0f2;
    color: #075e57;
    padding: 3px 7px;
    border-radius: 6px;
    font-family: "Ubuntu Mono", "Fira Code", "Courier New", monospace;
}

.content-panel pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}
.content-panel {
    background: #ffffff;
    border-radius: 16px;
    padding: 30px;
    line-height: 1.8;
    color: #334155;
}

.content-panel h1,
.content-panel h2,
.content-panel h3 {
    color: #0f172a;
    margin-top: 30px;
    margin-bottom: 15px;
}

.content-panel pre {
    background: #0d1117;
    color: #e6edf3;
    padding: 20px;
    border-radius: 12px;
    overflow-x: auto;
    border: 1px solid #30363d;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.03);
}

.content-panel code {
    font-family:
        "Fira Code",
        "JetBrains Mono",
        "Ubuntu Mono",
        monospace;
}

.content-panel pre code {
    font-size: 15px;
    line-height: 1.7;
}

.content-panel blockquote {
    border-left: 4px solid #087f73;
    padding-left: 15px;
    margin-left: 0;
    color: #64748b;
}

.content-panel table {
    width: 100%;
    border-collapse: collapse;
}

.content-panel th,
.content-panel td {
    border: 1px solid #e2e8f0;
    padding: 10px;
}

.content-panel th {
    background: #f8fafc;
}
/* ===== NEXUS LAB - contenido estilo programador ===== */

.lesson-stage {
    padding: 28px 32px;
    width: 100%;
    max-width: none;
}

.video-panel,
.content-panel {
    width: min(100%, 980px);
}

.video-frame,
.local-video {
    width: 100%;
    height: 360px;
    border-radius: 14px;
    overflow: hidden;
}

.content-panel {
    margin-top: 18px;
    padding: 32px;
    background: #ffffff;
    color: #243447;
    border: 1px solid #d9e4ea;
    border-radius: 16px;
    line-height: 1.8;
    font-size: 16px;
}

.content-panel h1,
.content-panel h2,
.content-panel h3 {
    color: #0f172a;
    margin-top: 26px;
    margin-bottom: 12px;
}

.content-panel p {
    margin-bottom: 16px;
}

.content-panel pre {
    background: #0d1117;
    color: #e6edf3;
    padding: 22px;
    border-radius: 14px;
    overflow-x: auto;
    border: 1px solid #30363d;
    font-family: "Fira Code", "JetBrains Mono", "Ubuntu Mono", monospace;
    font-size: 15px;
    line-height: 1.7;
}

.content-panel code {
    font-family: "Fira Code", "JetBrains Mono", "Ubuntu Mono", monospace;
    background: #edf5f5;
    color: #075e57;
    padding: 3px 7px;
    border-radius: 6px;
}

.content-panel pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

.content-panel .codehilite,
.content-panel .highlight {
    background: #0d1117;
    border-radius: 14px;
    margin: 20px 0;
}

.content-panel .codehilite pre,
.content-panel .highlight pre {
    margin: 0;
}

.lesson-video,
.video-frame {
    margin-bottom: 24px;
    border-radius: 16px;
    overflow: hidden;
    background: #000;
}

.lesson-text {
    font-size: 18px;
    line-height: 1.7;
}

.lesson-text pre {
    background: #0f172a;
    color: #e5e7eb;
    padding: 18px;
    border-radius: 12px;
    overflow-x: auto;
}


.lesson-navigation {
    margin-top: 30px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.nav-btn {
    background: #0f766e;
    color: white;
    text-decoration: none;
    padding: 12px 18px;
    border-radius: 10px;
    font-weight: 700;
}

.nav-btn.next {
    margin-left: auto;
}


.lesson-stage .lesson-navigation {
    width: min(100%, 900px);
    margin-top: 30px;
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.lesson-stage .lesson-navigation .nav-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 12px 20px !important;
    border-radius: 10px;
    background: #0f766e !important;
    color: #ffffff !important;
    text-decoration: none !important;
    font-weight: 800;
    line-height: 1;
}

.lesson-stage .lesson-navigation .nav-btn:hover {
    background: #0b5f59 !important;
}

.lesson-stage .lesson-navigation .nav-btn.next {
    margin-left: auto;
}

.content-panel table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.content-panel th,
.content-panel td {
    border: 1px solid #d9e4ea;
    padding: 12px;
    text-align: left;
}

.content-panel th {
    background: #f3f7f9;
    font-weight: 700;
}

.content-panel tr:nth-child(even) {
    background: #fafcfd;
}
.lesson-text table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 24px 0;
    overflow: hidden;
    border: 1px solid #d9e4ea;
    border-radius: 14px;
    background: #ffffff;
}

.lesson-text thead th {
    background: #0f766e;
    color: #ffffff;
    font-weight: 800;
    padding: 14px 16px;
    text-align: left;
}

.lesson-text tbody td {
    padding: 14px 16px;
    border-top: 1px solid #e5edf2;
}

.lesson-text tbody tr:nth-child(even) {
    background: #f7fbfb;
}

.lesson-text tbody tr:hover {
    background: #eef7f6;
}

.lesson-text code {
    background: #eef7f6;
    color: #075e57;
    padding: 3px 7px;
    border-radius: 6px;
    font-weight: 700;
}

.lesson-note{
    margin:20px 0;
    padding:16px;
    border-left:5px solid #0f766e;
    background:#f0fdfa;
    border-radius:8px;
}

.lesson-note code{
    background:#d1fae5;
    padding:2px 6px;
    border-radius:4px;
}

.auth-shell {
    min-height: calc(100vh - 64px);
    display: grid;
    place-items: center;
    padding: 30px;
}

.auth-card {
    width: min(100%, 420px);
    background: white;
    border: 1px solid #d9e4ea;
    border-radius: 18px;
    padding: 32px;
    box-shadow: var(--shadow);
}

.auth-card h1 {
    margin-bottom: 8px;
}

.auth-card p {
    color: var(--muted);
    margin-bottom: 24px;
}

.auth-card form {
    display: grid;
    gap: 12px;
}

.auth-card label {
    font-weight: 800;
}

.auth-card input {
    width: 100%;
    min-height: 44px;
    border: 1px solid #d9e4ea;
    border-radius: 10px;
    padding: 10px 12px;
}

.auth-error {
    background: #fff1f1;
    color: #9f2f2f;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-weight: 700;
}
.user-pill {
    background: #eef7f6;
    color: #0f766e;
    padding: 8px 12px;
    border-radius: 999px;
    font-weight: 800;
}

.profile-menu {
    position: relative;
}

.profile-menu summary {
    list-style: none;
    cursor: pointer;
}

.profile-menu summary::-webkit-details-marker {
    display: none;
}

.profile-dropdown {
    position: absolute;
    right: 0;
    top: 46px;
    width: 240px;
    background: #ffffff;
    border: 1px solid #d9e4ea;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(31, 41, 51, 0.16);
    padding: 10px;
    z-index: 99;
}

.profile-info {
    padding: 12px;
    border-bottom: 1px solid #e5edf2;
    margin-bottom: 6px;
}

.profile-info strong,
.profile-info small {
    display: block;
}

.profile-info small {
    color: #65717d;
    margin-top: 4px;
}

.profile-dropdown a,
.profile-dropdown button {
    width: 100%;
    display: block;
    padding: 11px 12px;
    border: 0;
    background: transparent;
    color: #1f2933;
    text-align: left;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
}

.profile-dropdown a:hover,
.profile-dropdown button:hover {
    background: #eef7f6;
    color: #0f766e;
}

.progress-card-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 16px;
}

.progress-card-header p {
    color: var(--muted);
    margin: 6px 0 0;
}

.course-status {
    background: #eef7f6;
    color: #0f766e;
    padding: 8px 12px;
    border-radius: 999px;
    font-weight: 900;
    height: fit-content;
}

.module-progress-list {
    display: grid;
    gap: 10px;
    margin: 20px 0;
}

.module-progress-row {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid #e5edf2;
    border-radius: 12px;
    background: #ffffff;
}

.module-progress-row small {
    display: block;
    color: var(--muted);
    margin-top: 4px;
}

.module-state-icon {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-weight: 900;
}

.module-progress-row.completed .module-state-icon {
    background: #dcfce7;
    color: #166534;
}

.module-progress-row.in_progress .module-state-icon {
    background: #fef9c3;
    color: #854d0e;
}

.module-progress-row.not_started .module-state-icon {
    background: #e5e7eb;
    color: #475569;
}

.progress-card-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 16px;
}

.progress-card-header p {
    color: var(--muted);
    margin: 6px 0 0;
}

.course-status {
    background: #eef7f6;
    color: #0f766e;
    padding: 8px 12px;
    border-radius: 999px;
    font-weight: 900;
    height: fit-content;
    white-space: nowrap;
}

.module-progress-list {
    display: grid;
    gap: 10px;
    margin: 20px 0;
}

.module-progress-row {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid #e5edf2;
    border-radius: 12px;
    background: #ffffff;
}

.module-progress-row small {
    display: block;
    color: var(--muted);
    margin-top: 4px;
}

.module-state-icon {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-weight: 900;
}

.module-progress-row.completed .module-state-icon {
    background: #dcfce7;
    color: #166534;
}

.module-progress-row.in_progress .module-state-icon {
    background: #fef9c3;
    color: #854d0e;
}

.module-progress-row.visited .module-state-icon {
    background: #dbeafe;
    color: #1d4ed8;
}

.module-progress-row.not_started .module-state-icon {
    background: #e5e7eb;
    color: #475569;
}

.catalog-intro {
    color: var(--muted);
    max-width: 640px;
    margin-top: 8px;
}

.course-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.course-card-body {
    display: grid;
    gap: 12px;
}

.course-topline {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.badge.featured {
    background: #fff7ed;
    color: #9a3412;
}

.course-card .primary-action {
    margin-top: auto;
}

.course-card h2 {
    font-size: 20px;
    line-height: 1.25;
}

.course-card p {
    min-height: 72px;
}.jitsi-container { height: 700px; margin-top: 20px; }
