/* =========================================================================
   Wall-E360 — Academia (portal LMS con sesión)
   Usa los tokens/fuentes de styles.css. Este archivo estiliza el shell.
   ========================================================================= */

body.lms-body { background: var(--surface-2); }

/* ---------- Utilidad ---------- */
.hidden { display: none !important; }

/* =========================================================================
   LOGIN
   ========================================================================= */
.auth-wrap {
  min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr;
}
.auth-brand {
  position: relative; overflow: hidden; color: #fff; padding: 56px;
  display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(900px 500px at 20% 0%, rgba(124,108,255,.55), transparent 60%),
              radial-gradient(700px 500px at 90% 90%, rgba(34,211,238,.4), transparent 60%),
              var(--navy);
}
.auth-brand::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 42px 42px; mask-image: radial-gradient(600px 400px at 30% 20%, #000, transparent 75%);
}
.auth-brand > * { position: relative; z-index: 2; }
.auth-brand .brand { color: #fff; font-size: 1.3rem; }
.auth-brand h1 { font-family: var(--font-h); font-size: clamp(1.8rem,3vw,2.6rem); line-height: 1.1; margin-top: 10px; letter-spacing: -.02em; }
.auth-brand p { color: rgba(255,255,255,.78); margin-top: 14px; max-width: 420px; }
.auth-points { margin-top: 26px; display: flex; flex-direction: column; gap: 12px; }
.auth-point { display: flex; align-items: center; gap: 12px; color: rgba(255,255,255,.9); font-size: .96rem; }
.auth-point .ic { width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,.1); display: grid; place-items: center; flex-shrink: 0; }
.auth-point .ic svg { width: 18px; height: 18px; color: var(--cyan); }
.auth-foot { color: rgba(255,255,255,.5); font-size: .85rem; }

.auth-panel { display: flex; align-items: center; justify-content: center; padding: 40px; background: #fff; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card .step-eyebrow { font-family: var(--font-h); font-weight: 600; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; color: var(--violet-600); }
.auth-card h2 { font-family: var(--font-h); font-size: 1.7rem; margin: 6px 0 6px; letter-spacing: -.01em; }
.auth-card .sub { color: var(--muted); font-size: .96rem; margin-bottom: 26px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .88rem; font-weight: 600; color: var(--text); margin-bottom: 7px; }
.field input {
  width: 100%; padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px;
  font: inherit; color: var(--text); background: var(--surface-2); transition: border-color .15s, box-shadow .15s, background .15s;
}
.field input:focus { outline: none; border-color: var(--violet); background: #fff; box-shadow: 0 0 0 4px rgba(124,108,255,.12); }
.field .hint { font-size: .8rem; color: var(--muted-2); margin-top: 6px; }
.btn-block { width: 100%; }
.auth-error { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; font-size: .9rem; padding: 11px 14px; border-radius: 11px; margin-bottom: 16px; display: none; }
.auth-error.show { display: block; }
.auth-back { background: none; border: none; color: var(--muted); font-size: .9rem; cursor: pointer; margin-top: 18px; display: inline-flex; align-items: center; gap: 6px; }
.auth-back:hover { color: var(--text); }
.tenant-chip { display: inline-flex; align-items: center; gap: 9px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 100px; padding: 7px 14px 7px 8px; font-size: .88rem; font-weight: 600; margin-bottom: 20px; }
.tenant-chip .dot { width: 26px; height: 26px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; color: #fff; font-size: .8rem; }
.choice { display: flex; flex-direction: column; gap: 12px; }
.choice-btn { display: flex; align-items: center; gap: 14px; text-align: left; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.choice-btn:hover { border-color: var(--violet); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.choice-btn .ic { width: 42px; height: 42px; border-radius: 12px; background: var(--grad-soft); display: grid; place-items: center; flex-shrink: 0; }
.choice-btn .ic svg { width: 21px; height: 21px; color: var(--violet-600); }
.choice-btn b { display: block; font-family: var(--font-h); font-size: .98rem; }
.choice-btn small { color: var(--muted); font-size: .84rem; }
.spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* =========================================================================
   APP SHELL
   ========================================================================= */
.lms { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }

/* ---- Sidebar ---- */
.sidebar {
  background: #fff; border-right: 1px solid var(--line); padding: 22px 16px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column;
}
.sidebar .brand { padding: 0 8px 22px; }
.side-group { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2); font-weight: 700; padding: 14px 10px 8px; }
.side-link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px; color: var(--muted); font-weight: 500; font-size: .94rem; cursor: pointer; transition: background .15s, color .15s; }
.side-link svg { width: 19px; height: 19px; flex-shrink: 0; }
.side-link:hover { background: var(--surface-2); color: var(--text); }
.side-link.active { background: var(--grad-soft); color: var(--violet-700); font-weight: 600; }
.side-help { margin-top: auto; background: linear-gradient(160deg,#f2f0ff,#eafcff); border: 1px solid #e3ddff; border-radius: 16px; padding: 18px; text-align: left; }
.side-help h4 { font-family: var(--font-h); font-size: .98rem; margin-bottom: 6px; }
.side-help p { font-size: .84rem; color: var(--muted); margin-bottom: 12px; }

/* ---- Topbar ---- */
.main-col { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.85); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); padding: 12px 28px; display: flex; align-items: center; gap: 18px;
}
.topbar .search { flex: 1; max-width: 640px; position: relative; }
.topbar .search .mag { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted-2); display: grid; place-items: center; }
.topbar .search .mag svg, .topbar .search .mic svg { width: 18px; height: 18px; }
.topbar .search input { width: 100%; padding: 11px 44px; border: 1px solid var(--line); border-radius: 100px; background: var(--surface-2); font: inherit; font-size: .92rem; }
.topbar .search input:focus { outline: none; border-color: var(--violet); background: #fff; box-shadow: 0 0 0 4px rgba(124,108,255,.1); }
.topbar .search .mic { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted-2); cursor: pointer; }
.top-icons { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.icon-btn { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: var(--muted); position: relative; cursor: pointer; transition: background .15s, color .15s; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn .badge { position: absolute; top: 6px; right: 6px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 100px; background: #ef4444; color: #fff; font-size: .64rem; font-weight: 700; display: grid; place-items: center; }
.top-user { display: flex; align-items: center; gap: 11px; padding: 5px 8px 5px 5px; border-radius: 12px; cursor: pointer; }
.top-user:hover { background: var(--surface-2); }
.top-user .avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-family: var(--font-h); font-weight: 700; font-size: .95rem; }
.top-user .who { line-height: 1.2; }
.top-user .who b { font-family: var(--font-h); font-size: .9rem; display: block; }
.top-user .who small { color: var(--muted); font-size: .78rem; }
.top-user .who small.tenant { color: var(--violet-600); font-weight: 600; }

/* ---- Content ---- */
.content { padding: 26px 28px 60px; display: grid; grid-template-columns: 1fr 330px; gap: 24px; align-items: start; }
.col-main { min-width: 0; }

/* Hero */
.lms-hero { position: relative; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 32px; box-shadow: var(--shadow-sm); }
.lms-hero h1 { font-family: var(--font-h); font-size: clamp(1.6rem,3vw,2.2rem); letter-spacing: -.02em; }
.lms-hero > p { color: var(--muted); margin-top: 8px; max-width: 520px; }
.hero-search { margin-top: 22px; max-width: 560px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 15px; padding: 10px 12px 10px 16px; display: flex; align-items: center; gap: 12px; cursor: text; transition: border-color .15s, box-shadow .15s, background .15s; }
.hero-search:focus-within { border-color: var(--violet); background: #fff; box-shadow: 0 0 0 4px rgba(124,108,255,.1); }
.hero-search .hs-ic { color: var(--muted-2); display: grid; place-items: center; flex-shrink: 0; }
.hero-search .hs-ic svg { width: 20px; height: 20px; }
.hero-search input { flex: 1; border: none; background: none; font: inherit; font-size: 1rem; color: var(--text); outline: none; min-width: 0; }
.hero-search input::placeholder { color: var(--muted-2); }
.hero-search .go { width: 44px; height: 44px; border-radius: 12px; background: var(--grad); display: grid; place-items: center; flex-shrink: 0; }
.hero-search .go svg { width: 20px; height: 20px; color: #fff; }
.search-count { color: var(--muted); font-weight: 600; font-size: .9rem; }
.search-empty { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 46px; text-align: center; color: var(--muted); }
.search-empty a { color: var(--violet-600); font-weight: 600; }
.search-lecs { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; }
@media (max-width: 900px){ .search-lecs { grid-template-columns: 1fr; } }
.lms-hero .deco { position: absolute; right: -10px; top: 50%; transform: translateY(-50%); width: 220px; height: 200px; opacity: .9; pointer-events: none; }
@media (max-width: 1160px) { .lms-hero .deco { display: none; } }

/* Stats */
.lms-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-top: 22px; }
.lms-stat { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px; box-shadow: var(--shadow-sm); }
.lms-stat .ic { width: 42px; height: 42px; border-radius: 12px; background: var(--grad-soft); display: grid; place-items: center; margin-bottom: 12px; }
.lms-stat .ic svg { width: 21px; height: 21px; color: var(--violet-600); }
.lms-stat b { font-family: var(--font-h); font-size: 1.7rem; display: block; line-height: 1; }
.lms-stat .lbl { font-size: .9rem; font-weight: 600; margin-top: 5px; }
.lms-stat .hint { font-size: .78rem; color: var(--muted-2); margin-top: 2px; }

/* Section header */
.blk-head { display: flex; align-items: center; justify-content: space-between; margin: 34px 0 16px; }
.blk-head h2 { font-family: var(--font-h); font-size: 1.3rem; letter-spacing: -.01em; }
.blk-head a { color: var(--violet-600); font-weight: 600; font-size: .9rem; display: inline-flex; align-items: center; gap: 5px; }
.blk-head a svg { width: 15px; height: 15px; }

/* Rutas */
.rutas { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.ruta { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s; cursor: pointer; display: flex; flex-direction: column; }
.ruta:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.ruta-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; }
.ruta .ic { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; color: #fff; }
.ruta .ic svg { width: 23px; height: 23px; }
.ruta .lvl { font-size: .72rem; font-weight: 700; padding: 4px 10px; border-radius: 100px; }
.ruta h3 { font-family: var(--font-h); font-size: 1.05rem; margin-bottom: 6px; }
.ruta p { font-size: .86rem; color: var(--muted); flex: 1; }
.progress { height: 7px; border-radius: 100px; background: var(--surface-2); overflow: hidden; margin-top: 16px; }
.progress > span { display: block; height: 100%; border-radius: 100px; background: var(--grad); }
.ruta-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; font-size: .82rem; }
.ruta-foot .pct { font-weight: 700; }
.ruta-foot .les { color: var(--muted-2); }

/* Módulos */
.modulos { display: grid; grid-template-columns: repeat(6,1fr); gap: 14px; }
.mod { background: #fff; border: 1px solid var(--line); border-radius: 15px; padding: 20px 12px; text-align: center; box-shadow: var(--shadow-sm); cursor: pointer; transition: transform .18s, box-shadow .18s, border-color .18s; }
.mod:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: transparent; }
.mod .ic { width: 46px; height: 46px; border-radius: 13px; background: var(--grad-soft); display: grid; place-items: center; margin: 0 auto 10px; }
.mod .ic svg { width: 22px; height: 22px; color: var(--violet-600); }
.mod span { font-size: .84rem; font-weight: 600; }

/* ---- Right rail ---- */
.rail { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 84px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 20px; box-shadow: var(--shadow-sm); }
.card h3 { font-family: var(--font-h); font-size: 1.05rem; margin-bottom: 14px; }
.continue .thumb { position: relative; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; background: linear-gradient(150deg,#1a1e30,#0f1220); display: grid; place-items: center; margin-bottom: 14px; }
.continue .thumb::after { content:""; position:absolute; inset:0; background-image: linear-gradient(rgba(255,255,255,.06) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.06) 1px,transparent 1px); background-size: 26px 26px; }
.continue .thumb .play { position: relative; z-index: 2; width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3); display: grid; place-items: center; }
.continue .thumb .play svg { width: 20px; height: 20px; color: #fff; margin-left: 3px; }
.continue .tag { position: absolute; top: 10px; left: 10px; z-index: 3; font-size: .68rem; font-weight: 600; color: #fff; background: rgba(124,108,255,.9); padding: 3px 9px; border-radius: 100px; }
.continue h4 { font-family: var(--font-h); font-size: 1rem; }
.continue small { color: var(--muted); font-size: .84rem; }
.continue .prow { display: flex; justify-content: space-between; align-items: center; font-size: .8rem; margin: 12px 0 6px; }
.recursos-list { display: flex; flex-direction: column; }
.recurso { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); cursor: pointer; }
.recurso:first-child { border-top: none; padding-top: 0; }
.recurso:hover b { color: var(--violet-600); }
.recurso .ic { width: 38px; height: 38px; border-radius: 11px; background: var(--surface-2); display: grid; place-items: center; flex-shrink: 0; }
.recurso .ic svg { width: 19px; height: 19px; color: var(--violet-600); }
.recurso b { font-size: .9rem; font-family: var(--font-h); font-weight: 600; display: block; }
.recurso small { font-size: .78rem; color: var(--muted-2); }
.recurso .chev { margin-left: auto; color: var(--muted-2); }
.recurso .chev svg { width: 16px; height: 16px; }
.card.ask { background: linear-gradient(160deg,#f2f0ff,#eafcff); border-color: #e3ddff; position: relative; overflow: hidden; }
.card.ask h3 { font-size: 1.05rem; }
.card.ask p { font-size: .86rem; color: var(--muted); margin-bottom: 14px; }
.card.ask .bubble { position: absolute; right: -14px; bottom: -14px; width: 90px; height: 90px; border-radius: 50%; background: var(--grad); opacity: .18; }

.ruta { position: relative; }
.ruta::after { content: "Ver lecciones"; position: absolute; bottom: 20px; right: 20px; font-size: .74rem; font-weight: 600; color: var(--violet-600); opacity: 0; transition: opacity .2s; }
.ruta:hover::after { opacity: 1; }

/* ---- Modal de lecciones ---- */
.modal-overlay { position: fixed; inset: 0; z-index: 100; background: rgba(11,13,23,.55); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 20px; animation: fade .18s ease; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--surface-2); border-radius: 20px; width: 100%; max-width: 620px; max-height: 86vh; display: flex; flex-direction: column; overflow: hidden; box-shadow: var(--shadow-md); animation: pop .2s cubic-bezier(.2,.8,.2,1); }
@keyframes pop { from { transform: translateY(14px) scale(.98); opacity: 0; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; background: #fff; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-family: var(--font-h); font-size: 1.2rem; }
.modal-x { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: var(--muted); }
.modal-x:hover { background: var(--surface-2); color: var(--text); }
.modal-x svg { width: 19px; height: 19px; }
.modal-body { padding: 18px 22px 24px; overflow-y: auto; }
.lec-list { display: flex; flex-direction: column; gap: 12px; }
.lec { display: flex; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.lec-thumb { position: relative; width: 132px; flex-shrink: 0; aspect-ratio: 16/9; border-radius: 10px; overflow: hidden; background: linear-gradient(150deg,#1a1e30,#0f1220); background-size: cover; background-position: center; display: grid; place-items: center; }
.lec-thumb .play { width: 40px; height: 40px; border-radius: 50%; background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.35); display: grid; place-items: center; }
.lec-thumb .play svg { width: 17px; height: 17px; color: #fff; margin-left: 2px; }
.lec-thumb .soon { position: absolute; top: 8px; left: 8px; font-size: .64rem; font-weight: 600; color: #fff; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.25); padding: 3px 8px; border-radius: 100px; }
.lec-body { min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.lec-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.lec-meta .dur { font-size: .76rem; color: var(--muted-2); }
.lec-body b { font-family: var(--font-h); font-size: .96rem; }
.lec-body small { font-size: .82rem; color: var(--muted); }
.lec-empty { text-align: center; color: var(--muted); padding: 40px; }
.lvl { font-size: .7rem; font-weight: 700; padding: 3px 9px; border-radius: 7px; }
.lvl.Básico { background: #ecfdf5; color: #059669; }
.lvl.Intermedio { background: #eff6ff; color: #2563eb; }
.lvl.Avanzado { background: #fef2f2; color: #dc2626; }
@media (max-width: 520px){ .lec-thumb { width: 96px; } }

/* ---- Progreso: tarjeta con anillo ---- */
.prog-card .prog-top { display: flex; align-items: center; gap: 16px; }
.prog-ring { position: relative; width: 64px; height: 64px; flex-shrink: 0; }
.prog-ring svg { width: 64px; height: 64px; transform: rotate(-90deg); }
.prog-ring .rbg { fill: none; stroke: var(--surface-3); stroke-width: 6; }
.prog-ring .rfg { fill: none; stroke: var(--violet); stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset .7s cubic-bezier(.2,.8,.2,1); }
.prog-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-h); font-size: .95rem; }
.prog-nums h3 { font-size: 1.05rem; }
.prog-nums .pn { font-size: .86rem; color: var(--muted); margin-top: 3px; }
.prog-nums .pn b { color: var(--text); font-family: var(--font-h); }
.prog-card .btn svg { width: 16px; height: 16px; }

/* Ruta completada */
.ruta-done { display: inline-flex; align-items: center; gap: 5px; font-size: .72rem; font-weight: 700; color: #059669; background: #ecfdf5; border: 1px solid #a7f3d0; padding: 4px 10px; border-radius: 100px; }
.ruta-done svg { width: 13px; height: 13px; }
.ruta.is-done { border-color: #a7f3d0; }
.ruta.is-done .progress > span { background: linear-gradient(90deg,#10b981,#22d3ee); }

/* Lección: acciones (guardar + completar) */
.lec { position: relative; }
.lec-actions { position: absolute; top: 12px; right: 12px; display: flex; gap: 6px; }
.lec-chk, .lec-save { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); color: var(--muted-2); display: grid; place-items: center; cursor: pointer; transition: .15s; }
.lec-chk svg, .lec-save svg { width: 15px; height: 15px; }
.lec-chk:hover { border-color: var(--violet); color: var(--violet); }
.lec-chk.on { background: #10b981; border-color: #10b981; color: #fff; }
.lec-save:hover { border-color: #f59e0b; color: #f59e0b; }
.lec-save.on { background: #fffbeb; border-color: #f59e0b; color: #f59e0b; }
.lec-save.on svg { fill: currentColor; }
.lec-done { border-color: #a7f3d0; background: linear-gradient(90deg,#f0fdf4,var(--surface) 40%); }

/* Contador en el sidebar (Mis cursos) */
.side-count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 100px; background: var(--grad); color: #fff; font-size: .72rem; font-weight: 700; display: grid; place-items: center; }

/* Panel de novedades */
.nov-panel { position: fixed; z-index: 120; width: 340px; max-width: calc(100vw - 24px); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-md); overflow: hidden; animation: tpIn .18s ease; }
.nov-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.nov-head b { font-family: var(--font-h); font-size: 1rem; }
.nov-head span { font-size: .74rem; font-weight: 700; color: var(--violet-700); background: var(--grad-soft); border-radius: 100px; padding: 2px 9px; }
.nov-list { max-height: 60vh; overflow-y: auto; }
.nov-item { display: flex; gap: 12px; padding: 13px 16px; border-top: 1px solid var(--line); }
.nov-item:first-child { border-top: none; }
.nov-item.is-new { background: color-mix(in srgb, var(--violet) 5%, transparent); }
.nov-ic { width: 38px; height: 38px; border-radius: 11px; background: var(--grad-soft); display: grid; place-items: center; flex-shrink: 0; }
.nov-ic svg { width: 19px; height: 19px; color: var(--violet-600); }
.nov-tx b { font-family: var(--font-h); font-size: .92rem; display: flex; align-items: center; gap: 7px; }
.nov-tx p { font-size: .84rem; color: var(--muted); margin: 3px 0 0; }
.nov-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--grad); flex-shrink: 0; }

/* Lista de guardados */
.sv-list { display: flex; flex-direction: column; gap: 10px; }
.sv-row { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.sv-row.done { border-color: #a7f3d0; }
.sv-body { flex: 1; min-width: 0; }
.sv-ruta { font-size: .74rem; color: var(--violet-600); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.sv-ok { color: #059669; }
.sv-body b { display: block; font-family: var(--font-h); font-size: 1rem; margin: 3px 0; }
.sv-body small { color: var(--muted); font-size: .86rem; }
.sv-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.sv-tut { white-space: nowrap; } .sv-tut svg { width: 15px; height: 15px; }
.sv-unsave { width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--line); background: #fffbeb; color: #f59e0b; display: grid; place-items: center; cursor: pointer; }
.sv-unsave svg { width: 17px; height: 17px; fill: currentColor; }
.sv-unsave:hover { border-color: #f59e0b; }
@media(max-width:560px){ .sv-row { flex-wrap: wrap; } .sv-actions { width: 100%; } .sv-tut { flex: 1; justify-content: center; } }

/* Lista de certificados */
.cert-list { display: flex; flex-direction: column; gap: 10px; }
.cert-row { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px; }
.cert-row.done { border-color: #a7f3d0; background: #f0fdf4; }
.cert-row .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: #fff; flex-shrink: 0; }
.cert-row .ic svg { width: 22px; height: 22px; }
.cert-row .cr-body { flex: 1; min-width: 0; }
.cert-row .cr-body b { font-family: var(--font-h); font-size: .95rem; }
.cert-row .cr-pct { font-family: var(--font-h); font-weight: 700; color: var(--muted-2); }
.cert-open { white-space: nowrap; } .cert-open svg { width: 15px; height: 15px; }

/* Certificado imprimible */
.cert-overlay { position: fixed; inset: 0; z-index: 210; background: rgba(11,13,23,.74); backdrop-filter: blur(4px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px; overflow: auto; animation: fade .2s ease; }
.cert-actions { display: flex; gap: 10px; }
.cert-actions .btn svg { width: 15px; height: 15px; }
.certificate { width: 100%; max-width: 800px; aspect-ratio: 1.414/1; background: #fff; border-radius: 10px; box-shadow: 0 30px 80px rgba(0,0,0,.5); overflow: hidden; }
.cert-border { height: 100%; margin: 14px; border: 2px solid var(--violet); border-radius: 5px; position: relative; }
.cert-border::before { content: ""; position: absolute; inset: 6px; border: 1px solid #e3ddff; border-radius: 3px; pointer-events: none; }
.cert-inner { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 5% 8%; color: #0b0d17; }
.cert-logo { display: flex; align-items: center; gap: 9px; font-family: var(--font-h); font-weight: 700; font-size: 1.05rem; color: #0b0d17; }
.cert-logo img { width: 32px; height: 32px; }
.cert-k { margin-top: 16px; font-family: var(--font-h); letter-spacing: .3em; text-transform: uppercase; font-size: .78rem; color: #5b4de0; }
.cert-line { color: #5b6478; margin-top: 16px; font-size: .95rem; }
.cert-name { font-family: var(--font-h); font-size: clamp(1.8rem,5vw,2.9rem); margin: 6px 0; letter-spacing: -.02em; background: linear-gradient(135deg,#7c6cff,#22d3ee); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.cert-ruta { font-family: var(--font-h); font-size: clamp(1.1rem,3vw,1.55rem); margin-top: 8px; color: #0b0d17; }
.cert-foot { display: flex; align-items: center; gap: 34px; margin-top: auto; padding-top: 22px; }
.cert-foot .cf-i { text-align: center; }
.cert-foot .cf-i b { font-family: var(--font-h); font-size: .95rem; display: block; color: #0b0d17; }
.cert-foot .cf-i span { font-size: .68rem; color: #8a93a6; text-transform: uppercase; letter-spacing: .12em; }
.cert-seal { width: 54px; height: 54px; border-radius: 50%; background: linear-gradient(135deg,#7c6cff,#22d3ee); display: grid; place-items: center; color: #fff; }
.cert-seal svg { width: 26px; height: 26px; }
@media (max-width:560px){ .certificate { aspect-ratio: auto; } .cert-inner { padding: 34px 22px; } }

/* Toast de logro */
.ach-toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px); z-index: 220; background: var(--ink); color: #fff; display: flex; align-items: center; gap: 9px; padding: 12px 20px; border-radius: 100px; box-shadow: var(--shadow-md); opacity: 0; transition: opacity .25s, transform .25s; font-weight: 500; font-size: .92rem; }
.ach-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.ach-toast svg { width: 18px; height: 18px; color: #34d399; }
.ach-toast.badge-toast { background: linear-gradient(135deg, #7c6cff, #22d3ee); padding: 14px 22px; text-align: left; }
.ach-toast.badge-toast .bt-ic { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.2); display: grid; place-items: center; flex-shrink: 0; }
.ach-toast.badge-toast .bt-ic svg { width: 20px; height: 20px; color: #fff; }
.ach-toast.badge-toast b { font-family: var(--font-h); font-size: .95rem; }

/* ---- Gamificación (tarjeta lateral) ---- */
.game-card { }
.game-card .gc-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.gc-level { display: flex; flex-direction: column; }
.gc-level span { font-size: .74rem; color: var(--muted-2); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.gc-level b { font-family: var(--font-h); font-size: 2rem; line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.gc-streak { display: flex; align-items: center; gap: 9px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 8px 13px; opacity: .55; }
.gc-streak.on { opacity: 1; background: #fff7ed; border-color: #fed7aa; }
.gc-streak .flame { font-size: 1.3rem; filter: grayscale(1); }
.gc-streak.on .flame { filter: none; animation: flamePulse 1.6s ease-in-out infinite; }
@keyframes flamePulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.15); } }
.gc-streak b { font-family: var(--font-h); font-size: 1.15rem; line-height: 1; display: block; }
.gc-streak small { font-size: .68rem; color: var(--muted); }
.gc-xp { margin: 16px 0 6px; }
.gc-xp-bar { height: 9px; border-radius: 6px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--line); }
.gc-xp-bar span { display: block; height: 100%; background: var(--grad); border-radius: 6px; transition: width .5s ease; }
.gc-xp small { display: block; margin-top: 7px; font-size: .76rem; color: var(--muted); }
.gc-badges-h { display: flex; align-items: center; justify-content: space-between; margin: 14px 0 10px; font-size: .82rem; }
.gc-badges-h span { font-weight: 600; color: var(--text); }
.gc-badges-h b { font-family: var(--font-h); color: var(--violet-600); }
.gc-badges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.badge-cell { aspect-ratio: 1; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted-2); position: relative; cursor: help; }
.badge-cell svg { width: 20px; height: 20px; }
.badge-cell.got { background: var(--grad-soft); border-color: #d8d0ff; color: var(--violet-600); }
.badge-cell.got::after { content: '✓'; position: absolute; top: -5px; right: -5px; width: 16px; height: 16px; border-radius: 50%; background: #10b981; color: #fff; font-size: .62rem; display: grid; place-items: center; border: 2px solid #fff; }

/* Impresión del certificado */
@media print {
  body.printing > * { display: none !important; }
  body.printing .cert-overlay { display: block !important; position: static; background: none; padding: 0; backdrop-filter: none; overflow: visible; }
  body.printing .cert-actions { display: none !important; }
  body.printing .certificate { box-shadow: none; max-width: 100%; aspect-ratio: auto; min-height: 94vh; }
}

/* ---- Quiz de la lección ---- */
.lec-cta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.lec-cta .lec-tut { margin-top: 0; }
.lec-quiz { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: .82rem; font-weight: 600; color: #b45309; background: #fffbeb; border: 1px solid #fde68a; border-radius: 9px; padding: 7px 12px; cursor: pointer; transition: background .13s; }
.lec-quiz:hover { background: #fef3c7; }
.lec-quiz svg { width: 15px; height: 15px; }

.quiz-ov { position: fixed; inset: 0; z-index: 120; background: rgba(11,13,23,.55); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 18px; }
.quiz-box { width: 100%; max-width: 640px; max-height: 92vh; background: #fff; border-radius: 20px; box-shadow: 0 30px 80px rgba(11,13,23,.4); display: flex; flex-direction: column; overflow: hidden; }
.qz-head { display: flex; align-items: center; justify-content: space-between; padding: 15px 20px; border-bottom: 1px solid var(--line); }
.qz-crumb { display: flex; align-items: center; gap: 9px; font-family: var(--font-h); font-weight: 600; }
.qz-crumb svg { width: 18px; height: 18px; color: var(--violet-600); }
.qz-x { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: var(--muted); background: var(--surface-2); border: none; cursor: pointer; }
.qz-x svg { width: 17px; height: 17px; }
.qz-body { padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 22px; }
.qz-qh { display: flex; gap: 11px; margin-bottom: 12px; align-items: flex-start; }
.qz-qh b { flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-family: var(--font-h); font-size: .85rem; }
.qz-qh p { font-weight: 600; padding-top: 2px; }
.qz-ops { display: flex; flex-direction: column; gap: 9px; padding-left: 37px; }
.qz-op { display: flex; align-items: center; gap: 11px; text-align: left; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; font: inherit; font-size: .94rem; transition: border-color .13s, background .13s; }
.qz-op:hover:not(:disabled) { border-color: var(--violet); }
.qz-mark { flex-shrink: 0; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); transition: .13s; }
.qz-op.sel { border-color: var(--violet); background: var(--grad-soft); }
.qz-op.sel .qz-mark { border-color: var(--violet); background: var(--violet); box-shadow: inset 0 0 0 3px #fff; }
.qz-op.correct { border-color: #10b981; background: #ecfdf5; }
.qz-op.correct .qz-mark { border-color: #10b981; background: #10b981; box-shadow: inset 0 0 0 3px #fff; }
.qz-op.wrong { border-color: #ef4444; background: #fef2f2; }
.qz-op.wrong .qz-mark { border-color: #ef4444; background: #ef4444; box-shadow: inset 0 0 0 3px #fff; }
.qz-op:disabled { cursor: default; }
.qz-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.qz-count { color: var(--muted); font-size: .88rem; }
.qz-result { display: flex; align-items: center; gap: 11px; flex: 1; min-width: 200px; }
.qz-result svg { width: 30px; height: 30px; flex-shrink: 0; }
.qz-result.pass svg { color: #f59e0b; }
.qz-result.fail svg { color: var(--violet-600); }
.qz-result b { font-family: var(--font-h); display: block; }
.qz-result span { font-size: .83rem; color: var(--muted); }

/* ---- Academia por perfil ---- */
.perfil-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 22px 0 6px; padding: 11px 14px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm); }
.pb-left { display: flex; align-items: center; gap: 10px; font-size: .9rem; color: var(--muted); }
.pb-perfil { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-size: .92rem; color: var(--text); background: var(--grad-soft); border: 1px solid #e3ddff; border-radius: 100px; padding: 7px 8px 7px 14px; cursor: pointer; }
.pb-perfil b { font-family: var(--font-h); }
.pb-perfil svg { width: 16px; height: 16px; color: var(--violet-600); }
.pb-perfil svg:last-child { width: 14px; height: 14px; opacity: .55; }
.pb-toggle { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 100px; padding: 3px; }
.pb-toggle button { font: inherit; font-size: .84rem; font-weight: 600; color: var(--muted); background: none; border: none; border-radius: 100px; padding: 7px 14px; cursor: pointer; white-space: nowrap; }
.pb-toggle button.on { background: #fff; color: var(--violet-700); box-shadow: var(--shadow-sm); }

.ruta-aud { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-top: 12px; min-height: 24px; }
.aud-chip { width: 24px; height: 24px; border-radius: 7px; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted-2); }
.aud-chip svg { width: 13px; height: 13px; }
.aud-chip.on { background: var(--grad-soft); border-color: #e3ddff; color: var(--violet-600); }
.aud-mine { display: inline-flex; align-items: center; gap: 4px; font-size: .68rem; font-weight: 700; color: #059669; background: #ecfdf5; border: 1px solid #a7f3d0; padding: 3px 9px; border-radius: 100px; margin-right: 3px; }
.aud-mine svg { width: 12px; height: 12px; }

/* Selector de perfil */
.pf-list { display: flex; flex-direction: column; gap: 10px; }
.pf-card { display: flex; align-items: center; gap: 14px; text-align: left; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); cursor: pointer; transition: border-color .15s, transform .15s, box-shadow .15s, background .15s; width: 100%; }
.pf-card:hover { border-color: var(--violet); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.pf-card.on { border-color: var(--violet); background: var(--grad-soft); }
.pf-ic { width: 46px; height: 46px; border-radius: 13px; background: var(--grad-soft); display: grid; place-items: center; flex-shrink: 0; }
.pf-ic svg { width: 23px; height: 23px; color: var(--violet-600); }
.pf-tx { flex: 1; min-width: 0; }
.pf-tx b { font-family: var(--font-h); font-size: 1rem; display: block; }
.pf-tx small { color: var(--muted); font-size: .84rem; }
.pf-chk { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; color: transparent; flex-shrink: 0; }
.pf-card.on .pf-chk { background: #10b981; border-color: #10b981; color: #fff; }
.pf-chk svg { width: 15px; height: 15px; }

/* Botón "Ver tutorial" en la tarjeta de lección */
.lec-tut { margin-top: 10px; display: inline-flex; align-items: center; gap: 7px; font: inherit; font-size: .82rem; font-weight: 600;
  color: #fff; background: var(--grad); border: none; border-radius: 100px; padding: 8px 14px; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.lec-tut:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(124,108,255,.35); }
.lec-tut svg { width: 15px; height: 15px; }
.lec-soon-tag { margin-top: 10px; display: inline-block; font-size: .76rem; color: var(--muted-2); }

/* ---- Presentación paso a paso ---- */
.tut-pres { position: fixed; inset: 0; z-index: 200; background: var(--surface-2); display: flex; flex-direction: column; animation: fade .2s ease; }
.tp-bar { display: flex; align-items: center; gap: 16px; padding: 14px 22px; background: var(--surface); border-bottom: 1px solid var(--line); }
.tp-crumb { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: .9rem; min-width: 0; }
.tp-crumb svg { width: 18px; height: 18px; color: var(--violet-600); flex-shrink: 0; }
.tp-crumb span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-prog { flex: 1; height: 6px; background: var(--surface-3); border-radius: 100px; overflow: hidden; max-width: 520px; margin: 0 auto; }
.tp-prog-fill { height: 100%; background: var(--grad); border-radius: 100px; transition: width .3s cubic-bezier(.2,.8,.2,1); }
.tp-x { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; color: var(--muted); background: none; border: none; cursor: pointer; }
.tp-x:hover { background: var(--surface-2); color: var(--text); }
.tp-x svg { width: 19px; height: 19px; }

.tp-stage { flex: 1; overflow-y: auto; display: flex; justify-content: center; padding: 40px 22px; }
.tp-slide { width: 100%; max-width: 720px; animation: tpIn .32s cubic-bezier(.2,.8,.2,1); }
@keyframes tpIn { from { opacity: 0; transform: translateY(14px); } }

/* Portada */
.tp-cover { text-align: center; }
.tp-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-h); font-weight: 600; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--violet-600); background: var(--grad-soft); padding: 7px 15px; border-radius: 100px; }
.tp-eyebrow svg { width: 16px; height: 16px; }
.tp-cover h2 { font-family: var(--font-h); font-size: clamp(1.6rem,4vw,2.4rem); margin: 18px 0 8px; letter-spacing: -.02em; }
.tp-cover p { color: var(--muted); max-width: 520px; margin: 0 auto; }
.tp-cover-meta { display: flex; gap: 10px; justify-content: center; margin: 20px 0 26px; flex-wrap: wrap; }
.tp-chip { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 600; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 100px; padding: 5px 12px; }
.tp-chip svg { width: 14px; height: 14px; color: var(--violet-600); }
.tp-toc { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; text-align: left; margin-top: 6px; }
.tp-toc-i { display: flex; align-items: center; gap: 11px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: .9rem; font-weight: 500; }
.tp-toc-i b { font-family: var(--font-h); width: 26px; height: 26px; border-radius: 8px; background: var(--grad-soft); color: var(--violet-700); display: grid; place-items: center; font-size: .82rem; flex-shrink: 0; }
@media(max-width:640px){ .tp-toc { grid-template-columns: 1fr; } }

/* Slide de acción */
.tp-slide-h { margin-bottom: 22px; }
.tp-step { display: inline-block; font-family: var(--font-h); font-size: .74rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--violet-600); margin-bottom: 8px; }
.tp-slide-h h3 { font-family: var(--font-h); font-size: clamp(1.4rem,3.4vw,2rem); letter-spacing: -.02em; }
.tp-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.tp-steps li { display: flex; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 15px 17px; box-shadow: var(--shadow-sm); }
.tp-steps .n { flex-shrink: 0; width: 30px; height: 30px; border-radius: 9px; background: var(--grad); color: #fff; font-family: var(--font-h); font-weight: 700;
  display: grid; place-items: center; font-size: .92rem; }
.tp-steps .t { align-self: center; font-size: 1rem; line-height: 1.5; }
.tp-tip { display: flex; gap: 12px; margin-top: 18px; background: linear-gradient(160deg,#f2f0ff,#eafcff); border: 1px solid #e3ddff; border-radius: 14px; padding: 15px 17px; }
.tp-tip svg { width: 20px; height: 20px; color: var(--violet-600); flex-shrink: 0; margin-top: 1px; }
.tp-tip b { display: block; font-family: var(--font-h); font-size: .9rem; margin-bottom: 2px; }
.tp-tip > div { font-size: .92rem; color: var(--text); }

/* Navegación */
.tp-nav { display: flex; align-items: center; gap: 16px; padding: 14px 22px; background: var(--surface); border-top: 1px solid var(--line); }
.tp-btn { display: inline-flex; align-items: center; gap: 7px; font: inherit; font-family: var(--font-h); font-weight: 600; font-size: .92rem;
  color: var(--text); background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; padding: 11px 18px; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s; }
.tp-btn:hover:not(:disabled) { transform: translateY(-1px); }
.tp-btn:disabled { opacity: .4; cursor: default; }
.tp-btn.primary { background: var(--grad); color: #fff; border-color: transparent; }
.tp-btn.primary:hover { box-shadow: 0 10px 24px rgba(124,108,255,.35); }
.tp-btn svg { width: 16px; height: 16px; }
.tp-btn svg.flip { transform: rotate(180deg); }
.tp-dots { display: flex; gap: 7px; margin: 0 auto; flex-wrap: wrap; justify-content: center; max-width: 60%; }
.tp-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--surface-3); border: 1px solid var(--line); cursor: pointer; transition: transform .15s, background .15s; }
.tp-dot:hover { transform: scale(1.2); }
.tp-dot.on { background: var(--grad); border-color: transparent; }
@media(max-width:560px){ .tp-dots{ display:none; } .tp-btn{ flex:1; justify-content:center; } }

/* ---- Mobile ---- */
.side-toggle { display: none; }
.sidebar-backdrop { display: none; }
@media (max-width: 1200px) {
  .content { grid-template-columns: 1fr; }
  .rail { position: static; flex-direction: row; flex-wrap: wrap; }
  .rail .card { flex: 1; min-width: 260px; }
  .modulos { grid-template-columns: repeat(4,1fr); }
}
@media (max-width: 980px) {
  .rutas { grid-template-columns: repeat(2,1fr); }
  .lms-stats { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 860px) {
  .lms { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 60; width: 264px; transform: translateX(-100%); transition: transform .25s ease; }
  .lms.nav-open .sidebar { transform: none; }
  .lms.nav-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(11,13,23,.4); z-index: 55; }
  .side-toggle { display: grid; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
}
@media (max-width: 620px) {
  .modulos { grid-template-columns: repeat(3,1fr); }
  .rutas { grid-template-columns: 1fr; }
  .topbar { padding: 12px 16px; }
  .content { padding: 20px 16px 50px; }
  .rail .card { min-width: 100%; }
}
@media (max-width: 420px) {
  .lms-stats { grid-template-columns: 1fr; }
  .modulos { grid-template-columns: repeat(2,1fr); }
  .top-user .who { display: none; }
}
