﻿/* =============================================================================
   PORTAL DE DOCUMENTACION - hoja AISLADA
   Se carga globalmente (App.razor) y el portal se abre como ventana dentro de /home,
   asi que TODO va anidado bajo .documentation-portal: ninguna regla puede alcanzar
   el mapa, los paneles ni el resto de la app. Los @keyframes quedan al final, fuera
   del anidamiento (CSS no permite anidarlos).
   ============================================================================= */
.documentation-portal {
  /* Antes en :root / body */
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-synthesis: none;
  color: #1d2a40;
  background: #f4f6fa;
  width: 100%;
  min-height: 100%;

  --navy: #17263d;
  --navy-deep: #111c2e;
  --pink: #ec0bb1;
  --cyan: #21b9d1;
  --green: #38b86a;
  --orange: #ff9f2f;
  --violet: #7667ed;
  --line: #e2e8f0;
  --muted: #748095;
  --gold: #d89d00;

  /* Sistema unico de botones del portal documental */
  --btn-h: 38px;
  --btn-h-sm: 32px;
  --btn-radius: 8px;
  --btn-font: 12px;
  --btn-border: #cbd5e1;
  --btn-border-hover: #94a3b8;

&, & * { box-sizing: border-box; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

&.app-shell { min-height: 100%; background: #f4f6fa; display: flex; flex-direction: column; }
.main-content { min-height: 100%; margin-left: 0; width: 100%; display: flex; flex-direction: column; }
/* TOPBAR FIJO / STICKY */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 70px;
  padding: 0 max(24px, calc((100% - 1440px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.top-brand { display: flex; align-items: center; gap: 14px; }
.top-brand .brand-logo {
  height: 36px;
  width: auto;
  display: block;
  object-fit: contain;
}
.top-brand .brand-mark {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  color: #fff; background: #17263d;
  border-radius: 9px;
  box-shadow: 0 2px 6px rgba(23, 38, 61, 0.2);
}
.top-brand .brand-mark span { font: 800 19px "Inter", system-ui, -apple-system, sans-serif; color: #fff; }
.top-brand > div:last-child { display: flex; flex-direction: column; }
.top-brand strong { font: 700 16px "Inter", system-ui, -apple-system, sans-serif; color: #17243a; letter-spacing: -.3px; }
.top-brand strong small { color: #8792a3; font-weight: 500; }
.eyebrow, .kicker { color: #9b7200; font-size: 9px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; }

.doc-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  border-radius: 8px;
  background: rgba(23, 38, 61, 0.06);
  color: var(--navy);
  border: 1px solid rgba(23, 38, 61, 0.12);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
  white-space: nowrap;
}

.doc-back-link:hover {
  background: var(--navy);
  color: #ffffff;
  border-color: var(--navy);
  box-shadow: 0 2px 8px rgba(23, 38, 61, 0.2);
}

.doc-back-link svg {
  flex-shrink: 0;
  transition: transform 0.2s ease-in-out;
}

.doc-back-link:hover svg {
  transform: translateX(-3px);
}

.top-actions { position: relative; display: flex; align-items: center; gap: 12px; }
.search {
  width: 290px; height: 38px;
  padding: 0 12px;
  display: flex; align-items: center; gap: 9px;
  color: #7e8a9d; background: #f8fafc;
  border: 1px solid #e2e8f0; border-radius: 8px;
  transition: border-color .15s;
}
.search:focus-within { border-color: #263f60; background: #fff; }
.search input { width: 100%; color: #26364e; background: transparent; border: 0; outline: 0; font-size: 12px; }
.search input::placeholder { color: #9ca5b3; }

.icon-button {
  position: relative; width: 38px; height: 38px;
  display: grid; place-items: center;
  color: #5f6d81; background: #fff;
  border: 1px solid var(--line); border-radius: 8px;
  transition: background .15s;
}
.icon-button:hover { background: #f8fafc; }
.icon-button span { position: absolute; top: 7px; right: 8px; width: 6px; height: 6px; background: var(--pink); border: 1px solid #fff; border-radius: 50%; }

.company-pill {
  height: 42px; padding: 0 10px 0 12px;
  display: flex; align-items: center; gap: 9px;
  color: #26364e; background: transparent;
  border: 0; border-left: 1px solid var(--line);
  text-align: left;
}
.company-pill .user-avatar, .company-pill > i {
  width: 32px; height: 32px;
  border-radius: 8px;
  object-fit: cover;
  display: grid; place-items: center;
  color: #fff; background: #20334d;
  font-size: 11px; font-style: normal; font-weight: 700;
}
.company-pill small, .company-pill strong { display: block; }
.company-pill small { color: #8792a3; font-size: 8px; }
.company-pill strong { font-size: 11px; }

.role-menu {
  width: 280px; padding: 10px;
  position: absolute; z-index: 60; top: 52px; right: 0;
  background: #fff; border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 18px 40px rgba(37, 53, 75, 0.16);
}
.role-menu > span { padding: 8px 10px; display: block; color: #8c96a6; font-size: 9px; font-weight: 700; letter-spacing: 1px; }
.role-menu button {
  width: 100%; padding: 10px;
  display: flex; align-items: center; gap: 10px;
  color: #334158; background: transparent;
  border: 0; border-radius: 8px; text-align: left;
  transition: background .15s;
}
.role-menu button:hover, .role-menu button.selected { background: #fff8e5; }
.role-menu button > i {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  color: #fff; background: #20334d;
  border-radius: 8px; font-size: 10px; font-style: normal; font-weight: 700;
}
.role-menu button > b { flex: 1; font-size: 11px; color: #1e293b; }
.role-menu button small { margin-top: 2px; display: block; color: #8490a2; font-size: 9px; font-weight: 400; }
.role-menu button > svg { color: #c48e00; }

/* TABS DE NAVEGACION FIJAS / STICKY */
.context-tabs {
  position: sticky;
  top: 70px;
  z-index: 48;
  height: 48px;
  padding: 0 max(24px, calc((100% - 1440px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #748095; background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.02);
  overflow-x: auto;
}
.context-tabs-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 100%;
  flex-shrink: 0;
}
.context-tabs-nav button, .context-tabs > button {
  height: 100%;
  color: #64748b; background: transparent;
  border: 0; border-bottom: 2px solid transparent;
  font-size: 12px; font-weight: 600;
  padding: 0 14px;
  display: inline-flex; align-items: center; gap: 6px;
  transition: color .15s, border-color .15s;
}
.context-tabs-nav button:hover, .context-tabs > button:hover { color: #17243a; background: #f8fafc; }
.context-tabs-nav button.active, .context-tabs > button.active { color: #17243a; border-bottom-color: var(--gold); font-weight: 700; }
.context-tabs-nav button .tab-badge, .context-tabs > button .tab-badge {
  font-size: 9px; font-weight: 700;
  padding: 2px 6px; border-radius: 12px;
  background: #f1f5f9; color: #475569;
}
.context-tabs-nav button.active .tab-badge, .context-tabs > button.active .tab-badge { background: #fff4d2; color: #8a6500; }

/* SELECTOR DE ORIGEN EN LA BARRA DE NAVEGACION (CON MEJOR ESTILO Y PILLS ELEGANTES) */
.nav-scope-container {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}
.nav-scope-label {
  font-size: 10px;
  font-weight: 700;
  color: #8a97ab;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.nav-scope-badge-systime {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #17263d;
  color: #ffffff;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(23, 38, 61, 0.2);
}
.nav-scope-badge-systime .scope-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pink, #ec0bb1);
  box-shadow: 0 0 6px rgba(236, 11, 177, 0.85);
}
.nav-scope-badge-systime .scope-tag {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(236, 11, 177, 0.25);
  color: #ffd6f4;
  line-height: 1;
}

.nav-scope-switcher {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  border: 1px solid #dce4ee;
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}
.nav-scope-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: #55657e;
  cursor: pointer;
  transition: all .18s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  height: 28px;
  line-height: 1;
}
.nav-scope-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.85);
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.nav-scope-btn.active {
  background: #17263d;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(23, 38, 61, 0.22);
}
.nav-scope-btn .scope-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.nav-scope-btn .dot-systime {
  background: var(--pink, #ec0bb1);
  box-shadow: 0 0 6px rgba(236, 11, 177, 0.8);
}
.nav-scope-btn .dot-workshop {
  background: var(--gold, #d89d00);
  box-shadow: 0 0 6px rgba(216, 157, 0, 0.8);
}
.nav-scope-btn .scope-tag {
  font-size: 8.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 2px 5px;
  border-radius: 4px;
  background: #e2e8f0;
  color: #64748b;
  line-height: 1;
}
.nav-scope-btn.active .scope-tag {
  background: rgba(255, 255, 255, 0.16);
  color: #e2e8f0;
}
.nav-scope-btn.active.systime .scope-tag {
  background: rgba(236, 11, 177, 0.3);
  color: #ffd6f4;
}
.nav-scope-btn.active.workshop .scope-tag {
  background: rgba(216, 157, 0, 0.35);
  color: #fff0be;
}

.doc-page {
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 32px 60px;
  box-sizing: border-box;
}

.welcome-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 22px;
}
.welcome-row h1, .page-title h1 { margin: 4px 0 6px; font: 800 26px "Inter", system-ui, -apple-system, sans-serif; color: #17243a; letter-spacing: -.6px; }
.welcome-row p, .page-title p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.streak {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 18px 10px 12px;
  background: #fff; border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 2px 8px rgba(36, 51, 75, 0.04);
}
.streak > span {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  color: #c28700; background: #fff5d8;
  border-radius: 9px;
}
.streak strong, .streak small { display: block; }
.streak strong { font: 700 12px "Inter", system-ui, -apple-system, sans-serif; color: #17243a; }
.streak small { color: #7f8b9d; font-size: 9px; }

/* HERO CARD */
.hero-card {
  min-height: 250px;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(36, 51, 75, 0.06);
}
.hero-copy { padding: 32px 36px; z-index: 2; }
.badge {
  width: fit-content; padding: 5px 9px;
  display: flex; align-items: center; gap: 6px;
  color: #8a6500; background: #fff4d2;
  border-radius: 5px; font-size: 9px; font-weight: 700; letter-spacing: .8px;
}
.hero-copy h2 { margin: 14px 0 4px; font: 800 24px "Inter", system-ui, -apple-system, sans-serif; color: #17243a; letter-spacing: -.4px; }
.hero-copy > p { margin: 0; color: #748095; font-size: 12px; }
.lesson-line {
  max-width: 460px; margin: 20px 0 8px;
  display: flex; justify-content: space-between;
  color: #748095; font-size: 11px;
}
.lesson-line strong { color: #1e293b; }
.progress-track {
  max-width: 460px; height: 6px;
  overflow: hidden; background: #edf0f4; border-radius: 10px;
}
.progress-track i { height: 100%; display: block; background: var(--gold); border-radius: inherit; }

/* Base compartida: todos los botones de texto del portal miden y respiran igual. */
.primary-button, .outline-button, .danger-button,
.doc-header-btn, .clear-filter-btn {
  height: var(--btn-h); min-height: var(--btn-h); padding: 0 16px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: var(--btn-radius); font-size: var(--btn-font); font-weight: 700; line-height: 1;
  box-sizing: border-box; white-space: nowrap; cursor: pointer;
  transition: all .15s ease;
}
/* Variante primaria (navy) */
.primary-button, .doc-header-btn-primary, .clear-filter-btn {
  color: #fff; background: var(--navy);
  border: 1px solid var(--navy); box-shadow: 0 1px 2px rgba(23, 38, 61, 0.16);
}
.primary-button:hover:not(:disabled), .doc-header-btn-primary:hover, .clear-filter-btn:hover {
  background: #223656; border-color: #223656;
  box-shadow: 0 4px 10px rgba(23, 38, 61, 0.22);
}
/* Variante secundaria (contorno) */
.outline-button, .doc-header-btn-outline, .doc-header-btn-trash {
  color: #334155; background: #fff;
  border: 1px solid var(--btn-border); box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}
.outline-button:hover:not(:disabled), .doc-header-btn-outline:hover, .doc-header-btn-trash:hover {
  color: #0f172a; background: #f8fafc; border-color: var(--btn-border-hover);
}
.primary-button:disabled {
  opacity: 0.55;
  cursor: not-allowed !important;
  transform: none !important;
  box-shadow: none !important;
}
.outline-button:disabled {
  opacity: 0.55;
  cursor: not-allowed !important;
  transform: none !important;
  box-shadow: none !important;
}
.primary-button:disabled:hover,
.outline-button:disabled:hover {
  transform: none !important;
  box-shadow: none !important;
}

.hero-visual {
  position: relative;
  display: flex; align-items: flex-end; justify-content: flex-end;
  padding-right: 20px; overflow: hidden;
}
.mock-window {
  width: 95%; max-width: 420px; height: 215px;
  position: relative; bottom: 0;
  background: #f1f5f9; border: 4px solid #cbd5e1; border-bottom: 0;
  border-radius: 10px 10px 0 0;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  display: flex; flex-direction: column;
}
.mock-top {
  height: 24px; padding: 0 10px;
  display: flex; align-items: center; gap: 4px;
  background: #fff; border-bottom: 1px solid #e2e8f0;
}
.mock-top i { width: 6px; height: 6px; background: #cbd5e1; border-radius: 50%; }
.mock-top i:first-child { background: #ef4444; }
.mock-top i:nth-child(2) { background: #f59e0b; }
.mock-top i:nth-child(3) { background: #10b981; }
.mock-top span { width: 40%; height: 6px; margin-left: 10px; background: #f1f5f9; border-radius: 4px; }
.mock-body { flex: 1; display: flex; }
.mock-rail {
  width: 34px; padding-top: 10px;
  display: flex; align-items: center; flex-direction: column; gap: 10px;
  background: #1e293b;
}
.mock-rail b { width: 12px; height: 12px; background: #64748b; border-radius: 3px; }
.mock-rail b:first-child { background: var(--gold); }
.mock-board { flex: 1; padding: 12px; }
.mock-title { width: 80px; height: 6px; display: block; background: #94a3b8; border-radius: 4px; }
.mock-columns {
  height: 135px; margin-top: 10px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
}
.mock-columns > i { padding: 6px 4px; background: #e2e8f0; border-top: 5px solid var(--cyan); border-radius: 4px; }
.mock-columns > i:nth-child(2) { border-color: var(--violet); }
.mock-columns > i:nth-child(3) { border-color: var(--orange); }
.mock-columns b { height: 24px; margin-bottom: 5px; display: block; background: #fff; border-radius: 3px; }

.floating-tip {
  position: absolute; right: 28px; bottom: 24px;
  padding: 8px 12px; display: flex; align-items: center; gap: 7px;
  color: #1e293b; background: #fff;
  border: 1px solid #e2e8f0; border-radius: 8px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
  font-size: 10px; font-weight: 700;
}
.floating-tip svg { color: var(--pink); }

/* GRID DE INICIO Y LISTA DE MODULOS */
.dashboard-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, .75fr);
  gap: 20px;
}
.card {
  background: #fff; border: 1px solid var(--line);
  border-radius: 14px; box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
}
.modules-card, .progress-card { padding: 22px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 12px; }
.section-heading h2 { margin: 2px 0 0; font: 800 17px "Inter", system-ui, -apple-system, sans-serif; color: #17243a; letter-spacing: -.3px; }
.section-heading > button { display: flex; align-items: center; gap: 4px; color: #b31673; background: transparent; border: 0; font-size: 11px; font-weight: 700; }

.module-list { display: flex; flex-direction: column; gap: 2px; }
.module-row {
  width: 100%; min-height: 66px; padding: 12px 8px;
  display: grid; grid-template-columns: 40px minmax(180px, 1fr) 90px 75px 20px;
  align-items: center; gap: 12px;
  color: inherit; background: transparent;
  border: 0; border-top: 1px solid #f1f5f9;
  text-align: left; transition: background .15s;
}
.module-row:hover { background: #fafbfc; border-radius: 8px; }
.module-icon {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  color: #178fa2; background: #e3f8fb;
  border-radius: 9px; font: 700 11px "Inter", system-ui, -apple-system, sans-serif;
}
.module-icon.violet { color: #6658d5; background: #efedff; }
.module-icon.orange { color: #db8015; background: #fff2df; }
.module-icon.green { color: #269854; background: #e7f8ed; }

.module-info strong { display: block; font: 700 12px "Inter", system-ui, -apple-system, sans-serif; color: #17243a; }
.module-meta {
  margin-top: 4px;
  display: flex; align-items: center; gap: 6px;
  color: #8490a2; font-size: 11px;
  white-space: nowrap;
}
.meta-dot {
  width: 3px; height: 3px;
  background: #aab2bf; border-radius: 50%;
  display: inline-block; flex-shrink: 0;
}
.mini-progress { height: 4px; overflow: hidden; background: #edf0f4; border-radius: 5px; }
.mini-progress i { height: 100%; display: block; background: var(--gold); border-radius: inherit; }
.module-status { color: #8490a2; font-size: 10px; font-weight: 600; text-align: right; }

.right-column { display: flex; flex-direction: column; gap: 18px; }
.progress-summary { margin: 16px 0; display: flex; align-items: center; gap: 24px; }
.progress-ring {
  --progress: 0deg;
  width: 100px; height: 100px;
  display: grid; place-items: center; flex: 0 0 auto;
  background: conic-gradient(var(--gold) var(--progress), #edf0f4 0);
  border-radius: 50%;
}
.progress-ring > div {
  width: 80px; height: 80px;
  display: grid; align-content: center; text-align: center;
  background: #fff; border-radius: 50%;
}
.progress-ring strong { font: 800 18px "Inter", system-ui, -apple-system, sans-serif; color: #17243a; }
.progress-ring span { margin-top: 1px; color: #8792a3; font-size: 8px; text-transform: uppercase; }
.progress-stats { display: flex; flex-direction: column; gap: 10px; }
.progress-stats span + span { padding-top: 10px; border-top: 1px solid var(--line); }
.progress-stats strong { font: 800 15px "Inter", system-ui, -apple-system, sans-serif; color: #17243a; display: block; }
.progress-stats small { color: #8792a3; font-size: 9px; display: block; }

.goal {
  padding: 12px; display: flex; align-items: center; gap: 10px;
  background: #f7f8fa; border-radius: 9px;
}
.goal > span {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  color: #bc8300; background: #fff1c9; border-radius: 7px;
}
.goal strong, .goal small { display: block; }
.goal strong { font-size: 11px; font-weight: 700; color: #1e293b; }
.goal small { color: #8490a2; font-size: 9px; }
.goal div { flex: 1; }
.goal b { font-size: 11px; color: #1e293b; }

.certificate-card {
  padding: 18px; display: grid; grid-template-columns: 42px 1fr; gap: 12px;
  background: linear-gradient(135deg, #fff, #faf7ff);
}
.certificate-icon {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  color: var(--violet); background: #efedff; border-radius: 10px;
}
.certificate-card h3 { margin: 2px 0 3px; font: 800 13px "Inter", system-ui, -apple-system, sans-serif; color: #17243a; }
.certificate-card p { margin: 0; color: #818da0; font-size: 10px; line-height: 1.4; }
.certificate-card button {
  grid-column: 2; width: fit-content; padding: 0; margin-top: 6px;
  display: flex; align-items: center; gap: 3px;
  color: #b31673; background: transparent; border: 0; font-size: 10px; font-weight: 700;
}

/* CATÁLOGO DE DOCUMENTOS */
.page-title {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; margin-bottom: 22px;
}

/* BARRA DE FILTRO ACTIVO */
.active-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 18px;
  background: #ffffff;
  border: 1px solid #dce4ee;
  border-radius: 10px;
  margin-bottom: 20px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

.active-filter-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #1e293b;
}

.active-filter-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: #e0f2fe;
  color: #0369a1;
  border-radius: 7px;
  flex-shrink: 0;
}

.active-filter-info strong {
  color: var(--navy, #17263d);
  font-weight: 700;
}

/* .clear-filter-btn hereda el estilo del sistema único de botones (ver .primary-button) */
.clear-filter-btn span {
  font-size: 13px;
  line-height: 1;
}

.category-chips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.category-chip {
  padding: 7px 16px; background: #fff;
  border: 1px solid #dfe4eb; border-radius: 20px;
  font-size: 12px; font-weight: 600; color: #607087;
  cursor: pointer; transition: all .15s;
}
.category-chip:hover { border-color: #cbd5e1; color: #1e293b; }
.category-chip.active { color: #fff; background: var(--navy); border-color: var(--navy); }

.doc-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
/* .doc-header-btn* heredan del sistema único de botones (ver .primary-button / .outline-button) */
.trash-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 10px;
  background: #ef4444;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  margin-left: 2px;
}

.doc-technician-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  background: #f1f5f9;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.doc-empty-card {
  grid-column: 1 / -1;
  padding: 48px;
  text-align: center;
}

.doc-empty-text {
  color: #64748b;
  font-size: 14px;
  margin: 0 0 12px;
}

.doc-empty-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  align-items: stretch;
}

.doc-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
  transition: transform .15s, box-shadow .15s;
}

.doc-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.doc-card-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

.doc-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.doc-card-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.doc-card-type {
  color: #8a95a8;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.doc-title {
  margin: 0 0 6px;
  font: 700 15px "Inter", system-ui, -apple-system, sans-serif;
  color: #17243a;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  min-height: 2.6em;
}

.doc-summary {
  margin: 0 0 14px;
  color: #748095;
  font-size: 12px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  min-height: 3.9em;
}

.doc-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: #f0f3f6;
  color: #506176;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.doc-card-badge.gold {
  color: #8a6500;
  background: #fff4d2;
}

.doc-card-badge.blue {
  color: #1e40af;
  background: #dbeafe;
}

.route-scope-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .5px;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 6px;
}

.badge-systime-global {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.badge-workshop-local {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.doc-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #edf0f4;
  padding-top: 12px;
  margin-top: auto;
}

.doc-time-estimate {
  font-size: 11px;
  color: #8a95a8;
  display: flex;
  align-items: center;
  gap: 5px;
}

.doc-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Botones compactos (tarjetas y paginación): mismo alto, radio y contorno. */
.doc-action-btn-delete,
.doc-action-btn-edit,
.doc-action-btn-read,
.doc-page-btn {
  height: var(--btn-h-sm);
  min-width: var(--btn-h-sm);
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #fff;
  color: #334155;
  border: 1px solid var(--btn-border);
  border-radius: var(--btn-radius);
  font-size: var(--btn-font);
  font-weight: 700;
  line-height: 1;
  box-sizing: border-box;
  white-space: nowrap;
  cursor: pointer;
  transition: all .15s ease;
}

/* Solo icono: cuadrado perfecto */
.doc-action-btn-delete,
.doc-action-btn-edit {
  width: var(--btn-h-sm);
  padding: 0;
}

.doc-action-btn-edit { color: #2563eb; }
.doc-action-btn-delete { color: #dc2626; }

.doc-action-btn-read:hover,
.doc-action-btn-edit:hover,
.doc-action-btn-delete:hover {
  background: #f8fafc;
  border-color: var(--btn-border-hover);
}
.doc-action-btn-edit:hover { color: #1d4ed8; }
.doc-action-btn-delete:hover { color: #b91c1c; background: #fef2f2; border-color: #fca5a5; }

/* =============================================================================
   PAGINACIÓN DEL CATÁLOGO DE DOCUMENTOS
   ============================================================================= */
.doc-pagination-bar {
  margin-top: 24px;
  padding: 14px 20px;
  background: #ffffff;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.doc-pagination-simple {
  justify-content: space-between;
}

.doc-pagination-info {
  font-size: 12.5px;
  color: #64748b;
  font-weight: 500;
}

.doc-pagination-info strong {
  color: #17243a;
  font-weight: 700;
}

.doc-pagination-controls {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

/* .doc-page-btn: geometría y contorno vienen del grupo de botones compactos (ver .doc-action-btn-*) */
.doc-page-btn:hover:not(:disabled):not(.active) {
  background: #f8fafc;
  border-color: var(--btn-border-hover);
  color: #0f172a;
}

.doc-page-btn.active {
  background: var(--navy, #17263d);
  color: #ffffff;
  border-color: var(--navy, #17263d);
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(23, 38, 61, 0.2);
}

.doc-page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #94a3b8;
}

.doc-page-nav-btn {
  padding: 0 14px;
}

.doc-page-ellipsis {
  padding: 0 5px;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 700;
  user-select: none;
}

@media (max-width: 768px) {
  .doc-pagination-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .doc-pagination-controls {
    justify-content: center;
  }
  .doc-pagination-info {
    justify-content: center;
    text-align: center;
  }
}

.route-link-banner {
  padding: 9px 12px; margin-bottom: 12px;
  display: flex; align-items: center; justify-content: space-between;
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px;
  font-size: 11px; color: #475569;
}
.route-link-banner button {
  background: transparent; border: 0; color: #263f60;
  font-weight: 700; font-size: 11px;
  display: inline-flex; align-items: center; gap: 4px;
}
.route-link-banner button:hover { color: var(--gold); }

/* MODAL DE CREACIÓN */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-box {
  width: 92vw; max-width: 1040px; max-height: 90vh;
  background: #fff; border-radius: 14px;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35);
  display: flex; flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.8);
}
.modal-top {
  flex-shrink: 0; padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  background: #fff;
}
.modal-top strong { font: 800 17px "Inter", system-ui, -apple-system, sans-serif; color: #17243a; }
.modal-nav {
  flex-shrink: 0; display: flex; gap: 10px;
  padding: 10px 24px; background: #f8fafc;
  border-bottom: 1px solid var(--line);
}
.modal-nav button {
  padding: 6px 14px; border: 1px solid transparent;
  background: transparent; border-radius: 6px;
  font-size: 12px; font-weight: 600; color: #64748b;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all .15s;
}
.modal-nav button.active {
  background: #fff; border-color: #cbd5e1;
  color: #17243a; box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.modal-form {
  display: flex; flex-direction: column;
  flex: 1 1 auto; min-height: 0; overflow: hidden;
}
.modal-scrollable-body {
  flex: 1 1 auto; overflow-y: auto;
  padding: 22px 24px;
}
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block; margin-bottom: 6px;
  font-size: 11px; font-weight: 700; color: #475569;
  text-transform: uppercase; letter-spacing: .5px;
}
.form-input, .form-select {
  width: 100%;
  height: 40px;
  padding: 0 14px;
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  outline: 0;
  color: #17243a;
  transition: border-color .15s ease, box-shadow .15s ease;
  box-sizing: border-box;
}
.form-input::placeholder {
  color: #94a3b8;
}
.form-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px 14px;
  padding-right: 36px;
  cursor: pointer;
}
.form-select:disabled {
  background-color: #f8fafc;
  color: #64748b;
  cursor: not-allowed;
  opacity: 0.9;
}
.form-input:focus, .form-select:focus {
  border-color: #263f60;
  box-shadow: 0 0 0 3px rgba(38, 63, 96, 0.1);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}
.form-row-bottom {
  align-items: end;
}
.form-row-bottom .form-group {
  margin-bottom: 0;
}

/* SECCIONES NUMERADAS DE PASOS DE FORMULARIOS */
.form-step-section {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

.form-step-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}

.form-step-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--navy, #17263d);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(23, 38, 61, 0.25);
}

.form-step-title {
  font: 800 15px "Inter", system-ui, -apple-system, sans-serif;
  color: #17263d;
  margin: 0;
}

.form-step-desc {
  display: block;
  font-size: 11.5px;
  color: #64748b;
  margin-top: 2px;
}

.modal-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 8px;
}

.mode-tab-btn {
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  border: 1.5px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  font-size: 12.5px;
  font-weight: 700;
  transition: all 0.15s ease;
  cursor: pointer;
}

.mode-tab-btn:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}

.mode-tab-btn.active {
  background: #ffffff;
  border-color: var(--navy, #17263d);
  color: var(--navy, #17263d);
  box-shadow: 0 2px 8px rgba(23, 38, 61, 0.08);
}

.route-modules-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* TINYMCE SHELL Y RESIZE DE IMÁGENES */
.tinymce-shell {
  position: relative;
  border: 1px solid #dbe1e8; border-radius: 8px;
  background: #fff; overflow: visible;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  margin-top: 4px;
}
.tinymce-menubar {
  height: 30px; padding: 0 12px;
  display: flex; align-items: center; gap: 16px;
  background: #fbfcfd; border-bottom: 1px solid #edf0f4;
  font-size: 11px; color: #64748b;
  border-radius: 8px 8px 0 0;
}
.tinymce-menubar span { cursor: pointer; transition: color .15s; }
.tinymce-menubar span:hover { color: #0f172a; }

.tinymce-toolbar {
  padding: 7px 10px;
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
  background: #fff; border-bottom: 1px solid #edf0f4;
}
.tb-btn {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  color: #475569; background: transparent;
  border: 1px solid transparent; border-radius: 5px;
  transition: .15s;
}
.tb-btn:hover { background: #f1f5f9; color: #0f172a; border-color: #e2e8f0; }
.tb-btn.active { background: #e2e8f0; color: #0f172a; }
.tb-btn-text {
  height: 30px; padding: 0 9px;
  display: inline-flex; align-items: center; gap: 5px;
  color: #263f60; background: #f1f5f9;
  border: 1px solid #dbe1e8; border-radius: 5px;
  font-size: 11px; font-weight: 600;
  transition: .15s;
}
.tb-btn-text:hover { background: #e2e8f0; color: #0f172a; }
.tb-btn-primary {
  background: #fff4d2; border-color: #edd99c; color: #8a6500;
}
.tb-btn-primary:hover { background: #ffecb5; color: #6d4f00; }
.tb-sep { width: 1px; height: 18px; background: #e2e8f0; margin: 0 4px; flex-shrink: 0; }
.tb-select {
  height: 30px; padding: 0 8px;
  border: 1px solid #dbe1e8; border-radius: 5px;
  font-size: 11px; color: #334155; background: #f8fafc;
  outline: 0;
}
.tb-select:focus { border-color: #263f60; background: #fff; }

.tinymce-canvas {
  min-height: 240px; max-height: 360px;
  padding: 16px 20px; overflow-y: auto; outline: 0;
  font-size: 14px; line-height: 1.65; color: #1e293b; background: #fff;
  border-radius: 0 0 8px 8px;
}
.tinymce-canvas:empty:before {
  content: attr(placeholder); color: #94a3b8; pointer-events: none;
}
.tinymce-canvas h1 { font-size: 22px; margin: 10px 0 6px; color: #0f172a; font-family: "Inter", system-ui, -apple-system, sans-serif; font-weight: 800; }
.tinymce-canvas h2 { font-size: 18px; margin: 8px 0 4px; color: #1e293b; font-family: "Inter", system-ui, -apple-system, sans-serif; font-weight: 700; }
.tinymce-canvas h3 { font-size: 15px; margin: 6px 0 3px; color: #334155; font-family: "Inter", system-ui, -apple-system, sans-serif; font-weight: 700; }
.tinymce-canvas blockquote {
  background: #fffbf0;
  margin: 12px 0; padding: 8px 14px; color: #614d13; border-radius: 0 6px 6px 0;
}
.tinymce-canvas .editor-callout,
.tinymce-rendered-view .editor-callout {
  padding: 12px 16px; margin: 14px 0;
  border-radius: 8px; border: 1px solid #dbeafe; background: #f8fafc;
  color: #1e293b; font-size: 13.5px; line-height: 1.55;
}
.tinymce-canvas .editor-callout.warning,
.tinymce-rendered-view .editor-callout.warning {
  border-color: #fde68a; background: #fffbeb; color: #92400e;
}

/* CONTENEDOR E IMÁGENES REDIMENSIONABLES (SIN CAPTIONS NI TEXTOS EXTRA) */
.editor-image-wrap {
  margin: 14px 0;
  display: block;
  text-align: center;
}
.resizable-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid #dbe1e8;
  box-shadow: 0 3px 12px rgba(0,0,0,0.06);
  cursor: pointer;
  transition: outline .15s, box-shadow .15s;
}
.resizable-image:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
.selected-image-outline {
  outline: 2px solid var(--pink) !important;
  outline-offset: 2px;
}

/* =============================================================================
   RESIZADOR INTERACTIVO DIRECTO CON MANIJAS EN BORDES Y ESQUINAS
   ============================================================================= */
.image-resizer-box {
  position: absolute;
  z-index: 120;
  pointer-events: none;
  box-sizing: border-box;
}

/* Marco delimitador */
.resizer-border {
  position: absolute;
  inset: 0;
  border: 2px solid var(--pink);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.9), 0 2px 10px rgba(236, 11, 177, 0.25);
  border-radius: 4px;
  pointer-events: none;
}

/* Manijas generales */
.resizer-handle {
  position: absolute;
  background: #ffffff;
  border: 2px solid var(--pink);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  pointer-events: auto;
  z-index: 125;
  transition: transform .1s ease, background .1s ease;
  box-sizing: border-box;
}
.resizer-handle:hover {
  background: var(--pink);
  border-color: #ffffff;
  transform: scale(1.25);
}

/* 4 Manijas de Esquinas (Cuadrados 11x11px para ajustar tamaño proporcional y libre) */
.handle-nw {
  width: 11px; height: 11px;
  top: -5px; left: -5px;
  cursor: nwse-resize;
  border-radius: 2px;
}
.handle-ne {
  width: 11px; height: 11px;
  top: -5px; right: -5px;
  cursor: nesw-resize;
  border-radius: 2px;
}
.handle-sw {
  width: 11px; height: 11px;
  bottom: -5px; left: -5px;
  cursor: nesw-resize;
  border-radius: 2px;
}
.handle-se {
  width: 11px; height: 11px;
  bottom: -5px; right: -5px;
  cursor: nwse-resize;
  border-radius: 2px;
}

/* 2 Manijas Laterales (Píldoras verticales 7x24px para agarrar lateralmente y ajustar ancho) */
.handle-w {
  width: 7px; height: 24px;
  top: 50%; left: -4px;
  transform: translateY(-50%);
  cursor: ew-resize;
  border-radius: 4px;
}
.handle-w:hover {
  transform: translateY(-50%) scale(1.25);
}
.handle-e {
  width: 7px; height: 24px;
  top: 50%; right: -4px;
  transform: translateY(-50%);
  cursor: ew-resize;
  border-radius: 4px;
}
.handle-e:hover {
  transform: translateY(-50%) scale(1.25);
}

/* 2 Manijas Superior e Inferior (Píldoras horizontales 24x7px para ajustar alto/largo) */
.handle-n {
  width: 24px; height: 7px;
  top: -4px; left: 50%;
  transform: translateX(-50%);
  cursor: ns-resize;
  border-radius: 4px;
}
.handle-n:hover {
  transform: translateX(-50%) scale(1.25);
}
.handle-s {
  width: 24px; height: 7px;
  bottom: -4px; left: 50%;
  transform: translateX(-50%);
  cursor: ns-resize;
  border-radius: 4px;
}
.handle-s:hover {
  transform: translateX(-50%) scale(1.25);
}

/* Badge con las dimensiones actuales en px */
.resizer-dim-badge {
  position: absolute;
  bottom: -26px;
  left: 50%;
  transform: translateX(-50%);
  background: #111c2e;
  color: #fff;
  border: 1px solid #28364b;
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .3px;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  pointer-events: none;
  z-index: 122;
}

/* Barra flotante compacta de acciones rápidas (Alinear y Eliminar) */
.resizer-quick-bar {
  position: absolute;
  top: -36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 3px;
  background: #111c2e;
  border: 1px solid #28364b;
  border-radius: 6px;
  padding: 3px 6px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.3);
  pointer-events: auto;
  z-index: 130;
}
.resizer-action-btn {
  height: 22px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  color: #c7d0df;
  border: 0;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
}
.resizer-action-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}
.resizer-action-sep {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.15);
  margin: 0 2px;
}
.resizer-btn-del {
  background: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
}
.resizer-btn-del:hover {
  background: rgba(239, 68, 68, 0.45);
  color: #fff;
}

/* TOPBAR SCOPE SWITCHER (PROYECTO SYSTIME VS TALLER) */
.top-scope-switcher {
  display: inline-flex;
  align-items: center;
  background: #101c2e;
  border: 1px solid #283a52;
  border-radius: 9px;
  padding: 3px;
  gap: 2px;
}
.top-scope-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: #8da0b8;
  cursor: pointer;
  transition: all .15s ease;
  text-align: left;
}
.top-scope-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.top-scope-btn.active {
  background: #1c2e47;
  color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
.top-scope-btn.active.systime {
  border-bottom: 2px solid var(--pink, #ec0bb1);
}
.top-scope-btn.active.workshop {
  border-bottom: 2px solid var(--gold, #d89d00);
}
.scope-labels {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.scope-labels strong {
  font-size: 11px;
  font-weight: 700;
}
.scope-labels small {
  font-size: 8px;
  color: #72849c;
  letter-spacing: .3px;
  text-transform: uppercase;
}
.top-scope-btn.active .scope-labels small {
  color: #a4b6cf;
}
.scope-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-systime {
  background: var(--pink, #ec0bb1);
  box-shadow: 0 0 6px rgba(236, 11, 177, 0.6);
}
.dot-workshop {
  background: var(--gold, #d89d00);
  box-shadow: 0 0 6px rgba(216, 157, 0, 0.6);
}

/* GESTOR DE CATEGORÍAS */
.cat-manager-modal {
  width: 92vw;
  max-width: 1040px;
  max-height: 90vh;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.4);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.cat-manager-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 24px;
}

.cat-manager-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 768px) {
  .cat-manager-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.cat-create-panel {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cat-create-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 14px;
}

.cat-create-header .tax-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--pink, #ec0bb1);
  text-transform: uppercase;
}

.cat-create-header h3 {
  font: 800 16px "Inter", system-ui, -apple-system, sans-serif;
  color: #17263d;
  margin: 0;
}

.cat-create-header p {
  font-size: 11.5px;
  color: #64748b;
  margin: 0;
  line-height: 1.45;
}

.color-select-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.color-swatch-dot {
  position: absolute;
  left: 12px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.color-swatch-dot.dot-cyan { background: #21b9d1; }
.color-swatch-dot.dot-violet { background: #8b5cf6; }
.color-swatch-dot.dot-pink { background: #ec0bb1; }
.color-swatch-dot.dot-orange { background: #f97316; }
.color-swatch-dot.dot-green { background: #10b981; }

.color-select-wrap .form-select {
  padding-left: 36px;
}

/* PALETA VISUAL DE SWATCHES PARA GESTOR DE CATEGORÍAS */
.cat-color-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
  margin-top: 4px;
}

.cat-palette-swatch-btn {
  height: 38px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  transition: all 0.15s ease;
  cursor: pointer;
}

.cat-palette-swatch-btn:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.cat-palette-swatch-btn.selected {
  border-color: var(--navy, #17263d);
  background: #f1f5f9;
  color: #0f172a;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.swatch-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}

.swatch-dot.dot-cyan { background: #21b9d1; }
.swatch-dot.dot-violet { background: #8b5cf6; }
.swatch-dot.dot-pink { background: #ec0bb1; }
.swatch-dot.dot-orange { background: #f97316; }
.swatch-dot.dot-green { background: #10b981; }

.swatch-name {
  flex: 1;
  text-align: left;
}

.swatch-check {
  font-weight: 800;
  color: var(--navy, #17263d);
}

.cat-list-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}

.cat-list-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 4px;
}

.cat-list-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cat-list-title {
  font: 800 15px "Inter", system-ui, -apple-system, sans-serif;
  color: #17263d;
  margin: 0;
}

.cat-list-count-badge {
  background: #e2e8f0;
  color: #334155;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
}

.cat-list-tip {
  font-size: 11.5px;
  color: #64748b;
}

.cat-manager-cards-scroll {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 54vh;
  overflow-y: auto;
  padding-right: 4px;
}

.cat-manager-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

.cat-manager-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
}

/* The category color lives on its order badge (no side stripe on the card). */
.cat-manager-card.color-cyan .cat-order-badge { background: #21b9d1; color: #fff; }
.cat-manager-card.color-violet .cat-order-badge { background: #8b5cf6; color: #fff; }
.cat-manager-card.color-pink .cat-order-badge { background: #ec0bb1; color: #fff; }
.cat-manager-card.color-orange .cat-order-badge { background: #f97316; color: #fff; }
.cat-manager-card.color-green .cat-order-badge { background: #10b981; color: #fff; }


.cat-card-info {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.cat-order-badge {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #334155;
  font-size: 11px;
  font-weight: 800;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 1px solid #e2e8f0;
}

.cat-card-details {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.cat-card-details strong {
  font: 700 13.5px "Inter", system-ui, -apple-system, sans-serif;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cat-card-details p {
  font-size: 11.5px;
  color: #64748b;
  margin: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cat-doc-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  background: #f1f5f9;
  color: #475569;
  padding: 2px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.cat-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: 12px;
}

.cat-action-btn {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 11px;
  padding: 0;
}

.cat-action-btn:hover:not([disabled]) {
  background: #17263d;
  color: #ffffff;
  border-color: #17263d;
}

.cat-action-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.cat-delete-btn {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  color: #ef4444;
  cursor: pointer;
  transition: all 0.15s;
  padding: 0;
}

.cat-delete-btn:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
}

/* Backward compatibility for previous row class */
.cat-manager-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 8px;
  transition: all .15s;
}
.reorder-btn {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  color: #334155;
  cursor: pointer;
  transition: all .15s;
  font-size: 11px;
}
.reorder-btn:hover:not([disabled]) {
  background: #17263d;
  color: #fff;
  border-color: #17263d;
}

/* MODAL DE RUTA FORMATIVA REDISEÑADO */
.route-modal-card {
  width: 92vw;
  max-width: 960px;
  max-height: 90vh;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.4);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.route-modal-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.route-module-builder-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
  transition: border-color 0.15s;
}

.route-module-builder-item:hover {
  border-color: #cbd5e1;
}

.route-module-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.route-module-tag {
  font-size: 11px;
  font-weight: 800;
  color: #17263d;
  letter-spacing: 0.5px;
}

.route-module-step {
  font-size: 11px;
  color: #64748b;
}

/* RUTAS FORMATIVAS Y SELECTORES */
.route-scope-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .5px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
}
.badge-systime-global {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}
.badge-workshop-local {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}
.route-filter-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0;
  flex-wrap: wrap;
}
.route-filter-btn {
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
}
.route-filter-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}
.route-filter-btn.active {
  background: #17263d;
  color: #fff;
  border-color: #17263d;
}
.route-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.route-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: all .2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.route-card:hover {
  border-color: #94a3b8;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.06);
}
.route-card.selected {
  border: 2px solid var(--pink, #ec0bb1);
  box-shadow: 0 0 0 1px var(--pink, #ec0bb1), 0 8px 20px rgba(236, 11, 177, 0.12);
}

.tinymce-statusbar {
  height: 28px; padding: 0 14px;
  display: flex; align-items: center; justify-content: space-between;
  background: #f8fafc; border-top: 1px solid #edf0f4;
  color: #8b95a5; font-size: 11px;
}

/* ZONA DE SUBIDA DRAG & DROP */
.dropzone-box {
  border: 2px dashed #cbd5e1; border-radius: 10px;
  padding: 34px 20px; text-align: center; background: #f8fafc;
  cursor: pointer; transition: .2s;
}
.dropzone-box:hover { border-color: #263f60; background: #fff; }
.dropzone-icon {
  width: 48px; height: 48px; margin: 0 auto 12px;
  display: grid; place-items: center;
  color: #263f60; background: #e2e8f0; border-radius: 50%;
}
.file-chip-preview {
  margin-top: 14px; padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 8px;
}

/* FOOTER DEL MODAL ANCLADO AL FONDO (NUNCA SE CORTA) */
.modal-footer {
  flex-shrink: 0; padding: 14px 24px;
  background: #f8fafc; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: flex-end; gap: 12px;
}

/* SIMULADOR GERENCIAL */
.score-pill { min-width: 140px; padding: 10px 16px; color: #fff; background: var(--navy, #17263d); border-radius: 12px; text-align: right; }
.score-pill span { display: block; color: #94a3b8; font-size: 11px; font-weight: 600; letter-spacing: 0.6px; }
.score-pill strong { font: 800 20px "Inter", system-ui, -apple-system, sans-serif; }
.game-progress { max-width: 820px; margin: 8px auto 22px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.game-progress span { position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; color: #64748b; font-size: 12.5px; font-weight: 600; }
.game-progress span::after { content: ""; width: 48px; height: 1px; position: absolute; left: calc(100% + 8px); background: #cbd5e1; }
.game-progress span:last-child::after { display: none; }
.game-progress i { width: 28px; height: 28px; display: grid; place-items: center; color: #64748b; background: #fff; border: 1px solid #cbd5e1; border-radius: 50%; font-size: 12px; font-style: normal; font-weight: 700; }
.game-progress span.active { color: #0f172a; font-weight: 700; }
.game-progress span.active i { color: #17263d; background: var(--app-selected-soft, #fbf3d4); border-color: var(--gold, #d89d00); box-shadow: 0 0 0 3px rgba(216, 157, 0, 0.18); }
.game-progress span.done { color: #15803d; }
.game-progress span.done i { color: #fff; background: #16a34a; border-color: #16a34a; }

.simulator-shell { overflow: hidden; background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06); }
.sim-topbar { min-height: 46px; padding: 8px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: #e2e8f0; background: #17263d; font-size: 12.5px; }
.sim-topbar > div { display: flex; align-items: center; gap: 10px; }
.sim-topbar > div i { width: 16px; height: 16px; display: block; background: #10b981; border: 3px solid rgba(255, 255, 255, 0.25); border-radius: 50%; }
.sim-topbar > span { display: inline-flex; align-items: center; gap: 6px; color: #fbbf24; font-size: 12px; font-weight: 600; }
.sim-body { min-height: 480px; display: grid; grid-template-columns: 52px minmax(0, 1fr) 280px; }
.sim-sidebar { padding: 16px 0; display: flex; align-items: center; flex-direction: column; gap: 10px; background: #111c2e; }
.sim-sidebar span { width: 34px; height: 34px; display: grid; place-items: center; color: #94a3b8; border-radius: 8px; }
.sim-sidebar span.active { color: #0f172a; background: var(--gold, #d89d00); }
.sim-workspace { padding: 24px; background: #f8fafc; min-width: 0; }
.sim-heading { margin-bottom: 16px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sim-heading span { display: block; color: #64748b; font-size: 11px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; }
.sim-heading strong { display: block; margin-top: 4px; color: #0f172a; font: 700 16px "Inter", system-ui, -apple-system, sans-serif; }
.sim-heading em { padding: 4px 10px; color: #475569; background: #fff; border: 1px solid #e2e8f0; border-radius: 999px; font-size: 12px; font-style: normal; font-weight: 600; }
.order-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.order-grid button {
  min-height: 148px; padding: 16px; display: flex; flex-direction: column;
  color: #1e293b; background: #fff;
  border: 1px solid #e2e8f0; border-radius: 12px; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  text-align: left; transition: border-color .2s ease, box-shadow .2s ease;
}
.order-grid button:hover { border-color: #94a3b8; box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08); }
.order-grid button.urgent { border-color: #dc2626; }
.order-grid button > span { display: flex; align-items: center; justify-content: space-between; color: #64748b; }
.order-grid button > span em { padding: 3px 8px; color: #475569; background: #f1f5f9; border-radius: 999px; font-size: 11px; font-style: normal; font-weight: 700; }
.order-grid button.urgent > span em { color: #b91c1c; background: #fef2f2; }
.order-grid button > strong { margin-top: 12px; display: block; color: #0f172a; font: 700 16px "Inter", system-ui, -apple-system, sans-serif; }
.order-grid button > small { margin-top: 4px; display: block; color: #64748b; font-size: 12.5px; }
.order-grid button > i { margin-top: auto; padding-top: 14px; display: inline-flex; align-items: center; gap: 4px; color: var(--navy, #17263d); font-size: 12.5px; font-style: normal; font-weight: 600; }

.coach-panel { padding: 24px 20px; color: #e2e8f0; background: #17263d; border-left: 1px solid rgba(255, 255, 255, 0.08); }
.coach-avatar { width: 40px; height: 40px; display: grid; place-items: center; color: #0f172a; background: var(--gold, #d89d00); border-radius: 10px; }
.coach-panel > small { margin-top: 14px; display: block; color: #94a3b8; font-size: 11px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; }
.coach-panel h3 { margin: 4px 0 8px; color: #fff; font: 700 15px "Inter", system-ui, -apple-system, sans-serif; }
.coach-panel > p { margin: 0; color: #cbd5e1; font-size: 13px; line-height: 1.55; }
.coach-panel > div:not(.coach-avatar) { margin-top: 18px; padding: 12px 14px; display: flex; align-items: flex-start; gap: 10px; color: #fbbf24; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 10px; }
.coach-panel > div:not(.coach-avatar) svg { flex-shrink: 0; margin-top: 2px; }
.coach-panel > div:not(.coach-avatar) span, .coach-panel > div:not(.coach-avatar) strong { display: block; }
.coach-panel > div:not(.coach-avatar) span { color: #cbd5e1; font-size: 12px; line-height: 1.45; }
.coach-panel > div:not(.coach-avatar) strong { margin-bottom: 3px; color: #fff; font-size: 12.5px; }

.vehicle-card { padding: 16px 18px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px 12px 0 0; }
.vehicle-card > span { width: 44px; height: 44px; flex-shrink: 0; display: grid; place-items: center; color: #15803d; background: #dcfce7; border-radius: 10px; }
.vehicle-card div { flex: 1; min-width: 200px; }
.vehicle-card small, .vehicle-card strong { display: block; }
.vehicle-card small { color: #64748b; font-size: 11px; font-weight: 700; letter-spacing: 0.5px; }
.vehicle-card strong { margin-top: 2px; color: #0f172a; font: 700 15px "Inter", system-ui, -apple-system, sans-serif; }
.vehicle-card p { margin: 3px 0 0; color: #64748b; font-size: 12.5px; }
.vehicle-card > em { padding: 4px 10px; color: #a16207; background: #fef3c7; border-radius: 999px; font-size: 11.5px; font-style: normal; font-weight: 700; }

.process-line { padding: 14px 20px; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; background: #f8fafc; border-inline: 1px solid #e2e8f0; }
.process-line span { display: inline-flex; align-items: center; gap: 6px; color: #64748b; font-size: 12.5px; font-weight: 500; }
.process-line span i { width: 24px; height: 24px; display: grid; place-items: center; background: #e2e8f0; color: #475569; border-radius: 50%; font-size: 11.5px; font-style: normal; font-weight: 700; }
.process-line span.done, .process-line span.active { color: #0f172a; font-weight: 700; }
.process-line span.done i { color: #fff; background: #16a34a; }
.process-line span.active i { color: #fff; background: var(--navy, #17263d); }
.process-line > b { width: 32px; height: 1px; margin: 0 4px; background: #cbd5e1; }

.action-panel { padding: 20px; background: #fff; border: 1px solid #e2e8f0; border-radius: 0 0 12px 12px; }
.action-panel h2 { margin: 0 0 14px; color: #0f172a; font: 700 15px "Inter", system-ui, -apple-system, sans-serif; }
.action-panel > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.action-panel button {
  min-height: 88px; padding: 14px; display: flex; align-items: flex-start; gap: 12px;
  color: #1e293b; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px;
  text-align: left; transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.action-panel button:hover { border-color: #94a3b8; background: #fff; box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06); }
.action-panel button > i { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; color: var(--navy, #17263d); background: #e2e8f0; border-radius: 8px; }
.action-panel button span { flex: 1; min-width: 0; }
.action-panel button strong { color: #0f172a; font-size: 13px; font-weight: 600; display: block; line-height: 1.35; }
.action-panel button small { margin-top: 4px; color: #64748b; font-size: 12px; display: block; line-height: 1.4; }

.game-complete { padding: 40px 24px; text-align: center; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; }
.game-complete > span { width: 64px; height: 64px; margin: 0 auto; display: grid; place-items: center; color: #15803d; background: #dcfce7; border-radius: 50%; }
.game-complete > p { margin: 16px 0 4px; color: #a16207; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.game-complete h2 { margin: 0; color: #0f172a; font: 700 22px "Inter", system-ui, -apple-system, sans-serif; }
.game-complete > strong { margin-top: 6px; display: block; color: #64748b; font-size: 13.5px; font-weight: 400; }
.game-complete > div { max-width: 480px; margin: 20px auto; padding: 14px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; }
.game-complete > div b { color: #64748b; font-size: 11.5px; font-weight: 600; display: block; }
.game-complete > div i { margin-top: 4px; display: block; color: #0f172a; font-size: 15px; font-style: normal; font-weight: 700; }
.game-complete-actions { margin-top: 16px; display: flex; justify-content: center; gap: 10px; }

@media (max-width: 1180px) {
  .sim-body { grid-template-columns: 48px minmax(0, 1fr); }
  .coach-panel { grid-column: 1 / -1; border-left: 0; border-top: 1px solid rgba(255, 255, 255, 0.08); }
  .order-grid, .action-panel > div { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 780px) {
  .sim-body { grid-template-columns: 1fr; }
  .sim-sidebar { flex-direction: row; justify-content: center; padding: 10px 16px; }
  .order-grid, .action-panel > div, .game-complete > div { grid-template-columns: 1fr; }
  .game-progress span::after { display: none; }
}

/* SECCIÓN DE CERTIFICACIÓN */
.certificate-showcase {
  margin-top: 6px; padding: 24px;
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .85fr);
  gap: 24px; align-items: start; background: #f8fafc; border-radius: 14px;
  border: 1px solid #e2e8f0;
}
.certificate-paper {
  max-width: 680px; min-height: 380px; padding: 32px 40px;
  position: relative; color: #1e293b; background: #fff;
  border: 6px solid #f1f5f9; outline: 1px solid #cbd5e1; outline-offset: -14px;
  border-radius: 12px;
  text-align: center; box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}
.certificate-empty-card {
  min-height: 360px; padding: 40px 30px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: #fff; border-radius: 14px; border: 1px dashed #d6dde8;
  text-align: center;
}
.certificate-empty-icon {
  width: 56px; height: 56px; margin-bottom: 12px;
  display: grid; place-items: center; color: var(--navy, #17263d);
  background: #f1f5f9; border-radius: 14px;
}
.certificate-empty-card h3 {
  margin: 0 0 8px; color: #0f172a; font: 700 17px "Inter", system-ui, -apple-system, sans-serif;
}
.certificate-empty-message {
  margin: 0 0 18px; color: #64748b; font-size: 13px; line-height: 1.55; max-width: 440px;
}
.certificate-empty-actions {
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
}
.certificate-empty-actions .primary-button {
  display: inline-flex; align-items: center; gap: 8px;
}
.seal {
  width: 52px; height: 52px; margin: 0 auto 12px;
  display: grid; place-items: center; color: #a16207;
  background: #fef3c7; border-radius: 50%;
}
.certificate-paper > span { color: #a16207; font-size: 11px; font-weight: 700; letter-spacing: 1.4px; }
.certificate-paper h2 { margin: 8px 0 16px; color: #0f172a; font: 800 24px "Inter", system-ui, -apple-system, sans-serif; }
.certificate-paper p { margin: 8px auto; max-width: 520px; color: #64748b; font-size: 13px; line-height: 1.55; }
.certificate-paper h3 { margin: 4px 0 8px; color: #17263d; font: 800 22px "Inter", system-ui, -apple-system, sans-serif; }
.certificate-paper > strong { margin-top: 12px; display: block; color: #17263d; font: 700 13px "Inter", system-ui, -apple-system, sans-serif; }
.certificate-footer {
  margin-top: 28px;
  display: flex; justify-content: space-between; gap: 16px; padding-top: 14px;
  border-top: 1px solid #e2e8f0; text-align: left; font-size: 12px; font-weight: 700; color: #0f172a;
}
.certificate-footer span:last-child { text-align: right; }
.certificate-footer small { color: #64748b; font-size: 11px; font-weight: 500; }
.certificate-requirements { padding: 24px; background: #fff; border-radius: 12px; border: 1px solid #e2e8f0; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04); }
.certificate-requirements h2 { margin: 0 0 14px; color: #0f172a; font: 700 16px "Inter", system-ui, -apple-system, sans-serif; }
.certificate-requirements > div { padding: 12px 0; display: flex; align-items: center; gap: 12px; border-top: 1px solid #f1f5f9; }
.certificate-requirements > div:first-of-type { border-top: 0; padding-top: 4px; }
.certificate-requirements > div > i {
  width: 32px; height: 32px; flex-shrink: 0; display: grid; place-items: center;
  color: #15803d; background: #dcfce7; border-radius: 50%;
  font-size: 12px; font-style: normal; font-weight: 700;
}
.certificate-requirements > div > i.partial { color: #a16207; background: #fef3c7; }
.certificate-requirements > div > i.pending { color: #64748b; background: #f1f5f9; }
.certificate-requirements strong, .certificate-requirements small { display: block; }
.certificate-requirements strong { color: #0f172a; font-size: 13px; font-weight: 600; }
.certificate-requirements .primary-button,
.certificate-requirements .outline-button { width: 100%; margin-top: 16px; }

.certificate-paper.digital-credential {
  background: linear-gradient(135deg, #0a1628 0%, #17263d 100%) !important;
  color: #ffffff !important;
  border: 4px solid #1e293b !important;
  outline: 1.5px solid #d89d00 !important;
  outline-offset: -12px !important;
  box-shadow: 0 16px 36px rgba(10, 22, 40, 0.28) !important;
}

.certificate-paper.digital-credential .credential-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.certificate-paper.digital-credential .credential-topbar .seal {
  position: static;
  margin: 0;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 2px solid #d89d00;
  color: #b45309;
}

.certificate-paper.digital-credential .credential-qr-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(216, 157, 0, 0.4);
  border-radius: 8px;
}

.certificate-paper.digital-credential .credential-qr-box .qr-label {
  font-size: 9px;
  font-weight: 700;
  color: #d89d00;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.certificate-paper.digital-credential > span {
  color: #d89d00 !important;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
}

.certificate-paper.digital-credential h2 {
  color: #ffffff !important;
  font: 800 24px "Inter", system-ui, -apple-system, sans-serif;
  letter-spacing: -0.02em;
}

.certificate-paper.digital-credential p {
  color: #94a3b8 !important;
}

.certificate-paper.digital-credential h3 {
  color: #f8fafc !important;
  font: 800 22px "Inter", system-ui, -apple-system, sans-serif;
}

.certificate-paper.digital-credential > strong {
  color: #d89d00 !important;
  font-family: monospace;
  font-size: 13px;
}

.certificate-paper.digital-credential .certificate-footer {
  border-top-color: rgba(216, 157, 0, 0.25) !important;
  color: #f8fafc !important;
}

.certificate-paper.digital-credential .certificate-footer span {
  color: #f8fafc !important;
}

.certificate-paper.digital-credential .certificate-footer small {
  color: #94a3b8 !important;
}

@media (max-width: 960px) {
  .certificate-showcase { grid-template-columns: 1fr; padding: 18px; }
  .certificate-paper { max-width: 100%; padding: 24px 20px; }
}

/* MÉTRICAS EJECUTIVAS */
.doc-exec-stats { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.executive-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin: 0 0 18px; }
.executive-metrics article {
  padding: 16px 18px; display: flex; align-items: center; gap: 14px;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.executive-metrics article > span {
  width: 40px; height: 40px; flex-shrink: 0; display: grid; place-items: center;
  border-radius: 10px;
}
.executive-metrics article > span.violet { color: #6d28d9; background: #ede9fe; }
.executive-metrics article > span.cyan { color: #0369a1; background: #e0f2fe; }
.executive-metrics article > span.green { color: #15803d; background: #dcfce7; }
.executive-metrics article > span.orange { color: #b45309; background: #fef3c7; }
.executive-metrics small { color: #64748b; font-size: 12px; font-weight: 600; display: block; }
.executive-metrics strong { color: #0f172a; font: 700 20px "Inter", system-ui, -apple-system, sans-serif; display: block; margin: 2px 0; }
.executive-metrics p { margin: 0; color: #64748b; font-size: 12px; }

.executive-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; }
.analytics-card, .funnel-card { padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; }
.analytics-card .doc-empty, .funnel-card .doc-empty { flex: 1; padding: 36px 20px; background: #f8fafc; }
.trend { padding: 4px 10px; color: #15803d; background: #dcfce7; border-radius: 999px; font-size: 11px; font-weight: 700; }
.chart-area {
  height: 160px; margin-top: 22px; padding: 0 8px;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 8px;
  border-bottom: 1px solid #dfe4eb;
  background: repeating-linear-gradient(to bottom, transparent 0, transparent 39px, #edf0f4 40px);
}
.chart-area > i {
  width: 6.5%; min-height: 10px; position: relative; display: block;
  background: var(--gold); border-radius: 4px 4px 0 0; transition: .2s;
}
.chart-area > i b {
  position: absolute; top: -18px; left: 50%; transform: translateX(-50%);
  color: #9b7200; font-size: 11px; font-style: normal; font-weight: 700;
}
.chart-labels { padding-top: 8px; display: flex; justify-content: space-between; color: #64748b; font-size: 11px; }

.funnel-row { margin-top: 16px; }
.funnel-row > span { display: flex; align-items: center; gap: 8px; color: #475569; font-size: 12.5px; }
.funnel-row > span i { width: 22px; height: 22px; display: grid; place-items: center; color: #fff; background: var(--navy, #17263d); border-radius: 6px; font-size: 11px; font-style: normal; font-weight: 700; }
.funnel-row > span b { margin-left: auto; color: #0f172a; font-size: 13px; }
.funnel-row > em { height: 6px; margin: 6px 0 0 30px; overflow: hidden; display: block; background: #e2e8f0; border-radius: 999px; }
.funnel-row > em i { height: 100%; display: block; background: var(--gold); border-radius: inherit; }

.insight-banner {
  margin-top: 18px; padding: 18px 22px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.insight-banner > span { width: 40px; height: 40px; flex-shrink: 0; display: grid; place-items: center; color: #a16207; background: #fef3c7; border-radius: 10px; }
.insight-banner div { flex: 1; min-width: 220px; }
.insight-banner strong { font-size: 14px; font-weight: 700; color: #0f172a; display: block; }
.insight-banner p { margin: 2px 0 0; color: #64748b; font-size: 13px; line-height: 1.45; }

@media (max-width: 960px) {
  .executive-grid { grid-template-columns: 1fr; }
}

.notice {
  margin-top: 16px; padding: 12px 18px;
  display: flex; align-items: center; gap: 10px;
  color: #735500; background: #fff9e8;
  border: 1px solid #edd99c;
  border-radius: 8px; font-size: 12px;
}
.notice span { flex: 1; }
.notice button { color: #9b7200; background: transparent; border: 0; font-size: 11px; font-weight: 700; }

/* MODAL DE CONFIRMACIÓN DE ELIMINACIÓN Y ESTADO DE ÉXITO */
.delete-confirm-modal-box {
  width: 100%;
  max-width: 520px;
  background: #ffffff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.delete-icon-badge {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #fee2e2;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.delete-modal-body {
  padding: 22px 24px;
}

.delete-prompt {
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 16px;
  line-height: 1.5;
}

.delete-doc-preview-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.delete-doc-preview-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.delete-doc-preview-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 4px;
  line-height: 1.4;
}

.delete-doc-preview-summary {
  font-size: 12px;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}

.delete-warning-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 12px;
  color: #92400e;
  line-height: 1.5;
}

.delete-warning-banner svg {
  flex-shrink: 0;
  margin-top: 1px;
}

.delete-error-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 12px;
  color: #b91c1c;
  line-height: 1.5;
  margin-top: 12px;
}

.delete-error-banner svg {
  flex-shrink: 0;
  margin-top: 1px;
}

.delete-modal-footer {
  padding: 14px 24px;
  background: #f8fafc;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.danger-button {
  /* geometría (alto, padding, fuente, radio) viene del sistema único de botones */
  background: #ef4444;
  color: #ffffff;
  border: 1px solid #dc2626;
}

.danger-button:hover:not(:disabled) {
  background: #dc2626;
  border-color: #b91c1c;
}

.danger-button:disabled {
  opacity: 0.6;
  cursor: not-allowed !important;
  transform: none !important;
  box-shadow: none !important;
}

.danger-button:disabled:hover {
  transform: none !important;
  box-shadow: none !important;
}

.delete-success-view {
  padding: 40px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.delete-success-icon-wrap {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #ecfdf5;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.delete-modal-title {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 8px;
}

.delete-modal-desc {
  font-size: 13px;
  color: #64748b;
  margin: 0 0 24px;
  max-width: 380px;
  line-height: 1.5;
}

/* PESTAÑA DE TALLERES (RED OPERATIVA) */
.workshops-count-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid #e2e8f0;
}

.doc-grid.workshops-grid,
.workshops-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 10px;
}

.workshop-card {
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 14px;
  background: #ffffff;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
}

.workshop-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08);
  border-color: #cbd5e1;
}

.workshop-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.workshop-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.1);
}

.workshop-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #ffffff;
  padding: 2px;
}

.workshop-avatar-initials {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}

.workshop-header-info {
  flex: 1;
  min-width: 0;
}

.workshop-name {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workshop-nit {
  font-size: 11px;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: monospace;
}

.workshop-tenant-code {
  font-size: 11px;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: monospace;
}

.workshop-status-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

.workshop-status-badge.is-active,
.workshop-status-badge:not(.is-inactive) {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.workshop-status-badge.is-inactive {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.workshop-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.workshop-progress-section {
  background: #f8fafc;
  border-radius: 10px;
  padding: 12px 14px;
}

.workshop-progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 6px;
}

.workshop-progress-track {
  width: 100%;
  height: 6px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 4px;
}

.workshop-progress-bar {
  height: 100%;
  background: #10b981;
  border-radius: 999px;
}

.workshop-progress-hint {
  font-size: 10px;
  color: #94a3b8;
  display: block;
}

.workshop-stats-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.workshop-manuals-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #475569;
  background: #f1f5f9;
  padding: 5px 10px;
  border-radius: 6px;
}

.workshop-manuals-stat strong {
  color: #0f172a;
}

.workshop-card-desc {
  font-size: 12px;
  color: #64748b;
  margin: 0;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.workshop-card-desc.is-empty {
  color: #94a3b8;
  font-style: italic;
}

.workshop-card-footer {
  border-top: 1px solid #f1f5f9;
  padding-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.doc-workshop-btn,
.workshop-btn-docs {
  flex: 1;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 12px;
  white-space: nowrap;
}

.workshop-company-code {
  font-size: 11px;
  font-family: monospace;
  font-weight: 600;
  color: #64748b;
  background: #f1f5f9;
  padding: 5px 8px;
  border-radius: 6px;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

/* =============================================================================
   EQUIPO TECNICO · AVANCE DEL EQUIPO (doc-team)
   ============================================================================= */
.doc-team {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.team-self {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 24px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  margin-bottom: 8px;
}

.team-self-ring {
  width: 64px;
  height: 64px;
  min-width: 64px;
  border-radius: 50%;
  background: conic-gradient(#17263d var(--progress, 0deg), #e2e8f0 0deg);
  display: grid;
  place-items: center;
  position: relative;
}

.team-self-ring::before {
  content: "";
  position: absolute;
  inset: 6px;
  background: #ffffff;
  border-radius: 50%;
}

.team-self-ring div {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.team-self-ring strong {
  font-size: 14px;
  font-weight: 800;
  color: #17263d;
}

.team-self-ring span {
  font-size: 8px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  margin-top: 2px;
}

.team-self-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.team-self-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.team-self-title-row strong {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.team-self .team-route-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 220px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.team-member {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  position: relative;
}

.team-member:hover {
  border-color: #cbd5e1;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  transform: translateY(-2px);
}

.team-member.is-self {
  border-color: #cbd5e1;
  background: linear-gradient(180deg, #ffffff 0%, #fcfdfe 100%);
}

.team-member-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.team-member-avatar-wrap {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: #e2e8f0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.team-member-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.team-member-avatar,
.team-member-fallback {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  user-select: none;
}

.team-member-id {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.team-member-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.team-member-name {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-member-role {
  font-size: 12px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-self-badge {
  display: inline-block;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 700;
  color: #17263d;
  background: #e2e8f0;
  border-radius: 4px;
  letter-spacing: 0.02em;
}

.team-member-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  width: fit-content;
  white-space: nowrap;
  flex-shrink: 0;
}

.team-state-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

/* is-not-started / is-pending: slate suave */
.team-member-state.is-not-started,
.team-member-state.is-pending {
  background: #f1f5f9;
  color: #475569;
}
.team-member-state.is-not-started .team-state-dot,
.team-member-state.is-pending .team-state-dot {
  background: #94a3b8;
}

/* is-in-progress / is-progress: azul suave */
.team-member-state.is-in-progress,
.team-member-state.is-progress {
  background: #eff6ff;
  color: #1d4ed8;
}
.team-member-state.is-in-progress .team-state-dot,
.team-member-state.is-progress .team-state-dot {
  background: #3b82f6;
}

/* is-completed / is-done: esmeralda suave */
.team-member-state.is-completed,
.team-member-state.is-done {
  background: #ecfdf5;
  color: #047857;
}
.team-member-state.is-completed .team-state-dot,
.team-member-state.is-done .team-state-dot {
  background: #10b981;
}

.team-member-progress {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.team-member-progress-head {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #475569;
}

.team-member-progress-head strong {
  color: #0f172a;
  font-weight: 700;
}

.team-progress-bar {
  height: 6px;
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
}

.team-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #17263d, #2e4368);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.team-member.is-completed .team-progress-fill {
  background: linear-gradient(90deg, #047857, #10b981);
}

.team-member-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
  text-align: center;
  font-size: 11.5px;
  color: #64748b;
}

.team-member-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.team-member-stat-val {
  font-weight: 700;
  color: #1e293b;
  display: block;
  font-size: 13px;
}

.team-member-stat-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #64748b;
}

.team-member-routes-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.team-route-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 11px;
  color: #334155;
  max-width: 100%;
}

.team-route-chip.is-done {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}

.team-route-chip-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}

.team-route-chip-pct {
  font-weight: 700;
  color: #64748b;
  font-size: 10.5px;
}

.team-route-chip-more {
  font-size: 10.5px;
  color: #64748b;
  align-self: center;
  padding: 2px 4px;
}

.team-member-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid #f8fafc;
}

.team-member-last {
  font-size: 11px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 4px;
}

.team-member-last-activity {
  color: #64748b;
}

.team-route-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 6px 0 0;
  padding: 10px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #f1f5f9;
  list-style: none;
}

.team-route-list li {
  display: grid;
  grid-template-columns: 1fr 60px 45px;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
}

.team-route-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #334155;
}

.team-route-list li.is-done .team-route-name {
  color: #047857;
  font-weight: 600;
}

.team-route-list li strong {
  font-size: 11px;
  text-align: right;
  color: #475569;
}

.mini-progress {
  display: block;
  height: 4px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.mini-progress i {
  display: block;
  height: 100%;
  background: #17263d;
  border-radius: inherit;
}

.team-route-list li.is-done .mini-progress i {
  background: #10b981;
}

/* Clases de compatibilidad previa */
.team-summary-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.team-count-badge {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
}

.team-certified-badge {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.team-progress-badge {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.team-card {
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.team-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08);
  border-color: #cbd5e1;
}

.team-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.1);
}

.team-btn-action {
  width: 100%;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}

@media (max-width: 768px) {
  .team-grid {
    grid-template-columns: 1fr;
  }
  .team-self {
    flex-direction: column;
    align-items: flex-start;
  }
  .team-self .team-route-list {
    width: 100%;
  }
}

/* RUTAS FORMATIVAS - DISTINCION VISUAL Y CHIPS */
.route-card.route-card-official {
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(10, 22, 40, 0.04);
}

.route-card.route-card-official:hover {
  border-color: #d89d00;
  box-shadow: 0 10px 25px -5px rgba(10, 22, 40, 0.1);
}

.route-card.route-card-workshop {
  border-color: #e2e8f0;
}

.route-card.route-card-workshop:hover {
  border-color: #64748b;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.07);
}

.route-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 500;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 3px 8px;
}

.route-level-chip {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
  font-weight: 600;
}

.workshops-loading-card {
  padding: 60px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #64748b;
}

/* MÉTRICAS EJECUTIVAS: ESTADOS INICIALES */
.metrics-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  text-align: center;
  color: #64748b;
  min-height: 180px;
}

.metrics-empty-state svg {
  margin-bottom: 12px;
  color: #94a3b8;
}

.metrics-empty-state p {
  font-size: 13px;
  line-height: 1.6;
  max-width: 380px;
  margin: 0;
}

.trend-neutral {
  background: #f1f5f9;
  color: #64748b;
}

/* =============================================================================
   MODAL DE LECTURA DE DOCUMENTACION Y RENDERIZADO DE CONTENIDO HTML
   ============================================================================= */
.doc-reader-modal {
  width: 92vw;
  max-width: 1120px;
  max-height: 90vh;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.4);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.tinymce-rendered-view {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: #1e293b;
  font-size: 14.5px;
  line-height: 1.75;
}

/* Enlaces con estilo institucional Navy */
.tinymce-rendered-view a {
  color: #17263d;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Ocultar metadatos tecnicos remanentes */
.tinymce-rendered-view .doc-article-header,
.tinymce-rendered-view .doc-context-strip,
.tinymce-rendered-view .doc-source,
.tinymce-rendered-view .doc-audience,
.tinymce-rendered-view .doc-metadata-panel {
  display: none !important;
}

/* Titulos con buena jerarquia */
.tinymce-rendered-view h1 {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.5px;
  margin: 28px 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e2e8f0;
  line-height: 1.3;
}

.tinymce-rendered-view h1:first-child {
  margin-top: 0;
}

.tinymce-rendered-view h2 {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 19px;
  font-weight: 700;
  color: #17263d;
  letter-spacing: -0.3px;
  margin: 24px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
  line-height: 1.35;
}

.tinymce-rendered-view h3 {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #334155;
  margin: 20px 0 10px;
  line-height: 1.4;
}

.tinymce-rendered-view h4,
.tinymce-rendered-view h5,
.tinymce-rendered-view h6 {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #475569;
  margin: 16px 0 8px;
}

/* Parrafos */
.tinymce-rendered-view p {
  line-height: 1.75;
  font-size: 15px;
  color: #334155;
  margin-top: 0;
  margin-bottom: 16px;
}

/* Listas con vinetas limpias y sangria adecuada */
.tinymce-rendered-view ul,
.tinymce-rendered-view ol {
  padding-left: 28px;
  margin: 14px 0 18px;
  color: #334155;
}

.tinymce-rendered-view li {
  line-height: 1.7;
  font-size: 14.5px;
  margin-bottom: 6px;
}

.tinymce-rendered-view li > p {
  margin-bottom: 6px;
}

/* Bloques de codigo con fondo suave y borde */
.tinymce-rendered-view code {
  font-family: "Consolas", "Monaco", "Courier New", monospace;
  font-size: 13px;
  background: #f1f5f9;
  color: #0f172a;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
}

.tinymce-rendered-view pre {
  background: #0f172a;
  color: #f8fafc;
  padding: 16px 20px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 20px 0;
  border: 1px solid #1e293b;
}

.tinymce-rendered-view pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  border: 0;
  font-size: 13px;
  line-height: 1.6;
}

.tinymce-rendered-view blockquote {
  background: #fffcf2;
  margin: 20px 0;
  padding: 12px 20px;
  color: #4a3e1a;
  border-radius: 0 8px 8px 0;
  font-style: normal;
}

.tinymce-rendered-view hr {
  border: 0;
  height: 1px;
  background: #e2e8f0;
  margin: 28px 0;
}

/* Tablas profesionales */
.tinymce-rendered-view .doc-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 24px 0;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.tinymce-rendered-view table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.tinymce-rendered-view .doc-table-wrap table {
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.tinymce-rendered-view th {
  background: #17263d;
  color: #ffffff;
  padding: 12px 16px;
  border: 1px solid #233754;
  font-weight: 600;
  font-size: 13px;
  text-align: left;
  letter-spacing: 0.2px;
}

.tinymce-rendered-view td {
  padding: 12px 16px;
  border: 1px solid #e2e8f0;
  color: #1e293b;
  font-size: 13.5px;
  line-height: 1.6;
  vertical-align: top;
}

.tinymce-rendered-view tr:nth-child(even) td {
  background: #f8fafc;
}

.tinymce-rendered-view tr:hover td {
  background: #f1f5f9;
}

/* Estados de Carga y Skeletons */
.doc-loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  grid-column: 1 / -1;
  width: 100%;
}

.doc-spinner-large {
  width: 36px;
  height: 36px;
  border: 3px solid #e2e8f0;
  border-top: 3px solid #17263d;
  border-radius: 50%;
  animation: rotate 0.8s linear infinite;
}

.doc-spinner-small,
.btn-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: doc-spin 0.8s linear infinite;
  display: inline-block;
  vertical-align: middle;
  margin-right: 6px;
}



.doc-loading-pill {
  display: inline-flex;
  align-items: center;
  background: #e2e8f0;
  color: #17263d;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  margin-left: 6px;
}

.doc-skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  align-items: stretch;
  width: 100%;
  grid-column: 1 / -1;
}

.doc-skeleton-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  height: 180px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-sizing: border-box;
}

.skeleton-shimmer {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
}

.skeleton-badge {
  width: 70px;
  height: 18px;
}

.skeleton-title {
  width: 80%;
  height: 20px;
}

.skeleton-text {
  width: 100%;
  height: 14px;
}

.skeleton-text.short {
  width: 60%;
}

.skeleton-footer {
  width: 40%;
  height: 14px;
  margin-top: auto;
}





/* ==========================================================================
   DOCUMENTATION TRASH & CATEGORY MANAGEMENT STYLES
   ========================================================================== */

/* Trigger Button and Badge */
.trash-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
  background: #f8fafc;
  color: #475569;
  border: 1px solid #cbd5e1;
  font-weight: 600;
  transition: all 0.2s ease;
}

.trash-trigger-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #94a3b8;
}

.trash-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #ef4444;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

/* Category Manager Modal: Card Editing state */
.cat-card-editing {
  border: 2px solid var(--pink) !important;
  background: rgba(236, 11, 177, 0.04) !important;
}

/* Category Delete Submodal & Overlays */
.category-delete-submodal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.category-delete-submodal {
  width: 100%;
  max-width: 460px;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.4);
  overflow: hidden;
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
}

.category-delete-submodal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #f1f5f9;
}

.category-delete-submodal-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.category-delete-submodal-title h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.category-delete-alert-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #fef2f2;
  color: #ef4444;
}

.category-delete-alert-icon.danger {
  background: #fff1f2;
  color: #e11d48;
}

.category-delete-submodal-body {
  padding: 20px;
}

.category-delete-question {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.45;
}

.category-delete-notice {
  margin: 0;
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
}

.hard-delete-warning-box {
  margin-top: 14px;
  padding: 14px 16px;
  background: #fef2f2;
  border-radius: 6px;
  font-size: 12.5px;
  color: #991b1b;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  gap: 5px;
  border-top: 1px solid #fee2e2;
  border-right: 1px solid #fee2e2;
  border-bottom: 1px solid #fee2e2;
}

.category-delete-submodal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  background: #f8fafc;
  border-top: 1px solid #f1f5f9;
}

.category-confirm-delete-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  background: #ef4444;
  color: #ffffff;
  border: 1px solid #dc2626;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.category-confirm-delete-btn:hover:not(:disabled) {
  background: #dc2626;
  border-color: #b91c1c;
}

.category-confirm-delete-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed !important;
  transform: none !important;
  box-shadow: none !important;
}

.category-confirm-delete-btn:disabled:hover {
  transform: none !important;
  box-shadow: none !important;
}

/* Trash Modal Component */
.doc-trash-modal {
  width: 92vw;
  max-width: 1040px;
  max-height: 90vh;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.4);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.trash-modal-header-info {
  display: flex;
  flex-direction: column;
}

.trash-header-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #fff7ed;
  color: #ea580c;
  border: 1px solid #fed7aa;
  box-shadow: 0 2px 6px rgba(234, 88, 12, 0.08);
  flex-shrink: 0;
}

.trash-kicker {
  display: block;
  font-size: 10.5px;
  font-weight: 800;
  color: #ea580c;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.trash-modal-title {
  font: 800 20px "Inter", system-ui, -apple-system, sans-serif;
  color: #0f172a;
  margin: 2px 0 0;
  letter-spacing: -0.3px;
}

.trash-modal-desc {
  font-size: 12.5px;
  color: #64748b;
  margin: 6px 0 0;
  line-height: 1.45;
}

.doc-trash-modal-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 20px 24px;
}

.trash-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 20px;
  text-align: center;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  margin: 8px 0;
}

.trash-empty-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #ecfdf5;
  color: #10b981;
  border: 1px solid #a7f3d0;
  margin-bottom: 16px;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.12);
}

.trash-empty-state h3 {
  margin: 0 0 6px;
  font: 800 18px "Inter", system-ui, -apple-system, sans-serif;
  color: #0f172a;
}

.trash-empty-state p {
  margin: 0;
  font-size: 13px;
  color: #64748b;
}

/* Trash Table */
.trash-table-container {
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
}

.trash-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.trash-table th {
  background: #f8fafc;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 13px 16px;
  border-bottom: 1px solid #e2e8f0;
}

.trash-table td {
  padding: 13px 16px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  color: #1e293b;
}

.trash-table tbody tr {
  transition: background 0.15s ease;
}

.trash-table tbody tr:hover {
  background: #f8fafc;
}

.trash-row-selected {
  background: #f0fdf4 !important;
}

.trash-checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--navy, #17263d);
  cursor: pointer;
  border-radius: 4px;
}

.trash-doc-code-badge {
  display: inline-block;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  letter-spacing: 0.2px;
}

.trash-doc-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.trash-doc-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
}

.trash-doc-summary {
  margin: 2px 0 0;
  font-size: 11.5px;
  color: #64748b;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.trash-doc-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.trash-category-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: #0284c7;
  background: #f0f9ff;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid #bae6fd;
  width: fit-content;
}

.trash-doc-type {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
}

.trash-scope-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
}

.trash-scope-badge.scope-badge-systime {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

.trash-scope-badge.scope-badge-workshop {
  background: #fefce8;
  color: #ca8a04;
  border: 1px solid #fef08a;
}

.trash-actions-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.btn-restore {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 7px;
  background: #ffffff;
  color: #059669;
  border: 1px solid #a7f3d0;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.btn-restore:hover {
  background: #ecfdf5;
  color: #047857;
  border-color: #6ee7b7;
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(5, 150, 105, 0.15);
}

.btn-hard-delete {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 7px;
  background: #ffffff;
  color: #dc2626;
  border: 1px solid #fecaca;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.btn-hard-delete:hover {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fca5a5;
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(220, 38, 38, 0.15);
}

/* Batch selection in trash modal */
.trash-batch-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 18px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  margin-bottom: 16px;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.05);
}

.trash-batch-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.trash-batch-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: #dcfce7;
  color: #15803d;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid #86efac;
}

.trash-batch-total {
  font-size: 12px;
  color: #166534;
  font-weight: 500;
}

.trash-batch-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-batch-restore {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 7px;
  background: #10b981;
  color: #ffffff;
  border: 1px solid #059669;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.btn-batch-restore:hover {
  background: #059669;
  border-color: #047857;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(16, 185, 129, 0.28);
}

.btn-batch-hard-delete {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 7px;
  background: #ef4444;
  color: #ffffff;
  border: 1px solid #dc2626;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
}

.btn-batch-hard-delete:hover {
  background: #dc2626;
  border-color: #b91c1c;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(239, 68, 68, 0.28);
}

.btn-batch-clear {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 7px;
  background: #ffffff;
  color: #475569;
  border: 1px solid #cbd5e1;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-batch-clear:hover {
  color: #0f172a;
  background: #f8fafc;
  border-color: #94a3b8;
}

.trash-footer-summary {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
}

/* =============================================================================
   PULIDO VISUAL COMÚN (ventanas, formularios, hover) — todos los roles
   Mantiene la paleta original: navy #17263d, dorado y rosa de acento.
   ============================================================================= */



.modal-backdrop { animation: doc-backdrop-in .18s ease-out; }
.modal-box, .route-modal-card { animation: doc-modal-in .22s cubic-bezier(.2, .8, .2, 1); }

.route-modal-card { max-width: 780px; }

/* Cabecera de ventanas */
.modal-top { padding: 20px 28px 18px; align-items: flex-start; gap: 16px; }
.modal-heading { min-width: 0; }
.modal-eyebrow { color: var(--pink); }
.modal-title { margin: 4px 0 4px; font: 800 21px "Inter", system-ui, -apple-system, sans-serif; color: #0f172a; }
.modal-subtitle { margin: 0; font-size: 13px; color: #64748b; line-height: 1.45; }

/* Botón cerrar */
.modal-top .icon-button,
.modal-close-btn {
  width: 34px; height: 34px; flex-shrink: 0;
  border: 0; background: transparent; color: #64748b;
  transition: background .15s, color .15s;
}
.modal-top .icon-button:hover:not(:disabled),
.modal-close-btn:hover:not(:disabled) { background: #f1f5f9; color: #0f172a; }
.modal-top .icon-button:active:not(:disabled) { background: #e2e8f0; }
.icon-button:disabled { opacity: .5; cursor: not-allowed; }

/* Cuerpo y pies */
.route-modal-body, .modal-scrollable-body { padding: 24px 28px; background: #f8fafc; }
.modal-footer { padding: 16px 28px; background: #fff; }

/* Secciones numeradas: tarjetas limpias sobre fondo suave */
.form-step-section { padding: 22px 24px; margin-bottom: 0; border-radius: 12px; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.form-step-header { margin-bottom: 20px; padding-bottom: 14px; }
.form-step-header-split { justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.form-step-header-main { display: flex; align-items: center; gap: 12px; }

/* Campos: más aire y retroalimentación al pasar el mouse */
.form-group { margin-bottom: 18px; }
.form-row > .form-group, .form-step-section > .form-group:last-child { margin-bottom: 0; }
.form-row { margin-bottom: 18px; }
.form-row:last-child { margin-bottom: 0; }
.form-group label { margin-bottom: 7px; font-size: 11.5px; letter-spacing: .4px; color: #334155; }
.form-input:hover:not(:focus):not(:disabled), .form-select:hover:not(:focus):not(:disabled) { border-color: #94a3b8; }
.form-input:focus, .form-select:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(23, 38, 61, .12); }
.form-textarea { height: auto; min-height: 84px; padding: 11px 14px; line-height: 1.5; resize: vertical; }

/* Constructor de módulos */
.route-modules-list { display: flex; flex-direction: column; gap: 12px; }
.route-module-builder-item { margin-bottom: 0; padding: 16px 18px; transition: border-color .15s, box-shadow .15s, background .15s; }
.route-module-builder-item:hover { background: #fff; border-color: #cbd5e1; box-shadow: 0 2px 8px rgba(15, 23, 42, .06); }
.route-module-header { margin-bottom: 14px; }
.route-module-tag { font-size: 11px; letter-spacing: .6px; }
.route-module-remove {
  width: var(--btn-h-sm); height: var(--btn-h-sm);
  display: grid; place-items: center;
  color: #94a3b8; background: transparent;
  border: 1px solid transparent; border-radius: var(--btn-radius);
  cursor: pointer; transition: all .15s;
}
.route-module-remove:hover:not(:disabled) { color: #dc2626; background: #fef2f2; border-color: #fecaca; }
.route-module-builder-item .form-row-modules { grid-template-columns: 2fr 1fr; }

/* Botón compacto reutilizable */
.btn-sm { height: var(--btn-h-sm); min-height: var(--btn-h-sm); padding: 0 12px; font-size: 11.5px; }
.primary-button:active:not(:disabled), .outline-button:active:not(:disabled), .doc-header-btn:active { transform: translateY(0); }
.primary-button:focus-visible, .outline-button:focus-visible, .doc-header-btn:focus-visible,
.doc-action-btn-read:focus-visible, .doc-action-btn-edit:focus-visible, .doc-action-btn-delete:focus-visible,
.doc-page-btn:focus-visible, .category-chip:focus-visible, .route-filter-btn:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 2px;
}

/* Hover consistente en tarjetas, chips y pestañas */
.card { transition: box-shadow .2s ease, border-color .2s ease; }
.doc-card { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.doc-card:hover { transform: translateY(-2px); border-color: #cbd5e1; box-shadow: 0 8px 20px rgba(15, 23, 42, .08); }
.category-chip { transition: all .15s ease; }
.category-chip:hover:not(.active) { background: #f8fafc; border-color: var(--btn-border-hover); color: #0f172a; }
.route-filter-btn { height: var(--btn-h-sm); padding: 0 14px; display: inline-flex; align-items: center; }
.route-filter-btn:hover:not(.active) { background: #f8fafc; border-color: var(--btn-border-hover); }
.context-tabs-nav button { transition: color .15s, background .15s, border-color .15s; }
.nav-scope-btn { transition: all .15s ease; }
.route-card:active { transform: translateY(0); }
.route-card .doc-action-btn-delete { flex-shrink: 0; }

/* ---------- Pantalla de Rutas ---------- */
.route-notice { margin: 0 0 20px; padding: 12px 16px; }
.route-notice > svg { flex-shrink: 0; color: var(--gold); }
.route-notice button { height: var(--btn-h-sm); padding: 0 10px; border-radius: 6px; }
.route-notice button:hover { background: rgba(155, 114, 0, .12); }
.doc-loading-title { margin-top: 12px; font-size: 14px; color: #17243a; }
.doc-loading-sub { font-size: 12px; color: #64748b; }

.route-filter-tabs { margin: 0 0 20px; }
.route-cards-grid { gap: 20px; margin-bottom: 28px; }

/* Tarjeta de ruta */
.route-card { padding: 20px; gap: 0; justify-content: flex-start; }
.route-card-top { min-height: 24px; margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.route-card-state { font-size: 11px; font-weight: 700; color: var(--pink); }
.route-card-title { margin: 0 0 6px; font: 800 16px "Inter", system-ui, -apple-system, sans-serif; line-height: 1.35; color: #0f172a; }
.route-card-desc {
  margin: 0 0 16px; min-height: 36px;
  font-size: 12.5px; line-height: 1.5; color: #64748b;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.route-card-meta {
  margin-bottom: 8px; padding-top: 14px; border-top: 1px solid #edf0f4;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 12px; color: #475569;
}
.route-card-meta span { display: inline-flex; align-items: center; gap: 6px; }
.route-card-meta strong { color: #0f172a; }
.route-card-progress { width: 100%; height: 6px; margin-bottom: 4px; }
.route-card-actions { margin-top: 16px; display: flex; align-items: center; gap: 8px; }
.route-card-main-action { flex: 1; }

/* Botón de peligro con contorno */
.danger-outline-button {
  height: var(--btn-h); padding: 0 16px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  color: #dc2626; background: #fff;
  border: 1px solid #fecaca; border-radius: var(--btn-radius);
  font-size: var(--btn-font); font-weight: 700; line-height: 1; white-space: nowrap;
  cursor: pointer; transition: all .15s ease;
}
.danger-outline-button:hover:not(:disabled) { color: #b91c1c; background: #fef2f2; border-color: #fca5a5; }
.danger-outline-button.btn-sm { height: var(--btn-h-sm); padding: 0 12px; font-size: 11.5px; }
.danger-outline-button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Detalle de la ruta */
.route-detail {
  margin-bottom: 24px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, .04);
  overflow: hidden;
}
.route-detail-head {
  padding: 28px 30px 24px;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; flex-wrap: wrap;
  border-bottom: 1px solid #edf0f4;
}
.route-detail-info { flex: 1; min-width: 280px; }
.route-detail-badges { margin-bottom: 12px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.route-detail-creator { font-size: 12px; color: #64748b; }
.route-detail-title { margin: 0 0 8px; font: 800 24px "Inter", system-ui, -apple-system, sans-serif; color: #0f172a; }
.route-detail-desc { margin: 0 0 16px; max-width: 760px; font-size: 14px; line-height: 1.55; color: #475569; }
.route-detail-meta { display: flex; align-items: center; gap: 8px 22px; flex-wrap: wrap; font-size: 12px; color: #64748b; }
.route-detail-meta span { display: inline-flex; align-items: center; gap: 6px; }
.route-detail-meta b { color: #334155; }
.route-detail-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; flex-shrink: 0; }
.route-detail-progress { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.route-detail-progress-title { display: block; font-size: 16px; color: #0f172a; }
.route-detail-progress small { display: block; margin-top: 2px; font-size: 12px; color: #64748b; }

/* Módulos */
.route-module-list { padding: 24px 30px 30px; display: flex; flex-direction: column; gap: 12px; background: #f8fafc; }
.route-module-row {
  padding: 16px 20px;
  display: flex; align-items: center; gap: 18px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  transition: border-color .15s, box-shadow .15s;
}
.route-module-row:hover { border-color: #cbd5e1; box-shadow: 0 2px 8px rgba(15, 23, 42, .06); }
.route-module-num { width: 44px; height: 44px; flex-shrink: 0; font-size: 13px; }
.route-module-main { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.route-module-title { margin: 0; font: 700 15px "Inter", system-ui, -apple-system, sans-serif; color: #17243a; line-height: 1.35; }
.route-module-doc {
  max-width: 100%; height: 28px; padding: 0 10px;
  display: inline-flex; align-items: center; gap: 6px;
  color: #334155; background: #f8fafc;
  border: 1px solid var(--btn-border); border-radius: 6px;
  font-size: 11.5px; font-weight: 600; cursor: pointer; transition: all .15s;
}
.route-module-doc span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.route-module-doc:hover { background: #fff; border-color: var(--btn-border-hover); color: #0f172a; }
.route-module-nodoc { font-size: 12px; color: #94a3b8; }
.route-module-progress { width: 130px; flex-shrink: 0; display: flex; flex-direction: column; gap: 6px; text-align: right; }
.route-module-progress strong { font-size: 12px; color: #17243a; }
.route-module-empty { padding: 28px; text-align: center; font-size: 13px; color: #64748b; background: #fff; border: 1px dashed #cbd5e1; border-radius: 12px; }

/* Confirmación de eliminar ruta */
.route-confirm-box { max-width: 460px; }
.route-confirm-box .modal-top { border-bottom: 0; padding-bottom: 6px; }

@media (max-width: 720px) {
  .route-detail-head, .route-module-list { padding-left: 18px; padding-right: 18px; }
  .route-module-row { flex-wrap: wrap; }
  .route-module-progress { width: 100%; text-align: left; }
}

/* ---------- Subida y vista previa de archivos ---------- */
.dropzone-live { position: relative; }
.dropzone-live:hover, .dropzone-live:focus-within { border-color: var(--navy); background: #fff; }
.dropzone-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.dropzone-title { display: block; font-size: 14px; color: #1e293b; }
.dropzone-hint { display: block; margin-top: 4px; font-size: 11.5px; color: #8a95a8; }
.file-error {
  margin-top: 10px; padding: 10px 14px;
  font-size: 12.5px; color: #b91c1c;
  background: #fef2f2; border: 1px solid #fecaca; border-radius: 8px;
}
.file-chip-info { display: flex; align-items: center; gap: 12px; min-width: 0; color: #17263d; }
.file-chip-info strong { display: block; font-size: 12.5px; word-break: break-all; }
.file-chip-info small { color: #8a95a8; font-size: 11.5px; }
.file-chip-remove { width: 30px; height: 30px; border: 0; }
.file-preview-box { margin-top: 16px; }
.file-preview-label { display: block; margin-bottom: 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: #475569; }
.file-preview-note { margin: 12px 0 0; font-size: 12px; color: #64748b; }

.file-preview { display: flex; flex-direction: column; gap: 12px; }
.file-preview-frame { width: 100%; height: 62vh; min-height: 380px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; }
.file-preview-frame-text { background: #fff; }
.file-preview-media {
  display: flex; align-items: center; justify-content: center;
  padding: 12px; background: #0f172a; border-radius: 10px;
}
.file-preview-media img, .file-preview-media video { max-width: 100%; max-height: 62vh; border-radius: 6px; }
.file-preview-audio {
  padding: 20px; display: flex; align-items: center; gap: 16px;
  background: #f8fafc; border: 1px solid var(--line); border-radius: 10px;
}
.file-preview-audio audio { flex: 1; min-width: 0; }
.file-preview-icon {
  width: 52px; height: 52px; flex-shrink: 0;
  display: grid; place-items: center;
  color: var(--navy); background: #e2e8f0; border-radius: 50%;
}
.file-preview-fallback {
  padding: 36px 24px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
  background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 10px;
}
.file-preview-fallback strong { font-size: 14px; color: #0f172a; word-break: break-all; }
.file-preview-fallback p { margin: 0; font-size: 12.5px; color: #64748b; }
.file-preview-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.file-preview-actions a { text-decoration: none; }

/* Visor de archivo del lector */
.file-viewer { margin-bottom: 16px; display: flex; flex-direction: column; gap: 14px; }
.file-viewer-head { display: flex; align-items: center; gap: 12px; }
.file-viewer-icon { width: 36px; height: 36px; display: grid; place-items: center; color: var(--navy); background: #eef2f7; border-radius: 8px; }
.file-viewer-meta strong { display: block; font-size: 14px; color: #0f172a; word-break: break-all; }
.file-viewer-meta small { font-size: 12px; color: #64748b; }
.file-viewer-state { padding: 40px 20px; display: flex; flex-direction: column; align-items: center; gap: 12px; font-size: 13px; color: #64748b; background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; }
.file-viewer-error { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
.file-viewer-summary { margin: 0; font-size: 14px; line-height: 1.6; color: #475569; }

/* Estado vacío de rutas */
.route-empty-state {
  margin-bottom: 24px; padding: 48px 24px;
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  background: #fff; border: 1px dashed #cbd5e1; border-radius: 14px;
}
.route-empty-state strong { font: 800 16px "Inter", system-ui, -apple-system, sans-serif; color: #17263d; }
.route-empty-state p { margin: 0 0 12px; font-size: 13px; color: #64748b; }
.route-empty-icon {
  width: 52px; height: 52px; margin-bottom: 8px;
  display: grid; place-items: center;
  color: var(--navy); background: #f1f5f9; border-radius: 50%;
}

@media (max-width: 640px) {
  .form-row, .route-module-builder-item .form-row-modules { grid-template-columns: 1fr; }
  .modal-top, .route-modal-body, .modal-scrollable-body, .modal-footer { padding-left: 18px; padding-right: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .modal-backdrop, .modal-box, .route-modal-card, .doc-action-toast { animation: none; }
}

/* Toast global flotante para notificaciones de accion */
.doc-action-toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-radius: 10px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  font-size: 14px;
  font-weight: 500;
  min-width: 320px;
  max-width: 90vw;
  animation: toast-slide-in 0.25s ease-out;
}

.doc-action-toast.success {
  background: #17263d;
  color: #ffffff;
  border: 1px solid #2e4368;
}

.doc-action-toast.success .doc-action-toast-icon {
  color: #10b981;
  display: flex;
  align-items: center;
}

.doc-action-toast.error {
  background: #450a0a;
  color: #fecaca;
  border: 1px solid #7f1d1d;
}

.doc-action-toast.error .doc-action-toast-icon {
  color: #ef4444;
  display: flex;
  align-items: center;
}

.doc-action-toast-text {
  flex: 1;
}

.doc-action-toast-close {
  background: transparent;
  border: none;
  color: inherit;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 4px;
}

.doc-action-toast-close:hover {
  opacity: 1;
}
}

/* ---------- Animaciones del portal (fuera del anidamiento) ---------- */
@keyframes doc-spin {
  to { transform: rotate(360deg); }
}
@keyframes rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@keyframes doc-modal-in {
  from { opacity: 0; transform: translateY(10px) scale(.985); }
  to   { opacity: 1; transform: none; }
}
@keyframes doc-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes toast-slide-in {
  from {
    opacity: 0;
    transform: translate(-50%, -16px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* =============================================================================
   TEMA ALINEADO A LA APP
   El portal se abre como panel de /home junto al Calendario: toma su lenguaje visual
   (CalendarPanel.razor.css) — Inter, cabecera compacta de una línea, botones claros de 28px,
   selección en el amarillo de la app con texto azul marino y foco en rosa.
   Va al final para ganar por orden a las reglas originales del prototipo.
   ============================================================================= */
.documentation-portal {
  --navy: #17263d;
  --navy-deep: #111c2e;
  --gold: #d89d00;
  --pink: #ec0bb1;
  --app-selected: #d89d00;
  --app-selected-text: #17263d;
  --app-selected-soft: #fff3c4;
  --btn-h: 38px;
  --btn-h-sm: 32px;
  --btn-radius: 8px;

  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: #1e293b;

  &.app-shell { background: #f8fafc; }

  /* --- Cabecera (igual que la del Calendario) --- */
  .doc-panel-header {
    height: 56px;
    padding: 0 20px;
    gap: 16px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: none;
  }
  .doc-panel-header .top-brand { gap: 10px; min-width: 0; }
  .doc-header-badge {
    width: 32px; height: 32px; flex-shrink: 0;
    display: grid; place-items: center;
    color: #475569; background: #f1f5f9;
    border-radius: 8px;
  }
  .doc-header-titles { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
  .doc-header-title { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.2; color: #0f172a; }
  .doc-header-section { font-size: 12.5px; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .doc-header-section::before { content: "·"; margin-right: 8px; color: #cbd5e1; }

  .doc-panel-header .top-actions { gap: 8px; }
  .doc-panel-header .search {
    width: 260px; height: 32px;
    padding: 0 10px; gap: 7px;
    color: #64748b; background: #ffffff;
    border: 1px solid #cbd5e1; border-radius: 8px;
    transition: border-color .2s ease, box-shadow .2s ease;
  }
  .doc-panel-header .search:focus-within { border-color: var(--pink); box-shadow: 0 0 0 2px rgba(216, 27, 132, 0.12); }
  .doc-panel-header .search input { font-size: 12.5px; color: #1e293b; }
  .doc-panel-header .search input::placeholder { color: #94a3b8; }

  .doc-window-close {
    width: 28px; height: 28px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    padding: 0;
    color: #475569; background: #f1f5f9;
    border: 1px solid #cbd5e1; border-radius: 8px;
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease;
  }
  .doc-window-close:hover { color: #ef4444; background: #fee2e2; border-color: #fca5a5; }

  /* --- Pestañas: selección en el amarillo de la app --- */
  .context-tabs {
    top: 56px;
    height: 44px;
    padding: 0 20px;
    box-shadow: none;
  }
  .context-tabs-nav button {
    padding: 0 12px;
    color: #475569;
    font-size: 12.5px;
    font-weight: 500;
  }
  .context-tabs-nav button:hover { color: #0f172a; background: #f8fafc; }
  .context-tabs-nav button.active { color: var(--app-selected-text); border-bottom-color: var(--app-selected); font-weight: 600; }
  .context-tabs-nav button.active .tab-badge { color: #7a5c00; background: var(--app-selected-soft); }

  .nav-scope-badge-systime { background: var(--navy); padding: 4px 12px; font-size: 11px; box-shadow: none; }

  /* --- Contenido --- */
  .doc-page { padding: 24px 24px 48px; }
  .eyebrow, .kicker { color: #a16207; font-size: 10px; letter-spacing: 1px; }
  .welcome-row h1, .page-title h1 { font-size: 22px; font-weight: 700; color: #0f172a; letter-spacing: -.2px; }
  .page-title p, .section-desc { color: #64748b; font-size: 13px; }
  .card, .doc-card, .route-card { border-color: #e2e8f0; border-radius: 12px; }

  /* --- Categorías oficiales de SysTime: de solo lectura para los talleres --- */
  .cat-official-badge {
    padding: 2px 8px; font-size: 10px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase;
    color: #0369a1; background: #e0f2fe; border: 1px solid #bae6fd; border-radius: 6px; white-space: nowrap;
  }
  .cat-readonly-note { flex-shrink: 0; align-self: center; font-size: 11px; font-weight: 600; color: #94a3b8; }

  /* --- Seguimiento de lectura --- */
  .reading-progress {
    flex-shrink: 0;
    height: 28px;
    padding: 0 10px;
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 12px; font-weight: 600; color: #475569;
    background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 999px;
  }
  .reading-progress-bar { width: 64px; height: 6px; overflow: hidden; background: #e2e8f0; border-radius: 999px; }
  .reading-progress-bar i { display: block; height: 100%; background: var(--app-selected); border-radius: inherit; transition: width .4s ease; }
  .reading-progress.is-done { color: #166534; background: #dcfce7; border-color: #86efac; }

  .reading-confirm {
    margin-top: 16px; padding: 14px 16px;
    display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    background: var(--app-selected-soft); border: 1px solid #f0d878; border-radius: 10px;
  }
  .reading-confirm-text { flex: 1; min-width: 240px; display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; color: #7a5c00; line-height: 1.45; }
  .reading-confirm-text strong { font-size: 13px; color: #5c4500; }
  .reading-confirm-error { color: #b91c1c; font-weight: 600; }
  .reading-confirm.is-done { justify-content: flex-start; background: #f0fdf4; border-color: #bbf7d0; }
  .reading-confirm.is-done .reading-confirm-text { color: #166534; }
  .reading-confirm.is-done .reading-confirm-text strong { color: #14532d; }
  .reading-confirm-check { width: 30px; height: 30px; flex-shrink: 0; display: grid; place-items: center; color: #fff; background: #16a34a; border-radius: 50%; }
  /* Video y audio: se completan solos al reproducirlos hasta el final (no hay botón). */
  .reading-confirm.is-auto { justify-content: flex-start; background: #eff6ff; border-color: #bfdbfe; }
  .reading-confirm.is-auto .reading-confirm-text { color: #1e3a8a; }
  .reading-confirm.is-auto .reading-confirm-text strong { color: #1e3a8a; }
  .reading-confirm.is-auto .reading-confirm-check { background: #2563eb; }

  .doc-read-chip {
    margin-left: auto; margin-right: 8px;
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 8px; font-size: 10.5px; font-weight: 700;
    color: #7a5c00; background: var(--app-selected-soft); border-radius: 999px;
  }
  .doc-read-chip.is-done { color: #166534; background: #dcfce7; }

  /* Foco y elementos activos con los colores de la app */
  :focus-visible { outline-color: var(--pink); }
  .category-chip.active,
  .route-filter-btn.active,
  .doc-page-btn.active {
    color: var(--app-selected-text);
    background: var(--app-selected-soft);
    border-color: var(--app-selected);
    box-shadow: none;
  }

  /* Aviso: la persona del taller abrió el portal sin haber elegido un taller */
  .doc-workshop-required {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 16px 24px 0;
    padding: 14px 16px;
    background: #fffaeb;
    border: 1px solid #f5d77a;
    border-radius: 10px;
  }
  .doc-workshop-required-icon {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    color: #7a5c00;
    background: var(--app-selected-soft, #fff3c4);
    border-radius: 8px;
  }
  .doc-workshop-required-text {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    font-size: 13px;
    line-height: 1.45;
    color: var(--muted);
  }
  .doc-workshop-required-text strong {
    font-size: 14px;
    color: var(--navy);
  }
  .doc-workshop-required-action {
    flex-shrink: 0;
    height: var(--btn-h, 36px);
    padding: 0 16px;
    color: #fff;
    font-size: var(--btn-font, 13px);
    font-weight: 700;
    background: var(--navy);
    border: 1px solid var(--navy);
    border-radius: var(--btn-radius, 8px);
    cursor: pointer;
  }
  .doc-workshop-required-action:hover {
    background: var(--navy-deep);
    border-color: var(--navy-deep);
  }

  @media (max-width: 720px) {
    .doc-workshop-required { flex-wrap: wrap; margin: 12px 16px 0; }
    .doc-workshop-required-action { width: 100%; }
  }

  /* ── Editor de artículos ─────────────────────────────────────────────── */
  .doc-editor {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
  }
  .doc-editor:focus-within { border-color: #94a3b8; box-shadow: 0 0 0 3px rgba(23, 38, 61, 0.06); }
  .doc-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    padding: 6px 8px;
    background: #f8fafc;
    border-bottom: 1px solid var(--line);
  }
  .doc-editor-group {
    display: flex;
    align-items: center;
    gap: 2px;
    padding-right: 6px;
    margin-right: 2px;
    border-right: 1px solid var(--line);
  }
  .doc-editor-group:last-child { border-right: 0; }
  .doc-editor-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 30px;
    height: 30px;
    padding: 0 6px;
    color: #334155;
    font-size: 12px;
    font-weight: 600;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
  }
  .doc-editor-btn:hover:not(:disabled) { background: #eef2f7; color: #0f172a; }
  .doc-editor-btn.is-active {
    color: var(--app-selected-text, #7a5c00);
    background: var(--app-selected-soft, #fff3c4);
    border-color: var(--app-selected, #d89d00);
  }
  .doc-editor-btn:disabled { opacity: .5; cursor: not-allowed; }
  .doc-editor-btn-text { padding: 0 10px; }
  .doc-editor-select {
    height: 30px;
    padding: 0 8px;
    color: #0f172a;
    font-size: 12px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
  }
  .doc-editor-canvas {
    min-height: 280px;
    max-height: 520px;
    padding: 18px 22px;
    overflow-y: auto;
    outline: none;
    font-size: 14px;
    line-height: 1.7;
    color: #1e293b;
  }
  .doc-editor-canvas:has(> p:only-child > br:only-child)::before {
    content: attr(data-placeholder);
    position: absolute;
    color: #94a3b8;
    pointer-events: none;
  }
  .doc-editor-canvas img { cursor: pointer; }
  .doc-editor-canvas img.is-selected { outline: 2px solid var(--gold); outline-offset: 2px; }
  .doc-editor-status {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 12px;
    color: var(--muted);
    font-size: 11px;
    background: #f8fafc;
    border-top: 1px solid var(--line);
  }
  .doc-editor-file { display: none; }
  .doc-editor-uploading { display: flex; align-items: center; gap: 8px; margin-top: 8px; color: var(--muted); font-size: 12px; }

  /* Herramientas de imagen: coordenadas de pantalla, siguen a la imagen aunque el lienzo haga scroll */
  .doc-editor-image-tools {
    position: fixed;
    z-index: 1200;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 4px;
    background: var(--navy);
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.25);
  }
  .doc-editor-image-tools[hidden], .doc-editor-image-frame[hidden], .doc-editor-table-picker[hidden], .doc-editor-image-warn[hidden] { display: none; }
  .doc-editor-image-tools button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 26px;
    padding: 0 6px;
    color: #e2e8f0;
    font-size: 11px;
    font-weight: 700;
    background: transparent;
    border: 0;
    border-radius: 5px;
    cursor: pointer;
  }
  .doc-editor-image-tools button:hover, .doc-editor-image-tools button.is-active { color: #fff; background: rgba(255, 255, 255, 0.16); }
  .doc-editor-image-tools button.is-danger:hover { background: #dc2626; }
  .doc-editor-image-sep { width: 1px; height: 18px; margin: 0 3px; background: rgba(255, 255, 255, 0.2); }
  .doc-editor-image-size { min-width: 38px; padding: 0 4px; color: #fbbf24; font-size: 11px; font-weight: 700; text-align: center; white-space: nowrap; }
  .doc-editor-image-warn { display: inline-flex; align-items: center; gap: 3px; padding: 0 6px; color: #fca5a5; font-size: 11px; font-weight: 700; white-space: nowrap; cursor: help; }

  /* Marco de la imagen seleccionada: manijas en las esquinas y a los lados (el alto sigue la proporción). */
  .doc-editor-image-frame {
    position: fixed;
    z-index: 1199;
    box-sizing: border-box;
    border: 1.5px solid var(--gold);
    border-radius: 6px;
    pointer-events: none;
  }
  .doc-editor-image-handle {
    position: absolute;
    width: 14px;
    height: 14px;
    background: #fff;
    border: 2px solid var(--gold);
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.25);
    pointer-events: auto;
    touch-action: none;
  }
  .doc-editor-image-handle:hover { background: var(--gold); }
  .doc-editor-image-handle.is-nw { top: -8px; left: -8px; cursor: nwse-resize; }
  .doc-editor-image-handle.is-ne { top: -8px; right: -8px; cursor: nesw-resize; }
  .doc-editor-image-handle.is-se { bottom: -8px; right: -8px; cursor: nwse-resize; }
  .doc-editor-image-handle.is-sw { bottom: -8px; left: -8px; cursor: nesw-resize; }
  .doc-editor-image-handle.is-e, .doc-editor-image-handle.is-w { top: calc(50% - 12px); width: 10px; height: 24px; border-radius: 5px; cursor: ew-resize; }
  .doc-editor-image-handle.is-e { right: -6px; }
  .doc-editor-image-handle.is-w { left: -6px; }

  /* Imágenes que aún suben: se ven en su sitio, atenuadas. */
  .doc-editor-canvas img.is-uploading { opacity: .55; filter: grayscale(.3); cursor: progress; animation: docUploadPulse 1.2s ease-in-out infinite; }
  @keyframes docUploadPulse { 50% { opacity: .35; } }

  /* Tablas mientras se editan */
  .doc-editor-canvas table { min-width: 40%; }
  .doc-editor-canvas td, .doc-editor-canvas th { min-width: 60px; }
  .doc-editor-canvas td.is-active-cell, .doc-editor-canvas th.is-active-cell { outline: 2px solid var(--gold); outline-offset: -2px; }
  .doc-editor-table-tools button { white-space: nowrap; }

  .doc-editor-table-picker {
    position: fixed;
    z-index: 1300;
    padding: 10px;
    background: #fff;
    border: 1px solid var(--line, #e2e8f0);
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
  }
  .doc-editor-table-grid { display: grid; grid-template-columns: repeat(8, 20px); gap: 3px; }
  .doc-editor-table-grid button {
    width: 20px;
    height: 20px;
    padding: 0;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 3px;
    cursor: pointer;
  }
  .doc-editor-table-grid button.is-on { background: var(--app-selected-soft, #fff3c4); border-color: var(--gold, #d89d00); }
  .doc-editor-table-label { margin-top: 8px; color: #475569; font-size: 11.5px; font-weight: 600; text-align: center; }

  /* Imágenes del artículo: el ancho es un porcentaje de la columna de texto, la altura sigue la proporción */
  .tinymce-rendered-view img { max-width: 100%; height: auto; border-radius: 6px; }
  .tinymce-rendered-view img.doc-img { display: block; margin: 12px 0; }
  .tinymce-rendered-view img.doc-img-center { margin-left: auto; margin-right: auto; }
  .tinymce-rendered-view img.doc-img-right { margin-left: auto; margin-right: 0; }
  .tinymce-rendered-view img.doc-img-left { margin-left: 0; margin-right: auto; }

  /* ── Formularios de la documentación (modales claros) ─────────────────
     Paleta de modales del sistema de diseño: campos #F7F9FC con borde #E4E9F2,
     foco y acción principal en magenta, botones tipo píldora. */
  .doc-form {
    --form-accent: #d81b84;
    --form-accent-hover: #b8166f;
    --form-accent-soft: rgba(216, 27, 132, 0.12);
    --form-accent-tint: #fdf2f8;
    --form-field-bg: #f7f9fc;
    --form-field-border: #e4e9f2;
    --form-text: #1e293b;
    --form-label: #334d6e;
  }
  .doc-form [hidden] { display: none !important; }
  .doc-creation-box {
    width: min(1040px, 94vw);
    max-width: 1040px;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
  }
  .doc-form .modal-scrollable-body,
  .doc-form .route-modal-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: #f4f6fa;
  }
  .doc-form .form-step-section {
    padding: 22px 24px;
    background: #fff;
    border: 1px solid #e8edf4;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  }
  .doc-form .form-step-header { display: flex; align-items: flex-start; gap: 12px; }
  .doc-form .form-step-number {
    width: 28px; height: 28px; flex-shrink: 0;
    display: grid; place-items: center;
    color: var(--form-accent); font-size: 13px; font-weight: 700;
    background: var(--form-accent-soft);
    border-radius: 50%;
  }
  .doc-form .form-step-title { margin: 0 0 2px; color: #0f172a; font-size: 15px; font-weight: 700; }
  .doc-form .form-step-desc { color: #64748b; font-size: 12.5px; line-height: 1.45; }

  .doc-form .form-label,
  .doc-form .form-group > label {
    display: block;
    margin-bottom: 6px;
    color: var(--form-label);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.2px;
    text-transform: none;
  }
  .doc-form .form-input,
  .doc-form .form-select {
    width: 100%;
    min-height: 40px;
    padding: 9px 12px;
    color: var(--form-text);
    font-size: 13.5px;
    background: var(--form-field-bg);
    border: 1px solid var(--form-field-border);
    border-radius: 8px;
    box-shadow: none;
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
  }
  .doc-form .form-input:hover:not(:focus):not(:disabled),
  .doc-form .form-select:hover:not(:focus):not(:disabled) { border-color: #cbd5e1; }
  .doc-form .form-input:focus,
  .doc-form .form-select:focus {
    outline: none;
    background: #fff;
    border-color: var(--form-accent);
    box-shadow: 0 0 0 3px var(--form-accent-soft);
  }
  .doc-form .form-input::placeholder { color: #94a3b8; }
  .doc-form .form-select:disabled { color: #64748b; background: #eef1f6; cursor: not-allowed; }
  .doc-form .form-textarea { min-height: 84px; line-height: 1.5; resize: vertical; }
  .doc-field-hint { margin: 6px 0 0; color: #64748b; font-size: 12px; line-height: 1.45; }

  /* Pie: acción principal Navy rectangular 38px */
  .doc-form .modal-footer { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
  .doc-form .modal-footer .primary-button,
  .doc-form .modal-footer .outline-button {
    min-height: 38px;
    height: 38px;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
  }
  .doc-form .modal-footer .primary-button {
    padding: 0 20px;
    color: #fff;
    background: #17263d;
    border: 1px solid #17263d;
    box-shadow: 0 1px 2px rgba(23, 38, 61, 0.14);
  }
  .doc-form .modal-footer .primary-button:hover:not(:disabled) { background: #223656; border-color: #223656; }
  .doc-form .modal-footer .primary-button:disabled,
  .doc-form .modal-footer .primary-button:disabled:hover {
    color: #fff;
    background: #94a3b8;
    border-color: #94a3b8;
    box-shadow: none;
    cursor: not-allowed;
  }
  .doc-form .modal-footer .outline-button {
    padding: 0 18px;
    color: #17263d;
    background: #ffffff;
    border: 1px solid #cbd5e1;
  }
  .doc-form .modal-footer .outline-button:hover:not(:disabled) { background: #f8fafc; border-color: #94a3b8; }
  .doc-form .modal-footer .primary-button:focus-visible,
  .doc-form .modal-footer .outline-button:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }
  .doc-steps-footer > .outline-button:first-child { margin-right: auto; }
  .doc-steps-count { color: #94a3b8; font-size: 12px; font-weight: 600; }

  /* Pasos del formulario */
  .doc-stepper {
    display: flex;
    gap: 8px;
    margin: 0;
    padding: 12px 28px;
    list-style: none;
    background: #fff;
    border-bottom: 1px solid #eef1f6;
    overflow-x: auto;
  }
  .doc-stepper-item { flex: 1; min-width: 0; }
  .doc-stepper-item button {
    width: 100%;
    display: flex; align-items: center; gap: 10px;
    padding: 6px 14px 6px 6px;
    color: #64748b;
    font-size: 13px; font-weight: 600; text-align: left;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
  }
  .doc-stepper-item button:hover:not(:disabled) { background: var(--form-field-bg); }
  .doc-stepper-item button:disabled { cursor: default; opacity: .55; }
  .doc-stepper-dot {
    width: 28px; height: 28px; flex-shrink: 0;
    display: grid; place-items: center;
    color: #64748b; font-size: 12px; font-weight: 700;
    background: #eef1f6;
    border-radius: 50%;
    transition: background-color .2s ease, color .2s ease;
  }
  .doc-stepper-label { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .doc-stepper-item.is-current button { color: #9d174d; background: var(--form-accent-tint); border-color: #f6c3df; }
  .doc-stepper-item.is-current .doc-stepper-dot { color: #fff; background: var(--form-accent); }
  .doc-stepper-item.is-done .doc-stepper-dot { color: var(--form-accent); background: #fce7f3; }
  .doc-stepper-item.is-done button { color: var(--form-label); }

  .doc-step-error {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 14px;
    color: #9f1239; font-size: 13px; font-weight: 500;
    background: #fff1f2;
    border: 1px solid #fecdd3;
    border-radius: 10px;
  }

  /* Selector de modo (redactar / subir) como control segmentado */
  .doc-form .modal-mode-tabs {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    background: #eef1f6;
    border: 0;
    border-radius: 999px;
  }
  .doc-form .mode-tab-btn {
    display: inline-flex; align-items: center; gap: 8px;
    height: 34px; padding: 0 16px;
    color: #475569; font-size: 13px; font-weight: 600;
    background: transparent;
    border: 0;
    border-radius: 999px;
    box-shadow: none;
    transition: background-color .2s ease, color .2s ease, box-shadow .2s ease;
  }
  .doc-form .mode-tab-btn:hover:not(.active) { color: #0f172a; }
  .doc-form .mode-tab-btn.active { color: var(--form-accent); background: #fff; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12); }
  .doc-form .doc-editor { border-color: var(--form-field-border); }
  .doc-form .doc-editor:focus-within { border-color: var(--form-accent); box-shadow: 0 0 0 3px var(--form-accent-soft); }
  .doc-form .dropzone-box { background: var(--form-field-bg); border-color: #d6dde8; border-radius: 12px; }
  .doc-form .dropzone-box:hover { border-color: var(--form-accent); background: var(--form-accent-tint); }

  /* Rutas del documento como fichas seleccionables */
  .doc-route-chips { display: flex; flex-wrap: wrap; gap: 8px; }
  .doc-route-chip {
    max-width: 100%;
    min-height: 36px;
    display: inline-flex; align-items: center; gap: 8px;
    padding: 0 14px;
    color: var(--form-label); font-size: 13px; font-weight: 500;
    background: #fff;
    border: 1px solid var(--form-field-border);
    border-radius: 999px;
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease;
  }
  .doc-route-chip span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .doc-route-chip small {
    flex-shrink: 0;
    padding: 1px 7px;
    color: #64748b; font-size: 10.5px; font-weight: 700;
    background: #f1f5f9;
    border-radius: 999px;
  }
  .doc-route-chip:hover:not(:disabled) { background: var(--form-field-bg); border-color: #cbd5e1; }
  .doc-route-chip.is-selected { color: #9d174d; background: var(--form-accent-tint); border-color: var(--form-accent); }
  .doc-route-chip.is-selected small { color: #9d174d; background: #fce7f3; }
  .doc-route-chip:focus-visible { outline: 2px solid var(--form-accent); outline-offset: 2px; }

  /* Interruptor (reemplaza a las casillas de verificación) */
  .doc-switch {
    position: relative;
    display: inline-flex; align-items: center; gap: 10px;
    color: #334d6e; font-size: 13px;
    cursor: pointer;
    user-select: none;
  }
  .doc-switch input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
  .doc-switch-track {
    position: relative;
    width: 36px; height: 20px; flex-shrink: 0;
    background: #cbd5e1;
    border-radius: 999px;
    transition: background-color .2s ease;
  }
  .doc-switch-track::after {
    content: "";
    position: absolute; top: 2px; left: 2px;
    width: 16px; height: 16px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.25);
    transition: transform .2s ease;
  }
  .doc-switch input:checked + .doc-switch-track { background: #d81b84; }
  .doc-switch input:checked + .doc-switch-track::after { transform: translateX(16px); }
  .doc-switch input:focus-visible + .doc-switch-track { outline: 2px solid #d81b84; outline-offset: 2px; }
  .doc-switch-sm { font-size: 12.5px; font-weight: 500; }

  /* Fichas de tipo de recurso */
  .doc-kind-badge {
    flex-shrink: 0;
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 9px;
    font-size: 10.5px; font-weight: 700; letter-spacing: .02em;
    white-space: nowrap;
    border-radius: 999px;
  }
  .doc-kind-badge.kind-article { color: #0369a1; background: #e0f2fe; }
  .doc-kind-badge.kind-file { color: #475569; background: #f1f5f9; }
  .doc-kind-badge.kind-evaluation { color: #9d174d; background: #fce7f3; }
  .doc-kind-badge.kind-simulator { color: #6d28d9; background: #ede9fe; }

  /* ── Modal de rutas: documentos de la ruta ─────────────────────────── */
  .doc-picker {
    display: flex; flex-direction: column; gap: 10px;
    padding: 14px;
    background: #f7f9fc;
    border: 1px solid #e4e9f2;
    border-radius: 10px;
  }
  .doc-picker-search { position: relative; display: flex; align-items: center; }
  .doc-picker-search > svg { position: absolute; left: 12px; color: #94a3b8; pointer-events: none; }
  .doc-form .doc-picker-search .form-input { padding-left: 36px; background: #fff; }
  .doc-picker-filters { display: flex; flex-wrap: wrap; gap: 6px; }
  .doc-filter-pill {
    height: 28px; padding: 0 12px;
    color: #475569; font-size: 12px; font-weight: 600;
    background: #fff;
    border: 1px solid #e4e9f2;
    border-radius: 999px;
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease;
  }
  .doc-filter-pill:hover:not(.active) { border-color: #cbd5e1; }
  .doc-filter-pill.active { color: #fff; background: #d81b84; border-color: #d81b84; }
  .doc-picker-results { display: flex; flex-direction: column; gap: 4px; max-height: 280px; overflow-y: auto; }
  .doc-picker-row {
    width: 100%;
    display: flex; align-items: center; gap: 12px;
    padding: 8px 10px;
    text-align: left;
    background: #fff;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color .2s ease, box-shadow .2s ease;
  }
  .doc-picker-row:hover:not(:disabled) { border-color: #f3a8d0; box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06); }
  .doc-picker-row:focus-visible { outline: 2px solid #d81b84; outline-offset: 1px; }
  .doc-picker-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .doc-picker-text strong { overflow: hidden; color: #1e293b; font-size: 13px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
  .doc-picker-text small { color: #64748b; font-size: 11.5px; }
  .doc-picker-add { flex-shrink: 0; display: inline-flex; align-items: center; gap: 4px; color: #d81b84; font-size: 12px; font-weight: 600; }
  .doc-picker-empty, .doc-picker-more { margin: 0; padding: 8px 4px; color: #64748b; font-size: 12.5px; }
  .doc-linked-empty {
    margin: 12px 0 0; padding: 14px;
    color: #64748b; font-size: 12.5px; text-align: center;
    border: 1px dashed #d6dde8;
    border-radius: 10px;
  }
  .doc-linked-list { display: flex; flex-direction: column; gap: 6px; margin: 14px 0 0; padding: 0; list-style: none; }
  .doc-linked-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid #e4e9f2;
    border-radius: 8px;
  }
  .doc-linked-remove {
    width: 30px; height: 30px; flex-shrink: 0;
    display: grid; place-items: center;
    color: #94a3b8;
    background: transparent;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
  }
  .doc-linked-remove:hover:not(:disabled) { color: #dc2626; background: #fef2f2; }
  .doc-form .route-module-builder-item {
    padding: 16px 18px;
    background: #fff;
    border: 1px solid #e4e9f2;
    border-radius: 10px;
    box-shadow: none;
  }
  .doc-form .route-module-builder-item:hover { border-color: #d6dde8; box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06); }
  /* Módulo sin documento tras intentar guardar: no se podría completar. */
  .doc-form .route-module-builder-item.has-error,
  .doc-form .route-module-builder-item.has-error:hover { background: #fff7f7; border-color: #fecaca; }
  .route-module-builder-item.has-error .form-select { border-color: #f87171; }
  .route-module-missing { display: block; margin-top: 6px; font-size: 11.5px; font-weight: 600; color: #b91c1c; }
  .doc-form .route-module-builder-item .form-row-modules { grid-template-columns: 1fr 1fr; }
  .doc-form .route-module-tag { color: #9d174d; }
  .doc-form .form-step-header-split .outline-button {
    border-radius: 8px;
    color: #17263d;
    border-color: #cbd5e1;
    background: #fff;
  }
  .doc-form .form-step-header-split .outline-button:hover:not(:disabled) { background: #f8fafc; border-color: #94a3b8; }

  /* ── Constructor de evaluaciones (tarjetas tipo formulario) ──────────── */
  .quiz-builder { display: flex; flex-direction: column; gap: 14px; margin-top: 4px; }
  .qb-card {
    position: relative;
    padding: 18px 22px;
    background: #fff;
    border: 1px solid #e4e9f2;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: box-shadow .2s ease, border-color .2s ease;
  }
  .qb-card::before {
    content: "";
    position: absolute; top: -1px; bottom: -1px; left: -1px;
    width: 6px;
    background: transparent;
    border-radius: 12px 0 0 12px;
    transition: background-color .2s ease;
  }
  .qb-settings { border-top: 6px solid #d81b84; }
  .qb-settings::before { display: none; }
  .qb-settings-head h5 { margin: 0 0 2px; color: #0f172a; font-size: 15px; font-weight: 700; }
  .quiz-summary { color: #64748b; font-size: 12.5px; font-weight: 500; }
  .qb-settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px 18px; margin-top: 16px; }
  .qb-settings-grid .form-group { margin-bottom: 0; }
  .qb-switches { display: flex; flex-wrap: wrap; gap: 12px 28px; margin-top: 16px; padding-top: 14px; border-top: 1px solid #eef1f6; }
  .quiz-input-suffix { display: flex; align-items: center; gap: 8px; }
  .quiz-input-suffix .form-input { max-width: 96px; }
  .quiz-input-suffix span { color: #64748b; font-weight: 700; }
  .quiz-errors {
    margin: 0;
    padding: 10px 14px 10px 30px;
    color: #9f1239;
    font-size: 13px;
    background: #fff1f2;
    border: 1px solid #fecdd3;
    border-radius: 10px;
  }

  .quiz-question { display: flex; flex-direction: column; gap: 14px; }
  .quiz-question.is-active { box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08); }
  .quiz-question.is-active::before { background: #d81b84; }
  .qb-question-top { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px; }
  .qb-question-number {
    width: 28px; height: 28px; flex-shrink: 0;
    display: grid; place-items: center;
    margin-top: 7px;
    color: #64748b; font-size: 12px; font-weight: 700;
    background: #f1f4f9;
    border-radius: 50%;
    transition: background-color .2s ease, color .2s ease;
  }
  .quiz-question.is-active .qb-question-number { color: #fff; background: #d81b84; }
  .qb-question-text {
    flex: 1 1 320px;
    min-height: 44px;
    padding: 10px 12px;
    color: #0f172a;
    font-size: 15px; font-weight: 500; line-height: 1.45;
    background: #f7f9fc;
    border: 0;
    border-bottom: 1px solid #cbd5e1;
    border-radius: 6px 6px 0 0;
    resize: vertical;
    field-sizing: content;
    transition: background-color .2s ease, border-color .2s ease;
  }
  .qb-question-text:focus { outline: none; background: #f1f4f9; border-bottom: 2px solid #d81b84; padding-bottom: 9px; }
  .qb-type { position: relative; flex: 0 0 220px; display: flex; align-items: center; }
  .qb-type-icon { position: absolute; left: 12px; display: flex; color: #64748b; pointer-events: none; }
  .qb-type .quiz-type-select {
    width: 100%; height: 42px;
    padding: 0 12px 0 38px;
    color: #1e293b; font-size: 13px; font-weight: 500;
    background: #fff;
    border: 1px solid #e4e9f2;
    border-radius: 8px;
    cursor: pointer;
  }
  .qb-type .quiz-type-select:focus { outline: none; border-color: #d81b84; box-shadow: 0 0 0 3px rgba(216, 27, 132, 0.12); }

  .quiz-options { display: flex; flex-direction: column; gap: 2px; padding-left: 40px; }
  .quiz-options-hint { margin-bottom: 4px; color: #94a3b8; font-size: 11px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; }
  .quiz-option {
    min-height: 42px;
    display: flex; align-items: center; gap: 12px;
    padding: 2px 4px;
    border: 1px solid transparent;
    border-radius: 8px;
    transition: background-color .15s ease;
  }
  .quiz-option:hover { background: #f8fafc; }
  .quiz-option.is-correct { background: #f0fdf4; }
  .quiz-option > .qb-mark { flex-shrink: 0; width: 18px; height: 18px; margin-left: 6px; accent-color: #16a34a; cursor: pointer; }
  .quiz-option-text {
    flex: 1; min-width: 0;
    padding: 8px 2px;
    color: #1e293b; font-size: 14px;
    background: transparent;
    border: 0;
    border-bottom: 1px solid transparent;
    transition: border-color .15s ease;
  }
  .quiz-option-text:hover { border-bottom-color: #e2e8f0; }
  .quiz-option-text:focus { outline: none; border-bottom: 2px solid #d81b84; padding-bottom: 7px; }
  .quiz-option-fixed { flex: 1; padding: 8px 0; color: #1e293b; font-size: 14px; font-weight: 500; }
  .quiz-correct-tag, .quiz-answer-tag {
    flex-shrink: 0;
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 8px;
    color: #166534;
    font-size: 10px; font-style: normal; font-weight: 800;
    text-transform: uppercase;
    background: #dcfce7;
    border-radius: 999px;
  }
  .qb-icon-btn {
    width: 34px; height: 34px; flex-shrink: 0;
    display: grid; place-items: center;
    color: #64748b;
    background: transparent;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
  }
  .qb-icon-btn:hover:not(:disabled) { color: #0f172a; background: #f1f4f9; }
  .qb-icon-btn:disabled { opacity: .35; cursor: not-allowed; }
  .qb-icon-btn:focus-visible { outline: 2px solid #d81b84; outline-offset: 1px; }
  .quiz-danger:hover:not(:disabled) { color: #dc2626; background: #fef2f2; }
  .quiz-add-option {
    min-height: 42px;
    display: flex; align-items: center; gap: 12px;
    padding: 2px 4px;
    color: #64748b; font-size: 14px; text-align: left;
    background: transparent;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
  }
  .quiz-add-option:hover { color: #d81b84; background: #fdf2f8; }
  .qb-mark-ghost { width: 18px; height: 18px; flex-shrink: 0; margin-left: 6px; border: 2px solid #cbd5e1; }
  .qb-mark-radio { border-radius: 50%; }
  .qb-mark-checkbox { border-radius: 4px; }
  .qb-explanation {
    display: flex; align-items: center; gap: 10px;
    margin-left: 40px;
    padding: 6px 12px;
    color: #64748b;
    background: #f7f9fc;
    border-radius: 8px;
  }
  .quiz-explanation {
    flex: 1; min-width: 0;
    padding: 6px 0;
    color: #334155; font-size: 13px;
    background: transparent;
    border: 0;
    border-bottom: 1px solid #cbd5e1;
  }
  .quiz-explanation:focus { outline: none; border-bottom: 2px solid #d81b84; }
  .qb-toolbar {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
    padding-top: 12px;
    border-top: 1px solid #eef1f6;
  }
  .qb-toolbar-left, .qb-toolbar-right { display: flex; align-items: center; gap: 6px; }
  .qb-text-btn {
    height: 32px;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 0 12px;
    color: #475569; font-size: 12.5px; font-weight: 600;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
  }
  .qb-text-btn:hover { background: #f1f4f9; }
  .qb-text-btn.active { color: #9d174d; background: #fdf2f8; }
  .quiz-points {
    height: 32px;
    display: inline-flex; align-items: center; gap: 4px;
    padding: 0 10px 0 6px;
    color: #64748b; font-size: 12px; font-weight: 600;
    background: #f7f9fc;
    border: 1px solid #e4e9f2;
    border-radius: 999px;
  }
  .quiz-points:focus-within { border-color: #d81b84; box-shadow: 0 0 0 3px rgba(216, 27, 132, 0.12); }
  .quiz-points input { width: 44px; padding: 0; color: #1e293b; font-size: 13px; font-weight: 700; text-align: center; background: transparent; border: 0; }
  .quiz-points input:focus { outline: none; }
  .qb-toolbar-sep { width: 1px; height: 24px; margin: 0 6px; background: #e4e9f2; }
  .quiz-add-question {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 14px;
    color: #d81b84; font-size: 13.5px; font-weight: 600;
    background: #fff;
    border: 1.5px dashed #f3a8d0;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease;
  }
  .quiz-add-question:hover:not(:disabled) { background: #fdf2f8; border-color: #d81b84; }
  .quiz-add-question:disabled { opacity: .5; cursor: not-allowed; }
  .quiz-question-number {
    width: 26px; height: 26px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; font-size: 12px; font-weight: 800;
    background: var(--navy);
    border-radius: 50%;
  }

  /* ── Vistas del portal ──────────────────────────────────────────────── */
  .doc-header-btn { border-radius: 8px; min-height: 38px; transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease; }
  .doc-header-btn-primary {
    color: #fff;
    background: #17263d;
    border-color: #17263d;
    box-shadow: 0 1px 2px rgba(23, 38, 61, 0.14);
  }
  .doc-header-btn-primary:hover { color: #fff; background: #223656; border-color: #223656; }
  .category-chip { border-radius: 999px; }

  /* Tarjetas del catálogo: franja de color por tipo y elevación suave */
  .doc-card { position: relative; overflow: hidden; border: 1px solid #e4e9f2; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04); }
  .doc-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: #7dd3fc; }
  .doc-card.kind-file::before { background: #cbd5e1; }
  .doc-card.kind-evaluation::before { background: #d81b84; }
  .doc-card.kind-simulator::before { background: #8b5cf6; }
  .doc-card:hover { border-color: #d6dde8; box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08); }
  .doc-card-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
  .doc-card .doc-title { color: #0f172a; font-size: 15px; font-weight: 700; line-height: 1.35; }
  .doc-card .doc-summary { color: #64748b; font-size: 13px; line-height: 1.5; }
  .route-link-banner {
    display: flex; align-items: center; gap: 8px;
    margin-top: 12px;
    padding: 8px 10px 8px 12px;
    color: #334d6e; font-size: 12px;
    background: #f7f9fc;
    border: 1px solid #e4e9f2;
    border-radius: 8px;
  }
  .route-link-banner > svg { flex-shrink: 0; color: #d81b84; }
  .route-link-banner > span { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .route-link-banner button {
    flex-shrink: 0;
    display: inline-flex; align-items: center; gap: 2px;
    padding: 4px 8px;
    color: #d81b84; font-size: 12px; font-weight: 600;
    background: transparent;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
  }
  .route-link-banner button:hover { background: #fdf2f8; }

  /* Lector de documentos */
  .doc-reader-modal {
    width: min(1120px, 94vw);
    max-width: 1120px;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
  }
  .doc-reader-top { align-items: flex-start; gap: 16px; padding: 18px 28px; border-bottom: 1px solid #eef1f6; }
  .doc-reader-head { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
  .doc-reader-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
  .doc-reader-title { margin: 0; color: #0f172a; font-size: 20px; font-weight: 700; line-height: 1.3; }
  .doc-reader-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; color: #64748b; font-size: 12px; }
  .doc-reader-meta span { display: inline-flex; align-items: center; gap: 4px; }
  .doc-reader-actions { display: flex; align-items: center; gap: 6px; }
  .doc-reader-delete { color: #ef4444; border: 0; }
  .doc-reader-delete:hover { color: #dc2626; background: #fef2f2; }
  .doc-reader-body {
    flex: 1;
    overflow-y: auto;
    padding: 28px 40px 40px;
    color: #1e293b;
    font-size: 14.5px;
    line-height: 1.75;
  }
  .doc-reader-body .tinymce-rendered-view { max-width: 100%; margin: 0; }
  .doc-reader-body .tinymce-rendered-view h1,
  .doc-reader-body .tinymce-rendered-view h2,
  .doc-reader-body .tinymce-rendered-view h3 { color: #0f172a; line-height: 1.3; }
  .doc-reader-body .tinymce-rendered-view blockquote {
    margin: 16px 0;
    padding: 10px 16px;
    color: #475569;
    background: #f7f9fc;
    border-radius: 0 8px 8px 0;
  }
  .doc-reader-body .tinymce-rendered-view a { color: #17263d; text-decoration: underline; text-underline-offset: 2px; }
  .doc-reader-route {
    display: flex; align-items: center; gap: 12px;
    max-width: 100%;
    margin: 0 0 24px;
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
  }
  .doc-reader-route-icon {
    width: 34px; height: 34px; flex-shrink: 0;
    display: grid; place-items: center;
    color: #17263d;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
  }
  .doc-reader-route-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
  .doc-reader-route-text strong { color: #0f172a; font-size: 13px; }
  .doc-reader-route-text span { color: #475569; font-size: 12px; }
  .doc-reader-route .outline-button { border-radius: 8px; }

  /* Rutas: módulos y documento de cada módulo */
  .route-module-doc {
    display: inline-flex; align-items: center; gap: 6px;
    max-width: 100%;
    padding: 4px 10px;
    color: #334d6e; font-size: 12px;
    background: #f7f9fc;
    border: 1px solid #e4e9f2;
    border-radius: 999px;
    cursor: pointer;
    transition: border-color .2s ease, background-color .2s ease, color .2s ease;
  }
  .route-module-doc:hover { color: #9d174d; background: #fdf2f8; border-color: #f3a8d0; }
  .route-module-doc span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .route-module-doc-kind { flex-shrink: 0; color: #94a3b8; font-size: 10px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
  .route-card { transition: border-color .2s ease, box-shadow .2s ease; }
  .route-card:hover { border-color: #d6dde8; box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08); }

  /* ── Vistas del portal: cabecera, pestañas y botones ───────────────── */
  .doc-header-role {
    max-width: 260px;
    padding: 4px 10px;
    overflow: hidden;
    color: #475569; font-size: 12px; font-weight: 600;
    white-space: nowrap; text-overflow: ellipsis;
    background: #f1f5f9;
    border-radius: 999px;
  }
  .context-tabs-nav button { display: inline-flex; align-items: center; gap: 7px; }
  .context-tabs-nav button svg { color: #94a3b8; transition: color .15s ease; }
  .context-tabs-nav button:hover svg,
  .context-tabs-nav button.active svg { color: var(--pink); }
  .nav-scope-switcher { background: #f1f4f9; border-color: #e4e9f2; }
  .nav-scope-btn { height: 28px; padding: 0 12px; font-size: 12px; }

  .doc-page .primary-button {
    min-height: 38px;
    color: #fff;
    background: #17263d;
    border-color: #17263d;
    border-radius: 8px;
  }
  .doc-page .primary-button:hover:not(:disabled) { background: #223656; border-color: #223656; }
  .doc-page .outline-button {
    min-height: 38px;
    color: #17263d;
    background: #ffffff;
    border-color: #cbd5e1;
    border-radius: 8px;
  }
  .doc-page .outline-button:hover:not(:disabled) { background: #f8fafc; border-color: #94a3b8; }
  .btn-sm,
  .doc-page .btn-sm {
    min-height: 32px;
    height: 32px;
    padding: 0 12px;
    font-size: 12px;
  }
  .card { border-color: #e2e8f0; border-radius: 12px; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04); }
  .welcome-row h1, .page-title h1 { font-size: 24px; font-weight: 700; letter-spacing: -.3px; }
  .doc-section-head { align-items: flex-end; margin-bottom: 18px; }
  .doc-section-head .section-desc { max-width: 640px; }

  /* Resumen en cifras */
  .doc-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
  .doc-exec-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .doc-stat {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
  .doc-stat:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px -2px rgba(15, 23, 42, 0.06);
  }
  .doc-stat-icon {
    width: 40px; height: 40px; flex-shrink: 0;
    display: grid; place-items: center;
    color: #475569;
    background: #f1f5f9;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(15, 23, 42, 0.04);
  }
  .doc-stat-icon.is-done { color: #15803d; background: #dcfce7; }
  .doc-stat-icon.is-progress { color: #a16207; background: #fef3c7; }
  .doc-stat-icon.is-evaluation { color: #9d174d; background: #fce7f3; }
  .doc-stat-icon.is-route { color: #d81b84; background: #fdf2f8; }
  .doc-stat-icon.is-time { color: #0369a1; background: #e0f2fe; }
  .doc-stat strong { display: block; color: #0f172a; font-size: 19px; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
  .doc-stat div > span { color: #64748b; font-size: 12px; font-weight: 500; }
  .doc-stats-compact { grid-template-columns: repeat(3, minmax(130px, 1fr)); margin: 0; }

  /* Cabeceras limpias de modales y estados de carga */
  .modal-heading { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
  .modal-eyebrow { display: block; margin-bottom: 2px; font-size: 10px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: #a16207; }
  .modal-title { display: block; font-size: 18px; font-weight: 800; color: #0f172a; line-height: 1.25; }
  .modal-subtitle { margin: 2px 0 0; font-size: 12.5px; color: #64748b; line-height: 1.45; }
  .modal-close-btn { border: 1px solid #e2e8f0; background: #f8fafc; width: 32px; height: 32px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; color: #475569; cursor: pointer; transition: background-color .15s ease, color .15s ease, border-color .15s ease; }
  .modal-close-btn:hover { background: #fee2e2; color: #dc2626; border-color: #fca5a5; }
  .doc-loading-title { font-size: 14px; font-weight: 600; color: #475569; margin-bottom: 6px; }
  .doc-loading-sub { font-size: 12px; color: #94a3b8; }

  /* Barra de búsqueda y filtros del catálogo */
  .doc-toolbar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin-bottom: 12px !important;
  }
  .doc-toolbar-search {
    flex: 1 1 260px;
    height: 38px !important;
    display: flex; align-items: center; gap: 8px;
    padding: 0 12px;
    color: #94a3b8;
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
  }
  .doc-toolbar-search:focus-within { background: #fff; border-color: #17263d !important; box-shadow: 0 0 0 3px rgba(23, 38, 61, 0.1); }
  .doc-toolbar-search input { flex: 1; min-width: 0; color: #1e293b; font-size: 13px; background: transparent; border: 0; outline: 0; }
  .doc-toolbar-search input::placeholder { color: #94a3b8; }
  .doc-toolbar-kinds { display: flex; flex-wrap: wrap; gap: 6px; }
  .doc-filter-pill { display: inline-flex; align-items: center; height: 30px; }
  .doc-filter-pill small { margin-left: 6px; padding: 0 6px; color: #64748b; font-size: 10.5px; font-weight: 700; background: #f1f5f9; border-radius: 999px; }
  .doc-filter-pill.active small { color: #d81b84; background: #fff; }
  .doc-toolbar-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
  .doc-toolbar-sort { display: flex; align-items: center; gap: 8px; color: #64748b; font-size: 12px; font-weight: 600; }
  .doc-toolbar-sort select {
    color-scheme: light;
    height: 38px;
    padding: 0 10px;
    color: #1e293b; font-size: 12.5px;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    cursor: pointer;
  }
  .doc-toolbar-sort select:focus { outline: none; border-color: #17263d; box-shadow: 0 0 0 3px rgba(23, 38, 61, 0.1); }
  .doc-toolbar-sort select option,
  .doc-toolbar-sort select optgroup {
    color-scheme: light;
    background-color: #ffffff;
    color: #1e293b;
  }
  .doc-toolbar-sort select optgroup {
    font-weight: 700;
    color: #64748b;
  }
  .doc-view-toggle { display: inline-flex; gap: 2px; padding: 3px; background: #f1f4f9; border-radius: 8px; }
  .doc-view-toggle button {
    width: 30px; height: 28px;
    display: grid; place-items: center;
    color: #64748b;
    background: transparent;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
  }
  .doc-view-toggle button.active { color: #17263d; background: #fff; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12); }

  .category-chips { gap: 6px; margin-bottom: 18px; }
  .category-chip {
    display: inline-flex; align-items: center; gap: 6px;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: #475569 !important;
    border-radius: 8px !important;
    padding: 6px 12px !important;
    font-size: 13px !important;
    height: auto;
  }
  .category-chip:hover:not(.active) { border-color: #cbd5e1 !important; color: #1e293b !important; }
  .category-chip.active {
    background: #17263d !important;
    border-color: #17263d !important;
    color: #ffffff !important;
    box-shadow: none !important;
  }
  .category-chip small { padding: 1px 6px; color: #64748b; font-size: 11px; font-weight: 700; background: #f1f5f9; border-radius: 999px; }
  .category-chip.active small { background: rgba(255, 255, 255, 0.2) !important; color: #ffffff !important; }

  /* Tarjetas de documento */
  .doc-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
  .doc-page .doc-card::before, .doc-card::before { display: none !important; }
  .doc-page .doc-card, .doc-card {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
  }
  .doc-page .doc-card:hover, .doc-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
    transform: translateY(-1px);
  }
  .doc-page .doc-kind-badge {
    background: #f1f5f9 !important;
    color: #334155 !important;
    border: 1px solid #e2e8f0 !important;
    font-weight: 600;
    font-size: 11.5px;
    padding: 3px 9px;
    border-radius: 6px;
  }
  .doc-card-top { min-height: 26px; display: flex; align-items: center; gap: 6px; }
  .doc-origin {
    max-width: 150px;
    padding: 3px 8px;
    overflow: hidden;
    font-size: 10.5px; font-weight: 700;
    white-space: nowrap; text-overflow: ellipsis;
    border-radius: 999px;
  }
  .doc-origin.is-systime { color: #1a365d; background: #e8eef7; }
  .doc-origin.is-workshop { color: #92400e; background: #fef3c7; }
  .doc-card-tools { position: relative; z-index: 2; display: flex; gap: 2px; margin-left: auto; }
  .doc-icon-action {
    width: 30px; height: 30px;
    display: grid; place-items: center;
    color: #64748b;
    background: transparent;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
  }
  .doc-icon-action:hover { color: #0f172a; background: #f1f4f9; }
  .doc-icon-action.is-danger:hover { color: #dc2626; background: #fef2f2; }
  .doc-icon-action:focus-visible { outline: 2px solid #d81b84; outline-offset: 1px; }
  .doc-card .doc-title {
    margin: 2px 0 0;
    font-size: 15.5px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .doc-card-open { padding: 0; color: inherit; font: inherit; text-align: left; background: transparent; border: 0; cursor: pointer; }
  .doc-card-open::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
  .doc-card-open:focus-visible { outline: none; }
  .doc-card:has(.doc-card-open:focus-visible),
  .route-card:has(.doc-card-open:focus-visible),
  .doc-list-row:has(.doc-card-open:focus-visible) { outline: 2px solid #d81b84; outline-offset: 2px; }
  .doc-card .doc-summary {
    margin: 0; min-height: 39px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .doc-card-meta { display: flex; flex-wrap: wrap; gap: 4px 0; color: #64748b; font-size: 11.5px; }
  .doc-card-meta span + span::before { content: "·"; margin: 0 8px; color: #cbd5e1; }
  .doc-card-code { flex-basis: 100%; margin-top: 2px; color: #94a3b8; font-family: ui-monospace, "Segoe UI Mono", monospace; font-size: 11px; }
  .doc-card-meta .doc-card-code::before { content: none; }
  .doc-route-pill {
    position: relative; z-index: 2;
    max-width: 100%;
    align-self: flex-start;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px;
    color: #9d174d; font-size: 12px; font-weight: 600;
    background: #fdf2f8;
    border: 1px solid #f9d0e6;
    border-radius: 999px;
    cursor: pointer;
    transition: border-color .15s ease;
  }
  .doc-route-pill span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .doc-route-pill:hover { border-color: #d81b84; }
  .doc-card-foot { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 12px; border-top: 1px solid #eef1f6; }
  .doc-page .doc-card-cta, .doc-card-cta {
    margin-left: auto;
    color: #17263d !important;
    font-weight: 600;
    font-size: 13px;
    background: transparent;
    border: 0;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
  }
  .doc-page .doc-card-cta:hover, .doc-card-cta:hover {
    color: #0f172a !important;
    text-decoration: underline;
  }
  .doc-card-cta svg { transition: transform .2s ease; }
  .doc-card:hover .doc-card-cta svg { transform: translateX(2px); }

  .doc-read-state { display: inline-flex; align-items: center; gap: 6px; color: #94a3b8; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
  .doc-read-state.is-done { padding: 2px 8px; color: #15803d; background: #dcfce7; border-radius: 999px; }
  .doc-read-state.is-progress { color: #a16207; }
  .doc-read-bar { width: 48px; height: 5px; overflow: hidden; background: #eef1f6; border-radius: 999px; }
  .doc-read-bar i { display: block; height: 100%; background: #eab308; border-radius: inherit; }

  /* Vista de lista */
  .doc-list { display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 1px solid #e4e9f2; border-radius: 12px; }
  .doc-list-row {
    position: relative;
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto auto 68px;
    align-items: center; gap: 14px;
    padding: 12px 16px;
    border-top: 1px solid #eef1f6;
    transition: background-color .15s ease;
  }
  .doc-list-row:first-child { border-top: 0; }
  .doc-list-row:hover { background: #f8fafc; }
  .doc-list-icon {
    width: 34px; height: 34px; flex-shrink: 0;
    display: grid; place-items: center;
    color: #0369a1;
    background: #e0f2fe;
    border-radius: 9px;
  }
  .doc-list-icon.kind-file { color: #475569; background: #f1f5f9; }
  .doc-list-icon.kind-evaluation { color: #9d174d; background: #fce7f3; }
  .doc-list-icon.kind-simulator { color: #6d28d9; background: #ede9fe; }
  .doc-list-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
  .doc-list-main .doc-card-open { overflow: hidden; color: #0f172a; font-size: 14px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
  .doc-list-row .doc-card-open::after { border-radius: 0; }
  .doc-list-sub { display: flex; flex-wrap: wrap; color: #64748b; font-size: 11.5px; }
  .doc-list-sub span + span::before { content: "·"; margin: 0 6px; color: #cbd5e1; }
  .doc-list-route { min-width: 0; }
  .doc-list-time { display: inline-flex; align-items: center; gap: 4px; color: #64748b; font-size: 12px; white-space: nowrap; }
  .doc-list-actions { position: relative; z-index: 2; display: flex; justify-content: flex-end; gap: 2px; }

  /* Estados vacíos */
  .doc-empty {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    padding: 48px 24px;
    text-align: center;
    background: #fff;
    border: 1px dashed #d6dde8;
    border-radius: 14px;
  }
  .doc-empty-icon { width: 52px; height: 52px; display: grid; place-items: center; color: #d81b84; background: #fdf2f8; border-radius: 14px; }
  .doc-empty strong { color: #0f172a; font-size: 15px; }
  .doc-empty p { max-width: 420px; margin: 0; color: #64748b; font-size: 13px; }
  .doc-empty-actions { display: flex; gap: 10px; margin-top: 8px; }

  /* Control segmentado (filtro de rutas) */
  .doc-segmented { display: inline-flex; gap: 2px; margin-bottom: 18px; padding: 3px; background: #f1f4f9; border-radius: 999px; }
  .doc-segmented button {
    height: 32px;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 0 14px;
    color: #475569; font-size: 12.5px; font-weight: 600;
    background: transparent;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
  }
  .doc-segmented button small { color: #94a3b8; font-weight: 700; }
  .doc-segmented button.active { color: #0f172a; background: #fff; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12); }
  .doc-segmented button.active small { color: #d81b84; }

  /* Tarjetas de ruta */
  .route-card { position: relative; gap: 8px; padding: 18px; cursor: default; }
  .route-card.selected { border-color: #d81b84; box-shadow: 0 0 0 3px rgba(216, 27, 132, 0.12); }
  .route-card-top { justify-content: flex-start; margin-bottom: 4px; }
  .route-card-state { display: inline-flex; align-items: center; gap: 4px; color: #d81b84; }
  .route-card-title { margin: 0; }
  .route-card-desc { min-height: 0; margin: 0; }
  .route-card-meta { justify-content: flex-start; gap: 6px 14px; margin: 4px 0 0; padding-top: 12px; }
  .route-card-meta span { display: inline-flex; align-items: center; gap: 5px; }
  .route-card-progress-row { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
  .route-card-progress-row .mini-progress { flex: 1; height: 6px; margin: 0; }
  .route-card-progress-row strong { color: #0f172a; font-size: 12.5px; }

  /* Detalle de la ruta como línea de tiempo */
  .route-detail-side { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
  .route-detail-progress { display: flex; align-items: center; gap: 16px; }
  .route-detail-progress > div:last-child { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
  .route-detail-done { display: inline-flex; align-items: center; gap: 4px; color: #15803d; font-weight: 600; }
  .route-detail-actions { display: flex; flex-wrap: wrap; gap: 8px; }
  .route-timeline { position: relative; margin: 0; padding: 8px 30px 24px; list-style: none; }
  .route-step {
    position: relative;
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    align-items: start; gap: 16px;
    padding: 12px 0;
  }
  .route-step::before { content: ""; position: absolute; top: 0; bottom: 0; left: 17px; width: 2px; background: #e4e9f2; }
  .route-step:first-child::before { top: 30px; }
  .route-step:last-child::before { bottom: auto; height: 30px; }
  .route-step:only-child::before { display: none; }
  .route-step.is-done::before { background: #86efac; }
  .route-step-dot {
    position: relative; z-index: 1;
    width: 36px; height: 36px;
    display: grid; place-items: center;
    color: #64748b; font-size: 12px; font-weight: 700;
    background: #fff;
    border: 2px solid #e4e9f2;
    border-radius: 50%;
  }
  .route-step.is-done .route-step-dot { color: #fff; background: #16a34a; border-color: #16a34a; }
  .route-step.is-current .route-step-dot { color: #fff; background: #d81b84; border-color: #d81b84; box-shadow: 0 0 0 4px rgba(216, 27, 132, 0.15); }
  .route-step.is-plain .route-step-dot { color: #9d174d; background: #fdf2f8; border-color: #f9d0e6; }
  .route-step-body { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding-top: 6px; }
  .route-step-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
  .route-step-head .route-module-title { margin: 0; color: #0f172a; font-size: 14.5px; font-weight: 600; }
  .route-step-status { padding: 2px 8px; color: #64748b; font-size: 11px; font-weight: 700; background: #f1f5f9; border-radius: 999px; }
  .route-step.is-done .route-step-status { color: #15803d; background: #dcfce7; }
  .route-step.is-current .route-step-status { color: #9d174d; background: #fce7f3; }
  .route-step-progress { width: 180px; height: 5px; }
  .route-step-howto { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; color: #64748b; font-size: 11.5px; }
  .route-step-action { margin-top: 4px; }
  .route-module-nodoc { color: #94a3b8; font-size: 12px; font-style: italic; }
  .route-module-doc-time { color: #94a3b8; font-size: 11px; }

  /* Inicio */
  .dashboard-page .welcome-row { flex-wrap: wrap; align-items: flex-end; gap: 20px; }
  .doc-continue {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 24px;
    margin-bottom: 4px;
    padding: 24px 26px;
    color: #fff;
    background: linear-gradient(135deg, #111c2e 0%, #17263d 65%, #1e3352 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(17, 28, 46, 0.22);
  }
  .doc-continue .kicker { color: #f5b82e; }
  .doc-continue h2 { margin: 6px 0 14px; color: #fff; font-size: 22px; font-weight: 700; line-height: 1.3; }
  .doc-continue-progress { max-width: 420px; display: flex; align-items: center; gap: 12px; }
  .doc-continue-progress .progress-track { flex: 1; max-width: none; height: 8px; background: rgba(255, 255, 255, 0.15); }
  .doc-continue-progress .progress-track i { background: linear-gradient(90deg, #d89d00, #f5b82e); }
  .doc-continue-progress strong { color: #fff; font-size: 15px; }
  .doc-continue-sub { display: block; margin-top: 8px; color: #b0b5c1; font-size: 12.5px; }
  .doc-continue-next {
    display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
  }
  .doc-continue-label { color: #b0b5c1; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
  .doc-continue-next strong { color: #fff; font-size: 15px; }
  .doc-continue-doc { min-width: 0; display: flex; align-items: center; gap: 8px; color: #e2e8f0; font-size: 13px; }
  .doc-continue-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
  .doc-continue:not(.is-empty) .primary-button { color: #17263d; background: #d89d00; border-color: #d89d00; font-weight: 700; }
  .doc-continue:not(.is-empty) .primary-button:hover:not(:disabled) { color: #17263d; background: #f5b82e; border-color: #f5b82e; }
  .doc-continue .outline-button { color: #fff; background: transparent; border-color: rgba(255, 255, 255, 0.3); }
  .doc-continue .outline-button:hover:not(:disabled) { background: rgba(255, 255, 255, 0.08); }
  .doc-continue.is-empty {
    display: flex; align-items: center; gap: 16px;
    color: #0f172a;
    background: #fff;
    border: 1px dashed #d6dde8;
    box-shadow: none;
  }
  .doc-continue.is-empty .doc-continue-copy { flex: 1; display: flex; flex-direction: column; gap: 4px; }
  .doc-continue.is-empty strong { font-size: 15px; }
  .doc-continue.is-empty span { color: #64748b; font-size: 13px; }
  .doc-continue-icon { width: 48px; height: 48px; flex-shrink: 0; display: grid; place-items: center; color: #17263d; background: #f1f5f9; border-radius: 12px; }
  .dashboard-main, .dashboard-side { min-width: 0; display: flex; flex-direction: column; gap: 18px; }
  .doc-panel { padding: 20px 22px; }
  .doc-panel-empty { margin: 4px 0 0; color: #64748b; font-size: 13px; }
  /* Acción con aspecto de enlace. Base para todo el portal: sin ella el navegador la pinta como botón gris. */
  .doc-link-btn { display: inline-flex; align-items: center; gap: 4px; padding: 0; color: #d81b84; font: inherit; font-size: 12.5px; font-weight: 600; background: none; border: 0; border-radius: 4px; cursor: pointer; }
  .doc-link-btn:hover:not(:disabled) { color: #be185d; text-decoration: underline; }
  .doc-link-btn:focus-visible { outline: 2px solid #d81b84; outline-offset: 2px; }
  .doc-link-btn:disabled { color: #94a3b8; cursor: default; }
  .section-heading > .doc-link-btn { color: #d81b84; font-size: 12px; font-weight: 600; cursor: pointer; }
  .doc-mini-list, .doc-route-progress-list { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
  .doc-mini-row, .doc-route-progress-row {
    width: 100%;
    padding: 10px 6px;
    text-align: left;
    background: transparent;
    border: 0;
    border-top: 1px solid #f1f4f9;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color .15s ease;
  }
  .doc-mini-list li:first-child .doc-mini-row,
  .doc-route-progress-list li:first-child .doc-route-progress-row { border-top: 0; }
  .doc-mini-row:hover, .doc-route-progress-row:hover { background: #f8fafc; }
  .doc-mini-row:focus-visible, .doc-route-progress-row:focus-visible { outline: 2px solid #d81b84; outline-offset: 1px; }
  .doc-mini-row { display: flex; align-items: center; gap: 12px; }
  .doc-mini-text, .doc-route-progress-text { min-width: 0; flex: 1; display: flex; flex-direction: column; }
  .doc-mini-text strong, .doc-route-progress-text strong {
    overflow: hidden;
    color: #0f172a; font-size: 13.5px; font-weight: 600;
    white-space: nowrap; text-overflow: ellipsis;
  }
  .doc-mini-text small, .doc-route-progress-text small { color: #64748b; font-size: 12px; }
  .doc-mini-cta { display: inline-flex; align-items: center; gap: 2px; color: #d81b84; font-size: 12px; font-weight: 600; white-space: nowrap; }
  .doc-route-progress-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 10px; }
  .doc-route-progress-row .mini-progress { grid-column: 1 / -1; height: 5px; }
  .doc-route-progress-value { color: #0f172a; font-size: 13px; font-weight: 700; }

  @media (max-width: 900px) {
    .doc-continue { grid-template-columns: 1fr; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .doc-stats-compact { width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .doc-exec-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .doc-list-row { grid-template-columns: 36px minmax(0, 1fr) auto auto; }
    .doc-list-route, .doc-list-time { display: none; }
  }
  @media (max-width: 720px) {
    .doc-header-role { display: none; }
    .doc-exec-stats { grid-template-columns: 1fr; }
    .doc-toolbar-right { width: 100%; justify-content: space-between; margin-left: 0; }
    .doc-list-progress { display: none; }
    .doc-list-row { grid-template-columns: 36px minmax(0, 1fr) auto; }
    .route-timeline { padding: 8px 16px 20px; }
    .route-step { grid-template-columns: 36px minmax(0, 1fr); }
    .route-step-action { grid-column: 2; justify-self: start; }
    .route-detail-side { align-items: flex-start; }
  }

  /* ══ Consola de la academia (tema oscuro SysTime) ═══════════════════════
     Barra lateral navy con la navegación del rol, cabecera oscura con la
     sección, y contenido sobre superficies claras. Acentos: magenta para la
     selección y las acciones, dorado para cifras y avisos. */
  &.doc-console {
    --console-bg: #1f2f45;
    --console-bg-deep: #172538;
    --console-surface: rgba(255, 255, 255, 0.06);
    --console-surface-hover: rgba(255, 255, 255, 0.1);
    --console-border: rgba(255, 255, 255, 0.1);
    --console-text: #f1f1f1;
    --console-text-2: #b0b5c1;
    --console-muted: #8b92a3;
    --console-accent: #d81b84;
    --console-accent-soft: rgba(216, 27, 132, 0.18);
    --console-gold: #dea301;

    flex-direction: column;
    height: 100%;
    min-height: 0;
    background: #f4f6fa;
  }

  /* Barra superior navy: marca y contexto, origen y cierre; debajo, las secciones del rol como pestañas.
     La ventana no hace scroll: lo hace .doc-scroll, debajo de las pestañas. Así la cabecera llega de borde a
     borde y las cuatro esquinas quedan iguales (la barra de desplazamiento ya no se come la esquina derecha). */
  .doc-main { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
  .doc-main > .doc-topbar, .doc-main > .doc-tabs { flex: none; }
  .doc-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #c3cbd8 transparent;
  }
  .doc-scroll::-webkit-scrollbar { width: 8px; }
  .doc-scroll::-webkit-scrollbar-thumb { background: #c3cbd8; border-radius: 8px; }
  .doc-scroll::-webkit-scrollbar-track { background: transparent; }
  .doc-topbar {
    position: sticky;
    top: 0;
    z-index: 51;
    min-height: 60px;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 10px 24px;
    color: var(--console-text);
    background: linear-gradient(90deg, #1f2f45 0%, #24385a 70%, #2b2f5c 100%);
  }
  .doc-topbar-brand { min-width: 0; display: flex; align-items: center; gap: 12px; }
  .doc-rail-logo {
    width: 36px; height: 36px; flex-shrink: 0;
    display: grid; place-items: center;
    color: #fff;
    background: linear-gradient(135deg, #d81b84 0%, #a3125f 100%);
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(216, 27, 132, 0.35);
  }
  .doc-topbar-titles { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
  .doc-topbar-titles strong { color: #fff; font-size: 16px; font-weight: 700; line-height: 1.2; }
  .doc-topbar-context {
    min-width: 0;
    display: inline-flex; align-items: center; gap: 7px;
    /* El recorte (para los puntos suspensivos) dejaba el halo del punto cortado junto al logo: el relleno lo
       deja entero dentro del área visible. */
    padding: 3px 0 3px 3px;
    overflow: hidden;
    color: var(--console-text-2); font-size: 12px; font-weight: 500;
    white-space: nowrap; text-overflow: ellipsis;
  }
  .doc-rail-dot { width: 8px; height: 8px; flex-shrink: 0; border-radius: 50%; }
  .doc-rail-dot.is-systime { background: var(--console-accent); box-shadow: 0 0 0 3px rgba(216, 27, 132, 0.25); }
  .doc-rail-dot.is-workshop { background: var(--console-gold); box-shadow: 0 0 0 3px rgba(222, 163, 1, 0.25); }
  .doc-topbar-actions { display: flex; align-items: center; gap: 10px; }
  .doc-topbar-chip {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 10px;
    color: #1f2f45; font-size: 11.5px; font-weight: 700;
    background: var(--console-gold);
    border-radius: 999px;
  }
  .doc-rail-scope-switch { display: inline-grid; grid-template-columns: repeat(3, auto); gap: 2px; padding: 3px; background: rgba(0, 0, 0, 0.25); border-radius: 9px; }
  .doc-rail-scope-switch button {
    height: 30px;
    padding: 0 12px;
    color: var(--console-text-2);
    font-size: 12px; font-weight: 600;
    background: transparent;
    border: 0;
    border-radius: 7px;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
  }
  .doc-rail-scope-switch button:hover:not(.active) { color: #fff; }
  .doc-rail-scope-switch button.active { color: #fff; background: var(--console-accent); box-shadow: 0 2px 6px rgba(216, 27, 132, 0.35); }
  .doc-rail-scope-switch button:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
  .doc-topbar .doc-window-close {
    width: 34px; height: 34px;
    color: var(--console-text);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 9px;
  }
  .doc-topbar .doc-window-close:hover { color: #fff; background: #dc2626; border-color: #dc2626; }
  .doc-topbar .doc-window-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

  .doc-tabs {
    position: sticky;
    top: 60px;
    z-index: 50;
    display: flex; align-items: stretch; gap: 6px;
    padding: 0 20px;
    overflow-x: auto;
    background: var(--console-bg-deep);
    border-bottom: 1px solid rgba(0, 0, 0, 0.25);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.16);
    scrollbar-width: thin;
  }
  .doc-tabs-group { display: flex; align-items: stretch; gap: 2px; }
  .doc-tabs-group + .doc-tabs-group { margin-left: 6px; padding-left: 8px; border-left: 1px solid var(--console-border); }
  .doc-tab {
    position: relative;
    height: 46px;
    display: inline-flex; align-items: center; gap: 8px;
    padding: 0 14px;
    color: var(--console-text-2);
    font-size: 13px; font-weight: 600;
    white-space: nowrap;
    background: transparent;
    border: 0;
    cursor: pointer;
    transition: color .15s ease, background-color .15s ease;
  }
  .doc-tab svg { flex-shrink: 0; color: var(--console-muted); transition: color .15s ease; }
  .doc-tab:hover { color: #fff; background: var(--console-surface); }
  .doc-tab:hover svg { color: #fff; }
  .doc-tab.active { color: #fff; }
  .doc-tab.active svg { color: #f472b6; }
  .doc-tab.active::after {
    content: "";
    position: absolute; left: 10px; right: 10px; bottom: 0;
    height: 3px;
    background: var(--console-accent);
    border-radius: 3px 3px 0 0;
  }
  .doc-tab:focus-visible { outline: 2px solid var(--console-accent); outline-offset: -2px; }
  .doc-tab .tab-badge {
    padding: 1px 7px;
    color: #1f2f45;
    font-size: 10.5px; font-weight: 700;
    background: var(--console-gold);
    border-radius: 999px;
  }

  /* Contenido sobre superficies claras */
  .doc-main .doc-page { max-width: 1480px; padding: 26px 28px 56px; }
  .doc-main .doc-workshop-required { margin: 18px 28px 0; }
  .doc-main .page-title .kicker { color: var(--pink); letter-spacing: .1em; }
  .doc-main .doc-stat { box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04); transition: box-shadow .2s ease, border-color .2s ease; }
  .doc-main .doc-stat:hover { border-color: #d6dde8; box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06); }
  .doc-main .category-chip.active { color: #fff; background: #1f2f45; border-color: #1f2f45; }
  .doc-main .category-chip.active small { color: #1f2f45; background: var(--console-gold, #dea301); }
  .doc-main .doc-segmented button.active { color: #fff; background: #1f2f45; }
  .doc-main .doc-segmented button.active small { color: #fbbf24; }

  /* Simulaciones: se hacen desde la ruta, en el modal del lector */
  .doc-reader-modal.is-simulator { width: min(1320px, 96vw); max-width: 96vw; }

  .sim-player { display: flex; flex-direction: column; overflow: hidden; background: #0f1a2b; border: 1px solid #1f2f45; border-radius: 14px; }
  .sim-player-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 8px 10px 8px 14px;
    color: #f1f1f1;
    background: linear-gradient(90deg, #1f2f45 0%, #24385a 100%);
  }
  .sim-player-title { min-width: 0; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
  .sim-player-title svg { color: #f472b6; }
  .sim-player-title small { overflow: hidden; color: #8b92a3; font-size: 11.5px; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; }
  .sim-player-actions { display: inline-flex; align-items: center; gap: 6px; }
  .sim-player-score { padding: 3px 9px; color: #1f2f45; font-size: 11.5px; font-weight: 700; background: #dea301; border-radius: 999px; }
  .sim-player-btn {
    width: 32px; height: 32px;
    display: grid; place-items: center;
    color: #f1f1f1;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    cursor: pointer;
    transition: background-color .15s ease;
  }
  .sim-player-btn:hover:not(:disabled) { background: rgba(255, 255, 255, 0.16); }
  .sim-player-btn:disabled { opacity: .4; cursor: not-allowed; }
  .sim-player-btn:focus-visible { outline: 2px solid #d81b84; outline-offset: 1px; }
  .sim-player-stage { position: relative; min-height: 520px; background: #fff; }
  .sim-player-stage:fullscreen { min-height: 100vh; }
  .sim-player-frame { display: block; width: 100%; height: 72vh; min-height: 520px; border: 0; background: #fff; }
  .sim-player-stage:fullscreen .sim-player-frame { height: 100vh; }
  .sim-player-state { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: #64748b; font-size: 13px; background: #f8fafc; }
  .sim-player-state.is-error { color: #9f1239; }
  .sim-player-foot {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
    padding: 10px 14px;
    background: #fff;
    border-top: 1px solid #e4e9f2;
  }
  .sim-player-hint { color: #64748b; font-size: 12.5px; }
  .sim-player-done { display: inline-flex; align-items: center; gap: 6px; color: #15803d; font-size: 13px; font-weight: 600; }
  .sim-player-foot .primary-button { color: #fff; background: #d81b84; border-color: #d81b84; border-radius: 999px; }

  .sim-upload .sim-dropzone .dropzone-icon { color: #d81b84; }
  .sim-preview { margin-top: 12px; overflow: hidden; border: 1px solid #e4e9f2; border-radius: 10px; }
  .sim-preview .file-preview-label { display: block; padding: 8px 12px; color: #64748b; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; background: #f7f9fc; border-bottom: 1px solid #e4e9f2; }
  .sim-preview-frame { display: block; width: 100%; height: 360px; border: 0; background: #fff; }
  .sim-contract { margin-top: 12px; padding: 10px 12px; color: #475569; font-size: 12.5px; background: #f7f9fc; border: 1px solid #e4e9f2; border-radius: 10px; }
  .sim-contract summary { color: #334d6e; font-weight: 600; cursor: pointer; }
  .sim-contract p { margin: 8px 0 4px; }
  .sim-contract code {
    display: block;
    padding: 8px 10px;
    overflow-x: auto;
    color: #f1f1f1;
    font-family: ui-monospace, "Segoe UI Mono", monospace;
    font-size: 12px;
    white-space: nowrap;
    background: #1f2f45;
    border-radius: 8px;
  }

  @media (max-width: 900px) {
    .doc-topbar-chip, .doc-topbar-context { display: none; }
    .doc-tabs { top: 0; padding: 0 10px; }
    .doc-tab { padding: 0 10px; }
    .doc-topbar { position: static; padding: 10px 16px; }
    .doc-main .doc-page { padding: 18px 16px 40px; }
    .doc-main .doc-workshop-required { margin: 12px 16px 0; }
    .sim-player-frame { height: 60vh; min-height: 380px; }
  }

  /* ── Avance: barras, volver, talleres y resumen ejecutivo ───────────── */
  .team-progress-track { display: block; height: 8px; overflow: hidden; background: #eef1f6; border-radius: 999px; }
  .team-progress-track i { display: block; height: 100%; background: linear-gradient(90deg, #d81b84 0%, #e85aa8 100%); border-radius: inherit; transition: width .4s ease; }
  .doc-back-btn {
    display: inline-flex; align-items: center; gap: 4px;
    margin-bottom: 8px;
    padding: 4px 10px 4px 6px;
    color: #475569; font-size: 12.5px; font-weight: 600;
    background: #fff;
    border: 1px solid #e4e9f2;
    border-radius: 999px;
    cursor: pointer;
    transition: border-color .15s ease, color .15s ease;
  }
  .doc-back-btn:hover { color: #d81b84; border-color: #f3a8d0; }

  .ws-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
  .ws-card {
    display: flex; flex-direction: column; gap: 14px;
    padding: 18px;
    background: #fff;
    border: 1px solid #e4e9f2;
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color .2s ease, box-shadow .2s ease;
  }
  .ws-card:hover { border-color: #d6dde8; box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08); }
  .ws-card-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
  .ws-card .workshop-avatar { width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; }
  .ws-card-id { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
  .ws-card-id h3 { margin: 0; overflow: hidden; color: #0f172a; font-size: 15.5px; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }
  .ws-card-id > span { display: inline-flex; align-items: center; gap: 6px; color: #64748b; font-size: 12px; }
  .ws-card-id small { color: #94a3b8; font-size: 11.5px; }
  .ws-dot { width: 8px; height: 8px; border-radius: 50%; }
  .ws-dot.is-active { background: #16a34a; box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15); }
  .ws-dot.is-inactive { background: #94a3b8; }
  .ws-card-progress { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; background: #f7f9fc; border-radius: 10px; }
  .ws-card-progress-head { display: flex; align-items: baseline; gap: 6px; }
  .ws-card-progress-head strong { color: #0f172a; font-size: 22px; font-weight: 800; line-height: 1; }
  .ws-card-progress-head span { color: #64748b; font-size: 12px; }
  .ws-card-progress .exec-status { align-self: flex-start; }
  .ws-card-loading { color: #94a3b8; font-size: 12.5px; }
  .ws-card-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; }
  .ws-card-metrics div { display: flex; flex-direction: column-reverse; gap: 2px; padding: 8px 10px; border: 1px solid #eef1f6; border-radius: 10px; }
  .ws-card-metrics dt { color: #64748b; font-size: 11px; line-height: 1.3; }
  .ws-card-metrics dd { margin: 0; color: #0f172a; font-size: 16px; font-weight: 700; }
  .ws-card-metrics .ws-score { align-items: flex-start; }
  .ws-card-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: auto; padding-top: 12px; border-top: 1px solid #eef1f6; }

  .exec-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
  .exec-card { padding: 20px 22px; }
  .exec-hint { color: #94a3b8; font-size: 12px; }
  .exec-bars { height: 200px; display: grid; grid-template-columns: repeat(8, 1fr); align-items: end; gap: 10px; padding-top: 18px; }
  .exec-bar { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; }
  .exec-bar-fill { width: 100%; max-width: 44px; background: linear-gradient(180deg, #e85aa8 0%, #d81b84 100%); border-radius: 8px 8px 3px 3px; transition: height .4s ease; }
  .exec-bar-value { color: #0f172a; font-size: 12px; font-weight: 700; }
  .exec-bar-label { color: #94a3b8; font-size: 11px; white-space: nowrap; }
  .exec-funnel { display: flex; flex-direction: column; gap: 14px; margin: 6px 0 0; padding: 0; list-style: none; }
  .exec-funnel-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; color: #334155; font-size: 13px; }
  .exec-funnel-head strong { color: #0f172a; }
  .exec-funnel-head small { margin-left: 4px; color: #94a3b8; font-weight: 600; }
  .exec-funnel-track { display: block; height: 10px; overflow: hidden; background: #eef1f6; border-radius: 999px; }
  .exec-funnel-track i { display: block; height: 100%; background: linear-gradient(90deg, #1f2f45 0%, #d81b84 100%); border-radius: inherit; }
  .exec-progress { min-width: 160px; display: flex; align-items: center; gap: 8px; }
  .exec-progress .team-progress-track { flex: 1; height: 6px; }
  .exec-progress strong { min-width: 38px; color: #0f172a; font-size: 12.5px; text-align: right; }
  .exec-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

  /* Avisos: qué está pasando, en palabras, con su acción. */
  .exec-insights { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
  .exec-insight { display: flex; align-items: center; gap: 14px; padding: 14px 18px; background: #fff; border: 1px solid #e4e9f2; border-radius: 14px; }
  .exec-insight-icon { width: 34px; height: 34px; flex-shrink: 0; display: grid; place-items: center; border-radius: 10px; }
  .exec-insight-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
  .exec-insight-text strong { color: #0f172a; font-size: 14px; }
  .exec-insight-text span { color: #475569; font-size: 12.5px; line-height: 1.45; }
  .exec-insight.is-warning .exec-insight-icon { color: #b45309; background: #fef3c7; }
  .exec-insight.is-info .exec-insight-icon { color: #1d4ed8; background: #dbeafe; }
  .exec-insight.is-good .exec-insight-icon { color: #15803d; background: #dcfce7; }

  /* Indicadores con su contexto: cifra, barra y qué significa. */
  .exec-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
  .exec-kpi { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; background: #fff; border: 1px solid #e4e9f2; border-radius: 14px; }
  .exec-kpi-head { display: flex; align-items: center; gap: 10px; }
  .exec-kpi-label { color: #475569; font-size: 12.5px; font-weight: 700; }
  .exec-kpi-value { color: #0f172a; font-size: 26px; font-weight: 800; line-height: 1.1; }
  .exec-kpi-track { display: block; height: 6px; overflow: hidden; background: #eef1f6; border-radius: 999px; }
  .exec-kpi-track i { display: block; height: 100%; background: linear-gradient(90deg, #1f2f45 0%, #d81b84 100%); border-radius: inherit; }
  .exec-kpi-detail { color: #64748b; font-size: 12px; line-height: 1.4; }

  .exec-content-list { display: flex; flex-direction: column; margin: 4px 0 0; padding: 0; list-style: none; }
  .exec-content-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f1f4f9; }
  .exec-content-list li:last-child { border-bottom: 0; }
  .exec-content-list li strong { color: #0f172a; font-size: 15px; }
  .exec-content-list li.is-warning strong { color: #b45309; }
  .exec-content-label { flex: 1; display: flex; flex-direction: column; color: #334155; font-size: 13px; }
  .exec-content-label small { color: #94a3b8; font-size: 11.5px; }
  .exec-content-icon { width: 28px; height: 28px; flex-shrink: 0; display: grid; place-items: center; color: #475569; background: #f1f5f9; border-radius: 8px; }
  .exec-content-icon.is-visible { color: #15803d; background: #dcfce7; }
  .exec-content-icon.is-internal { color: #b45309; background: #fef3c7; }
  .exec-funnel-step { display: block; margin-top: 4px; color: #94a3b8; font-size: 11.5px; }

  .exec-status { display: inline-block; padding: 2px 10px; font-size: 11.5px; font-weight: 700; border-radius: 999px; white-space: nowrap; }
  .exec-status.is-good { color: #15803d; background: #dcfce7; }
  .exec-status.is-progress { color: #1d4ed8; background: #dbeafe; }
  .exec-status.is-warning { color: #b45309; background: #fef3c7; }
  .exec-status.is-idle { color: #64748b; background: #f1f5f9; }

  @media (max-width: 1100px) {
    .exec-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
  @media (max-width: 640px) {
    .exec-kpis { grid-template-columns: 1fr; }
    .exec-insight { flex-wrap: wrap; }
  }
  .doc-stat strong small { color: #94a3b8; font-size: 13px; font-weight: 600; }

  /* Revisión de una evaluación: verde lo acertado, rojo lo fallado */
  .quiz-review-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 4px 0 10px; }
  .quiz-review-count { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; font-size: 12px; font-weight: 700; border-radius: 999px; }
  .quiz-review-count.is-right { color: #15803d; background: #dcfce7; }
  .quiz-review-count.is-wrong { color: #b91c1c; background: #fee2e2; }
  .quiz-reveal-note {
    display: flex; align-items: center; gap: 8px;
    margin: 0 0 12px; padding: 10px 12px;
    color: #475569; font-size: 12.5px;
    background: #f7f9fc;
    border: 1px dashed #d6dde8;
    border-radius: 10px;
  }
  .quiz-review-item { background: #fff; }
  .quiz-review-item.is-right { border-color: #bbf7d0; background: #f7fdf9; }
  .quiz-review-item.is-wrong { border-color: #fecaca; background: #fffafa; }
  .quiz-review-head { align-items: center; }
  .quiz-review-mark { width: 24px; height: 24px; flex-shrink: 0; display: grid; place-items: center; color: #fff; border-radius: 50%; }
  .quiz-review-item.is-right .quiz-review-mark { background: #16a34a; }
  .quiz-review-item.is-wrong .quiz-review-mark { background: #dc2626; }
  .quiz-review-head strong { flex: 1; min-width: 0; }
  .quiz-review-verdict { flex-shrink: 0; font-size: 11.5px; font-weight: 700; }
  .quiz-review-item.is-right .quiz-review-verdict { color: #15803d; }
  .quiz-review-item.is-wrong .quiz-review-verdict { color: #b91c1c; }
  .quiz-review-item li.is-chosen-right { color: #14532d; background: #dcfce7; border: 1px solid #86efac; }
  .quiz-review-item li.is-chosen-wrong { color: #7f1d1d; background: #fee2e2; border: 1px solid #fca5a5; }
  .quiz-review-item li.is-answer:not(.is-chosen-right) { background: #f0fdf4; border: 1px dashed #4ade80; }
  .quiz-review-item li em { font-style: normal; }

  /* Tarjetas de ruta y de documento: más jerarquía */
  .route-card .route-card-title { font-size: 16px; }
  .route-meta-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; color: #475569; font-size: 11.5px; background: #f7f9fc; border: 1px solid #e4e9f2; border-radius: 999px; }
  .doc-card .doc-kind-badge { gap: 5px; }

  @media (max-width: 900px) {
    .exec-grid { grid-template-columns: 1fr; }
    .ws-card-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  }

  @media (max-width: 720px) {
    .doc-stepper { padding: 10px 16px; }
    .doc-stepper-label { display: none; }
    .doc-stepper-item { flex: 0 0 auto; }
    .doc-stepper-item.is-current { flex: 1 1 auto; }
    .doc-stepper-item.is-current .doc-stepper-label { display: inline; }
    .doc-steps-count { display: none; }
    .doc-form .route-module-builder-item .form-row-modules { grid-template-columns: 1fr; }
    .qb-card { padding: 16px; }
    .qb-type { flex: 1 1 100%; }
    .quiz-options, .qb-explanation { padding-left: 0; margin-left: 0; }
    .doc-reader-top { padding: 14px 16px; }
    .doc-reader-body { padding: 20px 16px 32px; }
    .doc-reader-route { flex-wrap: wrap; }
  }

  /* ── Reproductor de evaluaciones ─────────────────────────────────────── */
  .quiz-player { display: flex; flex-direction: column; gap: 16px; }
  .quiz-player-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
  .quiz-player-tabs button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    background: transparent;
    border: 0;
    border-bottom: 2px solid transparent;
    cursor: pointer;
  }
  .quiz-player-tabs button.active { color: #0f172a; border-bottom-color: var(--gold); }
  .quiz-player-state { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 32px 16px; color: var(--muted); text-align: center; }
  .quiz-intro {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 12px;
  }
  .quiz-intro-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    color: var(--navy);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
  }
  .quiz-intro-text { display: flex; flex: 1; flex-direction: column; gap: 4px; min-width: 200px; }
  .quiz-intro-text strong { color: #0f172a; font-size: 15px; }
  .quiz-intro-text span { color: var(--muted); font-size: 13px; }
  .quiz-attempts-note { margin: 0; color: var(--muted); font-size: 12px; }
  .quiz-form { display: flex; flex-direction: column; gap: 14px; }
  .quiz-form-question {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 12px;
  }
  .quiz-form-question legend { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; padding: 0 6px; color: #0f172a; font-size: 14px; font-weight: 700; }
  .quiz-form-question legend small { width: 100%; padding-left: 34px; color: var(--muted); font-size: 11px; font-weight: 600; }
  .quiz-required { color: #dc2626; }
  .quiz-form-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    cursor: pointer;
  }
  .quiz-form-option:hover { background: #f8fafc; }
  .quiz-form-option.is-selected { background: var(--app-selected-soft, #fff3c4); border-color: var(--app-selected, #d89d00); }
  .quiz-form-option input { width: 17px; height: 17px; accent-color: var(--navy); }
  .quiz-form-actions { position: sticky; bottom: -32px; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; padding: 12px 0; background: #fff; border-top: 1px solid var(--line); }
  .quiz-form-actions > span { margin-right: auto; color: var(--muted); font-size: 12px; font-weight: 700; }
  .quiz-result {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px;
    padding: 18px 20px;
    border: 1px solid;
    border-radius: 12px;
  }
  .quiz-result.is-passed { background: #f0fdf4; border-color: #bbf7d0; }
  .quiz-result.is-failed { background: #fff7ed; border-color: #fed7aa; }
  .quiz-result-score { display: flex; flex-direction: column; align-items: center; min-width: 96px; }
  .quiz-result-score strong { color: #0f172a; font-size: 30px; line-height: 1; }
  .quiz-result-score span { color: var(--muted); font-size: 11px; font-weight: 700; }
  .quiz-result-text { display: flex; flex: 1; flex-direction: column; gap: 4px; min-width: 200px; }
  .quiz-result-text strong { color: #0f172a; font-size: 15px; }
  .quiz-result-text span { color: var(--muted); font-size: 12px; }
  .quiz-review { display: flex; flex-direction: column; gap: 10px; margin: 0; padding-left: 20px; }
  .quiz-review-item { padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; }
  .quiz-review-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
  .quiz-review-points { flex-shrink: 0; color: var(--muted); font-size: 12px; font-weight: 700; }
  .quiz-review-item ul { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
  .quiz-review-item li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 10px; font-size: 13px; border-radius: 6px; }
  .quiz-review-item li.is-chosen { background: #f1f5f9; }
  .quiz-review-item li.is-answer { background: #f0fdf4; }
  .quiz-review-item li em { color: var(--muted); font-size: 11px; font-style: normal; font-weight: 700; }
  .quiz-review-explanation { margin: 8px 0 0; color: #475569; font-size: 12px; }

  /* ── Respuestas (gestores) ───────────────────────────────────────────── */
  .quiz-results { display: flex; flex-direction: column; gap: 14px; }
  .quiz-results-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
  .quiz-results-card { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; }
  .quiz-results-card strong { color: #0f172a; font-size: 22px; }
  .quiz-results-card span { color: var(--muted); font-size: 12px; }
  .quiz-results-title { margin: 6px 0 0; color: #0f172a; font-size: 14px; }
  .quiz-results-questions { display: flex; flex-direction: column; gap: 10px; margin: 0; padding-left: 20px; }
  .quiz-results-questions > li { padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; }
  .quiz-results-question-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
  .quiz-results-question-head span { flex-shrink: 0; padding: 2px 8px; font-size: 11px; font-weight: 800; border-radius: 999px; }
  .quiz-results-question-head .is-good { color: #166534; background: #dcfce7; }
  .quiz-results-question-head .is-mid { color: #854d0e; background: #fef9c3; }
  .quiz-results-question-head .is-low { color: #991b1b; background: #fee2e2; }
  .quiz-results-questions ul { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
  .quiz-results-questions ul li { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(80px, 1fr) 32px; align-items: center; gap: 10px; font-size: 12px; }
  .quiz-results-option { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
  .quiz-results-bar { height: 8px; overflow: hidden; background: #f1f5f9; border-radius: 999px; }
  .quiz-results-bar i { display: block; height: 100%; background: #94a3b8; border-radius: inherit; }
  .quiz-results-questions ul li.is-answer .quiz-results-bar i { background: #16a34a; }
  .quiz-results-count { color: var(--muted); font-weight: 700; text-align: right; }
  .quiz-results-table { width: 100%; font-size: 12px; border-collapse: collapse; }
  .quiz-results-table th { padding: 8px; color: var(--muted); font-size: 11px; text-align: left; text-transform: uppercase; border-bottom: 1px solid var(--line); }
  .quiz-results-table td { padding: 8px; border-bottom: 1px solid #f1f5f9; }
  .quiz-results-badge { padding: 2px 8px; font-size: 11px; font-weight: 700; border-radius: 999px; }
  .quiz-results-badge.is-passed { color: #166534; background: #dcfce7; }
  .quiz-results-badge.is-failed { color: #9a3412; background: #ffedd5; }

  @media (max-width: 720px) {
    .doc-editor-status span:last-child { display: none; }
    .quiz-question-actions { margin-left: 0; }
    .quiz-results-table { display: block; overflow-x: auto; }
  }

  /* ── Rediseño v3: rutas, tarjetas, certificados y equipo ─────────────── */

  /* Rutas: lista filtrable a la izquierda, detalle a la derecha */
  .routes-toolbar { margin-bottom: 16px; }
  .routes-toolbar .doc-segmented { margin-bottom: 0; }
  .routes-layout { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); align-items: start; gap: 20px; }
  .routes-list { display: flex; flex-direction: column; gap: 10px; }
  .routes-layout .route-detail { margin: 0; }

  .doc-routes .route-card {
    position: relative;
    display: flex; flex-direction: column; gap: 8px;
    padding: 14px 16px 14px 20px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e4e9f2;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
  }
  .doc-routes .route-card::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 4px; background: #1f2f45; }
  .doc-routes .route-card.route-card-workshop::before { background: #d81b84; }
  .doc-routes .route-card:hover { border-color: #d6dde8; box-shadow: 0 8px 20px rgba(15, 23, 42, 0.07); }
  .doc-routes .route-card.selected { background: #fffafd; border-color: #d81b84; box-shadow: 0 0 0 3px rgba(216, 27, 132, 0.12); }
  .doc-routes .route-card-top { min-height: 24px; display: flex; align-items: center; justify-content: flex-start; gap: 6px; margin: 0; }
  .doc-routes .route-card-title { margin: 0; color: #0f172a; font-size: 15px; font-weight: 700; line-height: 1.35; }
  .doc-routes .route-card-desc {
    min-height: 0; margin: 0;
    color: #64748b; font-size: 12.5px; line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .route-status { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; color: #64748b; font-size: 11px; font-weight: 700; background: #f1f5f9; border-radius: 999px; }
  .route-status.is-progress { color: #a16207; background: #fef9c3; }
  .route-status.is-done { color: #15803d; background: #dcfce7; }
  .route-status.is-certified { color: #7c5800; background: #fdf1cc; }
  .route-card-mix { display: flex; flex-wrap: wrap; gap: 6px; }
  .route-mix-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; color: #0369a1; font-size: 11.5px; font-weight: 600; background: #e0f2fe; border-radius: 6px; }
  .route-mix-chip.kind-file { color: #475569; background: #f1f5f9; }
  .route-mix-chip.kind-evaluation { color: #9d174d; background: #fce7f3; }
  .route-mix-chip.kind-simulator { color: #6d28d9; background: #ede9fe; }
  .route-mix-chip.is-cert { color: #7c5800; background: #fdf1cc; }
  .doc-routes .route-card-progress-row { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
  .doc-routes .route-card-progress-row .team-progress-track { flex: 1; height: 6px; }
  .doc-routes .route-card-progress-row strong { color: #0f172a; font-size: 12.5px; }
  .doc-routes .route-card-progress-row small { color: #94a3b8; font-size: 11.5px; font-weight: 600; }
  .doc-routes .route-card-progress-row.is-complete .team-progress-track i { background: #16a34a; }
  .route-card-manage-row { display: flex; flex-wrap: wrap; gap: 4px 12px; color: #64748b; font-size: 12px; }
  .route-card-manage-row span { display: inline-flex; align-items: center; gap: 4px; }

  .route-cert-banner {
    display: flex; align-items: center; gap: 12px;
    margin: 18px 30px 0;
    padding: 12px 14px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 12px;
  }
  .route-cert-banner > div { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
  .route-cert-banner strong { color: #0f172a; font-size: 13.5px; }
  .route-cert-banner span { color: #64748b; font-size: 12.5px; }
  .route-cert-icon { width: 36px; height: 36px; flex-shrink: 0; display: grid; place-items: center; color: #b7791f; background: #fef3c7; border-radius: 10px; }
  .route-cert-banner.is-earned { background: linear-gradient(90deg, #1f2f45 0%, #2b3f5c 100%); border-color: transparent; }
  .route-cert-banner.is-earned strong { color: #fff; }
  .route-cert-banner.is-earned span { color: #cbd5e1; }
  .route-cert-banner.is-earned .route-cert-icon { color: #1f2f45; background: #dea301; }
  .route-cert-banner.is-earned .outline-button { color: #fff; background: transparent; border-color: rgba(255, 255, 255, 0.35); }
  .route-cert-banner.is-earned .outline-button:hover { background: rgba(255, 255, 255, 0.08); }

  .route-module-doc-icon { width: 22px; height: 22px; flex-shrink: 0; display: grid; place-items: center; color: #0369a1; background: #e0f2fe; border-radius: 6px; }
  .route-module-doc.kind-file .route-module-doc-icon { color: #475569; background: #f1f5f9; }
  .route-module-doc.kind-evaluation .route-module-doc-icon { color: #9d174d; background: #fce7f3; }
  .route-module-doc.kind-simulator .route-module-doc-icon { color: #6d28d9; background: #ede9fe; }
  .route-module-doc:has(.route-module-doc-icon) { padding-left: 4px; }

  /* Tarjetas de documento: icono del tipo, origen, ruta y avance */
  .doc-card.doc-card-v3 { gap: 10px; padding: 18px; }
  .doc-card-v3 .doc-card-top { min-height: 40px; gap: 10px; }
  .doc-card-kind-icon { width: 40px; height: 40px; flex-shrink: 0; display: grid; place-items: center; color: #0369a1; background: #e0f2fe; border-radius: 11px; }
  .doc-card-kind-icon.kind-file { color: #475569; background: #f1f5f9; }
  .doc-card-kind-icon.kind-evaluation { color: #9d174d; background: #fce7f3; }
  .doc-card-kind-icon.kind-simulator { color: #6d28d9; background: #ede9fe; }
  .doc-card-kind-text { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
  .doc-card-kind-text strong { color: #0f172a; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
  .doc-card-kind-text small { overflow: hidden; color: #64748b; font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
  .doc-card-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
  .doc-card-time { display: inline-flex; align-items: center; gap: 4px; color: #64748b; font-size: 11.5px; }
  .doc-card-tags .doc-route-pill { max-width: 180px; padding: 2px 9px; font-size: 11.5px; }
  .doc-card-v3 .doc-card-foot { gap: 12px; }
  .doc-card-progress { min-width: 0; flex: 1; display: flex; align-items: center; gap: 8px; }
  .doc-card-progress .team-progress-track { flex: 1; height: 6px; }
  .doc-card-progress .doc-read-bar { display: none; }
  .doc-card-v3.is-done { border-color: #bbf7d0; }
  .doc-card-v3.is-done .doc-card-progress .team-progress-track i { background: #16a34a; }

  /* Certificados */
  /* Dos certificados lado a lado: SysTime y taller */
  .cert-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
  .cert-card { display: flex; flex-direction: column; gap: 16px; padding: 20px; background: #fff; border: 1px solid #e4e9f2; border-radius: 16px; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04); }
  .cert-card.is-earned { border-color: #ecd9a4; box-shadow: 0 10px 30px rgba(222, 163, 1, 0.12); }
  .cert-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
  .cert-card-head h2 { margin: 0; color: #0f172a; font-size: 17px; font-weight: 800; }
  .cert-card-head small { color: #64748b; font-size: 12.5px; }
  .cert-state { display: inline-flex; flex-shrink: 0; align-items: center; gap: 5px; padding: 3px 10px; color: #475569; font-size: 11.5px; font-weight: 700; white-space: nowrap; background: #f1f5f9; border-radius: 999px; }
  .cert-state.is-earned { color: #15803d; background: #dcfce7; }
  .cert-state.is-outdated { color: #b45309; background: #fef3c7; }
  .cert-card-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 36px 16px; color: #64748b; font-size: 13px; text-align: center; background: #f8fafc; border: 1px dashed #d6dde8; border-radius: 12px; }
  .cert-card-empty p { margin: 0; }
  .cert-sheet { position: relative; }
  .cert-sheet-frame {
    position: relative;
    min-height: 330px;
    overflow: hidden;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    padding: 30px 32px 26px;
    text-align: center;
    background: radial-gradient(circle at 50% 0%, rgba(222, 163, 1, 0.14), transparent 60%), #fffdf7;
    border: 1px solid #ecd9a4;
    border-radius: 12px;
    outline: 1px solid #ecd9a4;
    outline-offset: -7px;
  }
  .cert-sheet-top { width: 100%; display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
  .cert-sheet-seal {
    width: 52px; height: 52px;
    display: grid; place-items: center;
    color: #1f2f45;
    background: linear-gradient(135deg, #f5c542 0%, #dea301 100%);
    border-radius: 50%;
    box-shadow: 0 0 0 4px #fff, 0 0 0 5px #ecd9a4;
  }
  .cert-sheet-issuer { color: #7c5800; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
  .cert-sheet-kicker { color: #d81b84; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
  .cert-sheet-route { margin: 0; color: #1f2f45; font-size: 22px; font-weight: 800; line-height: 1.3; }
  .cert-sheet-to { margin: 8px 0 0; color: #64748b; font-size: 12.5px; }
  .cert-sheet-name { padding: 0 18px 6px; color: #0f172a; font-family: Georgia, "Times New Roman", serif; font-size: 28px; font-style: italic; font-weight: 700; line-height: 1.25; border-bottom: 1px solid #ecd9a4; }
  .cert-sheet-text { max-width: 420px; margin: 4px 0 0; color: #475569; font-size: 13px; }
  .cert-sheet-meta { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px 0 0; }
  .cert-watermark {
    position: absolute; top: 50%; left: 50%; z-index: 2;
    padding: 6px 22px;
    color: rgba(31, 47, 69, 0.55);
    font-size: 26px; font-weight: 800; letter-spacing: .18em; white-space: nowrap;
    border: 3px solid rgba(31, 47, 69, 0.35);
    border-radius: 10px;
    transform: translate(-50%, -50%) rotate(-14deg);
    pointer-events: none;
  }
  .cert-watermark.is-outdated { color: rgba(180, 83, 9, 0.6); border-color: rgba(180, 83, 9, 0.45); }
  .cert-sheet.is-preview .cert-sheet-frame > :not(.cert-watermark),
  .cert-sheet.is-outdated .cert-sheet-frame > :not(.cert-watermark) { opacity: .45; filter: grayscale(.7); }
  .cert-notice { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; color: #92400e; font-size: 13px; background: #fffbeb; border: 1px solid #fde68a; border-radius: 12px; }
  .cert-notice svg { flex-shrink: 0; margin-top: 1px; }
  .cert-card-progress { display: flex; flex-direction: column; gap: 6px; }
  .cert-card-progress-head { display: flex; justify-content: space-between; gap: 10px; color: #475569; font-size: 12.5px; font-weight: 600; }
  .cert-card-progress-head strong { color: #0f172a; }
  .cert-card-progress .team-progress-track.is-complete i { background: #16a34a; }
  .cert-routes { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
  .cert-routes li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: #f8fafc; border: 1px solid #eef1f6; border-radius: 10px; }
  .cert-route-mark { width: 26px; height: 26px; flex-shrink: 0; display: grid; place-items: center; color: #64748b; background: #fff; border: 1px solid #e4e9f2; border-radius: 50%; }
  .cert-routes li.is-done .cert-route-mark { color: #fff; background: #16a34a; border-color: #16a34a; }
  .cert-route-title { min-width: 0; flex: 1; display: flex; flex-direction: column; }
  .cert-route-title strong { overflow: hidden; color: #0f172a; font-size: 13px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
  .cert-route-title small { display: flex; align-items: center; gap: 6px; color: #94a3b8; font-size: 11.5px; }
  .cert-route-new { padding: 1px 7px; color: #b45309; font-size: 10.5px; font-weight: 700; background: #fef3c7; border-radius: 999px; }
  .cert-route-done { color: #15803d; font-size: 12px; font-weight: 600; }
  .cert-card-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding-top: 12px; border-top: 1px solid #eef1f6; }
  .cert-card-foot small { margin-right: auto; color: #64748b; font-size: 12.5px; }
  .cert-sheet-meta div { display: flex; flex-direction: column; gap: 2px; }
  .cert-sheet-meta dt { color: #94a3b8; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
  .cert-sheet-meta dd { margin: 0; color: #0f172a; font-size: 12.5px; font-weight: 600; }
  .cert-code { font-family: ui-monospace, "Segoe UI Mono", monospace; letter-spacing: .04em; }

  /* Inicio: tarjeta de certificados */
  .dashboard-cert .section-heading { align-items: center; }
  .dashboard-cert-seal { width: 40px; height: 40px; flex-shrink: 0; display: grid; place-items: center; color: #1f2f45; background: linear-gradient(135deg, #f5c542 0%, #dea301 100%); border-radius: 50%; }
  .dashboard-cert-list { display: flex; flex-direction: column; gap: 8px; margin: 0 0 14px; padding: 0; list-style: none; }
  .dashboard-cert-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; background: #f8fafc; border-radius: 10px; }
  .dashboard-cert-list li > span:first-child { display: flex; flex-direction: column; }
  .dashboard-cert-list strong { color: #0f172a; font-size: 13px; }
  .dashboard-cert-list small { color: #64748b; font-size: 11.5px; }

  /* Mis técnicos: vista de tabla */
  .team-table-wrap { overflow-x: auto; background: #fff; border: 1px solid #e4e9f2; border-radius: 12px; }
  .team-table { width: 100%; border-collapse: collapse; font-size: 13px; }
  .team-table th { padding: 10px 12px; color: #64748b; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-align: left; white-space: nowrap; text-transform: uppercase; background: #f8fafc; border-bottom: 1px solid #e4e9f2; }
  .team-table td { padding: 10px 12px; color: #334155; vertical-align: middle; border-bottom: 1px solid #f1f4f9; }
  .team-table tbody tr:last-child td { border-bottom: 0; }
  .team-table tbody tr:hover td { background: #fafbfd; }
  .team-table .exec-progress { min-width: 150px; }
  .team-row-person { display: flex; align-items: center; gap: 10px; }
  .team-row-person > span:last-child { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; }
  .team-row-person strong { color: #0f172a; font-weight: 600; }
  .team-row-person small { flex-basis: 100%; color: #64748b; font-size: 11.5px; }
  .team-member-avatar.is-sm { width: 32px; height: 32px; min-width: 32px; display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 700; border-radius: 50%; }
  .team-row-last { color: #64748b; white-space: nowrap; }

  /* Mis técnicos: tarjeta de la persona */
  .doc-team .team-member { border-radius: 14px; }
  .doc-team .team-member.is-self {
    background: #fff;
    border: 1px solid #f3a8d0;
    box-shadow: 0 0 0 3px rgba(216, 27, 132, 0.08), 0 1px 3px rgba(15, 23, 42, 0.04);
  }
  .doc-team .team-member-foot { padding-top: 10px; border-top: 1px solid #eef1f6; }
  .doc-team .team-member-foot .doc-link-btn {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 10px;
    color: #9d174d; font-size: 12px; font-weight: 600; line-height: 1.4;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease;
  }
  .doc-team .team-member-foot .doc-link-btn:hover { background: #fdf2f8; border-color: #f9d0e6; }
  .doc-team .team-member-foot .doc-link-btn:focus-visible { outline: 2px solid #d81b84; outline-offset: 1px; }
  .doc-team .team-route-list { gap: 8px; margin: 0; padding: 10px 12px; }
  .doc-team .team-route-list li { grid-template-columns: minmax(0, 1fr) 64px auto; gap: 10px; font-size: 12px; }
  .doc-team .team-route-list li strong { min-width: 34px; white-space: nowrap; }
  .doc-team .team-route-list li.is-done strong { color: #047857; }

  @media (max-width: 1100px) {
    .cert-grid { grid-template-columns: 1fr; }
    .routes-layout { grid-template-columns: 1fr; }
    .routes-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
  }
  @media (max-width: 720px) {
    .cert-sheet-frame { min-height: 0; padding: 26px 18px 20px; }
    .cert-sheet-name { font-size: 22px; }
    .cert-watermark { font-size: 18px; }
    .route-cert-banner { margin: 14px 18px 0; flex-wrap: wrap; }
  }
  @media (max-width: 560px) {
    .doc-topbar-titles { display: none; }
  }

  /* ── Quién puede verlo: modos, cargos y grupos ─────────────────────── */
  .audience-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; margin-bottom: 10px; }
  .audience-mode {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 10px 12px;
    text-align: left;
    background: #fff;
    border: 1px solid #e4e9f2;
    border-radius: 12px;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
  }
  .audience-mode:hover:not(:disabled) { border-color: #d6dde8; }
  .audience-mode.is-selected { background: #fdf2f8; border-color: #d81b84; box-shadow: 0 0 0 3px rgba(216, 27, 132, 0.12); }
  .audience-mode:focus-visible { outline: 2px solid #d81b84; outline-offset: 2px; }
  .audience-mode-icon { width: 30px; height: 30px; flex-shrink: 0; display: grid; place-items: center; color: #475569; background: #f1f5f9; border-radius: 8px; }
  .audience-mode.is-selected .audience-mode-icon { color: #fff; background: #d81b84; }
  .audience-mode-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
  .audience-mode-text strong { color: #0f172a; font-size: 13px; }
  .audience-mode-text small { color: #64748b; font-size: 11.5px; line-height: 1.35; }
  .audience-chips { margin-top: 4px; }
  .audience-manage { margin-top: 10px; }

  /* Paso 3 en dos tarjetas: quién lo verá (con el resumen) y duración y rutas. */
  .visibility-card { display: flex; flex-direction: column; gap: 14px; margin-bottom: 14px; padding: 16px 18px; background: #fff; border: 1px solid #e4e9f2; border-radius: 16px; }
  .visibility-card-head { display: flex; align-items: flex-start; gap: 12px; }
  .visibility-card-head > div { display: flex; flex-direction: column; gap: 2px; }
  .visibility-card-head strong { color: #0f172a; font-size: 14.5px; }
  .visibility-card-head small { color: #64748b; font-size: 12.5px; }
  .visibility-card-icon { width: 34px; height: 34px; flex-shrink: 0; display: grid; place-items: center; color: #be185d; background: #fdf2f8; border-radius: 10px; }
  .visibility-card .form-group:last-child, .visibility-card .form-row:last-child { margin-bottom: 0; }
  .visibility-card .audience-modes { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 0; }
  @media (max-width: 640px) { .visibility-card .audience-modes { grid-template-columns: 1fr; } }
  .visibility-card .audience-mode { align-items: center; padding: 12px 14px; }
  .visibility-card .audience-manage { margin-top: 0; }
  .audience-mode-radio { width: 16px; height: 16px; flex-shrink: 0; border: 2px solid #cbd5e1; border-radius: 50%; transition: border-color .15s ease, box-shadow .15s ease; }
  .audience-mode.is-selected .audience-mode-radio { border-color: #d81b84; box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 8px #d81b84; }
  .audience-mode.is-internal.is-selected { background: #fffbeb; border-color: #d97706; box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.14); }
  .audience-mode.is-internal.is-selected .audience-mode-icon { background: #d97706; }
  .audience-mode.is-internal.is-selected .audience-mode-radio { border-color: #d97706; box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 8px #d97706; }

  .audience-groups-pick { display: flex; flex-direction: column; gap: 10px; padding: 14px; background: #f8fafc; border: 1px solid #eef1f6; border-radius: 14px; }
  .audience-groups-pick .doc-link-btn { display: inline-flex; align-items: center; gap: 6px; padding: 0; color: #be185d; font-size: 12.5px; font-weight: 700; background: none; border: 0; cursor: pointer; }
  .audience-group-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
  .audience-group-option { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #fff; border: 1px solid #e4e9f2; border-radius: 12px; cursor: pointer; transition: border-color .15s ease, background-color .15s ease; }
  .audience-group-option:hover { border-color: #d6dde8; }
  .audience-group-option.is-selected { background: #fdf2f8; border-color: #f3a8d0; }
  .audience-group-option input { accent-color: #d81b84; }
  .audience-group-option-main { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
  .audience-group-option-main strong { color: #0f172a; font-size: 13px; }
  .audience-group-option-main small { overflow: hidden; color: #64748b; font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }
  .audience-group-option-people { display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; color: #475569; font-size: 12px; font-weight: 700; }

  .audience-summary { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1px solid; border-radius: 12px; }
  .audience-summary > div { display: flex; flex-direction: column; gap: 2px; }
  .audience-summary strong { font-size: 11.5px; letter-spacing: .4px; text-transform: uppercase; }
  .audience-summary span:not(.audience-summary-icon) { color: #1e293b; font-size: 13px; line-height: 1.45; }
  .audience-summary-icon { width: 26px; height: 26px; flex-shrink: 0; display: grid; place-items: center; color: #fff; border-radius: 50%; }
  .audience-summary.is-ready { background: #f0fdf4; border-color: #bbf7d0; }
  .audience-summary.is-ready strong { color: #15803d; }
  .audience-summary.is-ready .audience-summary-icon { background: #16a34a; }
  .audience-summary.is-pending { background: #f8fafc; border-color: #e2e8f0; }
  .audience-summary.is-pending strong { color: #475569; }
  .audience-summary.is-pending .audience-summary-icon { background: #94a3b8; }
  .audience-summary.is-warning { background: #fffbeb; border-color: #fde68a; }
  .audience-summary.is-warning strong { color: #b45309; }
  .audience-summary.is-warning .audience-summary-icon { background: #d97706; }

  .audience-title-name { flex: 1; min-width: 0; }
  .audience-title-people { flex-shrink: 0; padding: 1px 7px; color: #64748b; font-size: 11px; font-weight: 700; background: #f1f5f9; border-radius: 999px; }
  .audience-title-option.is-selected .audience-title-people { color: #9d174d; background: #fce7f3; }
  .audience-selected-chip.is-unavailable { color: #92400e; background: #fef3c7; }
  .audience-selected-chip.is-unavailable small { font-size: 10.5px; font-weight: 600; opacity: .8; }
  .route-following { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; padding: 10px 14px; color: #1e3a8a; font-size: 12.5px; font-weight: 600; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 10px; }
  .route-following > span { display: inline-flex; align-items: center; gap: 6px; }

  /* Mis técnicos: adopción de las rutas de SysTime y del taller (equipo y cada persona). */
  .team-adoption { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
  .team-adoption-card { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; background: #fff; border: 1px solid #e4e9f2; border-radius: 14px; }
  .team-adoption-title { display: flex; align-items: center; gap: 12px; }
  .team-adoption-title > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
  .team-adoption-title strong { color: #0f172a; font-size: 14px; }
  .team-adoption-title small { color: #64748b; font-size: 12px; }
  .team-adoption-value { color: #0f172a; font-size: 22px; font-weight: 800; white-space: nowrap; }
  .team-adoption-card.is-systime .team-progress-fill, .team-adoption-row.is-systime .team-progress-fill { background: linear-gradient(90deg, #1f2f45 0%, #d81b84 100%); }
  .team-adoption-card.is-workshop .team-progress-fill, .team-adoption-row.is-workshop .team-progress-fill { background: linear-gradient(90deg, #0f766e 0%, #22c55e 100%); }
  .team-adoption-note { grid-column: 1 / -1; margin: 0; color: #94a3b8; font-size: 11.5px; }
  .team-adoption-bars { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
  .team-adoption-head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 4px; color: #475569; font-size: 12px; font-weight: 600; }
  .team-adoption-head strong { color: #0f172a; }
  .team-progress-bar.is-empty, .exec-progress.is-empty .team-progress-track { opacity: .45; }
  .team-self-body .team-adoption-bars { max-width: 420px; }
  @media (max-width: 760px) { .team-adoption { grid-template-columns: 1fr; } }

  /* Vista previa de Word, Excel y PowerPoint (HTML que arma el servidor). */
  .office-preview { box-sizing: border-box; width: 100%; align-self: stretch; text-align: left; max-height: 70vh; overflow: auto; padding: 20px 24px; background: #fff; border: 1px solid #e4e9f2; border-radius: 12px; }
  .office-preview .tinymce-rendered-view img { max-width: 100%; height: auto; margin: 8px 0; border-radius: 6px; }
  .office-preview table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
  .office-preview td, .office-preview th { padding: 6px 8px; border: 1px solid #e2e8f0; vertical-align: top; }
  .office-preview.is-excel tr:first-child td { font-weight: 700; background: #f8fafc; }
  .office-preview.is-excel .doc-section + .doc-section { margin-top: 20px; }
  /* PowerPoint: cada diapositiva con su proporción y cada elemento en su sitio (PowerPointPreview). Todo se mide
     contra el ancho de la diapositiva (cqw), así se ve igual en cualquier pantalla. */
  .office-preview.is-powerpoint { padding: 18px; background: #e9edf3; }
  .office-preview.is-powerpoint .tinymce-rendered-view { padding: 0; font-size: initial; line-height: normal; color: inherit; }
  .office-preview .pptx-deck { display: flex; flex-direction: column; gap: 22px; max-width: 1100px; margin: 0 auto; }
  .office-preview .pptx-figure { margin: 0; }
  .office-preview .pptx-slide {
    position: relative; width: 100%; overflow: hidden; container-type: inline-size;
    background-color: #fff; border-radius: 6px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .08), 0 8px 24px rgba(15, 23, 42, .12);
    -webkit-font-smoothing: antialiased;
  }
  .office-preview .pptx-figure figcaption { margin-top: 8px; text-align: center; color: #64748b; font-size: 11.5px; font-weight: 600; letter-spacing: .3px; }
  .office-preview .pptx-el { position: absolute; box-sizing: border-box; transform-origin: center; }
  .office-preview .pptx-text {
    position: absolute; inset: 0; box-sizing: border-box; display: flex; flex-direction: column;
    overflow: visible; overflow-wrap: break-word; color: #000;
  }
  .office-preview .pptx-text p,
  .office-preview .pptx-table p { margin: 0; padding-top: 0; padding-bottom: 0; font-size: inherit; color: inherit; }
  .office-preview .pptx-bullet { display: inline-block; min-width: 1.1em; margin-right: .35em; text-indent: 0; }
  .office-preview .pptx-unsupported { display: grid; place-items: center; background: rgba(148, 163, 184, .14); border: 1px dashed #94a3b8; border-radius: 6px; }
  .office-preview .pptx-unsupported span { padding: 4px 8px; color: #475569; font-size: clamp(10px, 1.4cqw, 14px); text-align: center; }
  .office-preview .pptx-table { width: 100%; height: 100%; border-collapse: collapse; table-layout: fixed; font-size: 1.2cqw; margin: 0; }
  .office-preview .pptx-table td,
  .office-preview .pptx-table th { padding: .4cqw .6cqw; border: 1px solid rgba(15, 23, 42, .18); vertical-align: middle; text-align: left; font-weight: 400; }
  .office-preview .pptx-table th { color: #fff; }

  /* Ruta: aviso cuando parte de su público no verá un documento (la ruta le muestra un módulo menos). */
  .doc-audience-gap { display: inline-flex; align-items: center; gap: 4px; margin-top: 2px; color: #b45309; font-size: 11.5px; font-weight: 600; }
  .doc-linked-item.has-gap { border-color: #fde68a; background: #fffbeb; }
  /* Bloqueo: parte del público de la ruta no podría abrir el documento. */
  .doc-audience-conflict { display: inline-flex; align-items: flex-start; gap: 4px; margin-top: 2px; color: #b91c1c; font-size: 11.5px; font-weight: 600; line-height: 1.4; }
  .doc-linked-item.has-conflict { border-color: #fecaca; background: #fef2f2; }
  .doc-route-chip.is-conflict { color: #991b1b; background: #fef2f2; border-color: #fecaca; }
  .doc-route-chip.is-conflict:disabled { cursor: not-allowed; opacity: .85; }
  .doc-route-conflict { display: flex; margin: 6px 0 0; }
  .doc-picker-row.is-blocked { cursor: not-allowed; opacity: 1; background: #fafafa; }
  .doc-picker-row.is-blocked strong { color: #64748b; }
  .doc-picker-row.is-blocked .doc-picker-add { color: #94a3b8; }
  .route-modal-error { margin: 0 24px 12px; }
  .doc-routes-blocked { display: flex; align-items: flex-start; gap: 6px; padding: 10px 12px; color: #92400e; background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; }
  .route-modal-body > .visibility-card { margin: 0 0 18px; }
  .audience-group-usage.is-people { display: inline-flex; align-items: center; gap: 4px; color: #1e3a8a; background: #e0e7ff; }
  .doc-card-audience { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; color: #7c2d12; font-size: 11px; font-weight: 700; background: #ffedd5; border-radius: 999px; }

  /* Etiquetas que no son <label> (grupos de opciones): mismo estilo que las demás del formulario. */
  span.form-label { display: block; margin-bottom: 6px; color: #334155; font-size: 11.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; }

  .audience-groups-modal { width: min(760px, 94vw); max-width: 760px; max-height: 90vh; display: flex; flex-direction: column; }
  .audience-groups-modal .modal-heading { display: flex; flex-direction: column; align-items: flex-start; }
  .audience-groups-modal .modal-heading .doc-back-btn { margin-bottom: 10px; }
  .audience-groups-body { min-height: 0; flex: 1; display: flex; flex-direction: column; gap: 14px; padding: 18px 28px 20px; overflow-y: auto; }
  .audience-groups-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 36px 20px; color: #64748b; font-size: 13px; text-align: center; background: #f8fafc; border: 1px dashed #d6dde8; border-radius: 14px; }
  .audience-groups-empty strong { color: #0f172a; font-size: 15px; }
  .audience-groups-empty p { max-width: 420px; margin: 0 0 6px; }
  .audience-group-list { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
  .audience-group-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: start; gap: 12px; padding: 14px 16px; background: #fff; border: 1px solid #e4e9f2; border-radius: 14px; transition: border-color .15s ease, box-shadow .15s ease; }
  .audience-group-row:hover { border-color: #d6dde8; box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06); }
  .audience-group-icon { width: 36px; height: 36px; display: grid; place-items: center; color: #6d28d9; background: #ede9fe; border-radius: 10px; }
  .audience-group-main { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
  .audience-group-name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
  .audience-group-name strong { color: #0f172a; font-size: 14.5px; font-weight: 700; }
  .audience-group-usage { padding: 2px 8px; color: #64748b; font-size: 11px; font-weight: 700; background: #f1f5f9; border-radius: 999px; }
  .audience-group-usage.is-used { color: #9d174d; background: #fce7f3; }
  .audience-group-desc { margin: 0; color: #475569; font-size: 12.5px; }
  .audience-group-titles { display: flex; flex-wrap: wrap; gap: 6px; }
  .audience-group-actions { display: flex; align-items: center; gap: 4px; }
  .audience-group-confirm { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; padding: 8px 10px; color: #7f1d1d; font-size: 12.5px; background: #fef2f2; border-radius: 10px; }
  .audience-group-confirm span { margin-right: auto; }

  .audience-form { display: flex; flex-direction: column; gap: 16px; }
  .audience-form .form-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
  .audience-form .form-group { margin: 0; }
  .audience-titles { display: flex; flex-direction: column; gap: 10px; padding: 14px; background: #f8fafc; border: 1px solid #eef1f6; border-radius: 14px; }
  .audience-titles-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .audience-titles-head .form-label { margin: 0; }
  .audience-titles-count { padding: 2px 10px; color: #9d174d; font-size: 11.5px; font-weight: 700; background: #fce7f3; border-radius: 999px; }
  .audience-titles-tools { display: flex; align-items: center; gap: 12px; }
  .audience-titles-search { flex: 1 1 auto; width: auto; min-width: 0; height: 40px; background: #fff; }
  .audience-titles-tools .doc-link-btn { flex: 0 0 auto; padding: 0; color: #be185d; font-size: 12.5px; font-weight: 700; background: none; border: 0; cursor: pointer; white-space: nowrap; }
  .audience-titles-tools .doc-link-btn:hover { text-decoration: underline; }
  .audience-titles-selected { display: flex; flex-wrap: wrap; gap: 6px; }
  .audience-selected-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; color: #fff; font-size: 12px; font-weight: 600; background: #1f2f45; border: 0; border-radius: 999px; cursor: pointer; }
  .audience-selected-chip:hover { background: #d81b84; }
  .audience-titles-list { max-height: 280px; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px; margin: 0; padding: 2px; list-style: none; }
  .audience-title-option { display: flex; align-items: center; gap: 10px; padding: 8px 10px; color: #334155; font-size: 13px; background: #fff; border: 1px solid #e4e9f2; border-radius: 10px; cursor: pointer; transition: border-color .15s ease, background-color .15s ease; }
  .audience-title-option:hover { border-color: #d6dde8; }
  .audience-title-option.is-selected { color: #0f172a; font-weight: 600; background: #fdf2f8; border-color: #f3a8d0; }
  .audience-title-option input { width: 16px; height: 16px; flex-shrink: 0; accent-color: #d81b84; }
  .audience-title-option span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .audience-titles-none { grid-column: 1 / -1; padding: 12px; color: #64748b; font-size: 12.5px; text-align: center; }
  .audience-groups-footer { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 14px 28px; border-top: 1px solid #eef1f6; }
  .audience-groups-total { margin-right: auto; color: #64748b; font-size: 12.5px; font-weight: 600; }

  @media (max-width: 720px) {
    .audience-groups-body { padding: 16px; }
    .audience-groups-footer { padding: 12px 16px; }
    .audience-form .form-row, .audience-titles-list { grid-template-columns: 1fr; }
    .audience-group-row { grid-template-columns: 36px minmax(0, 1fr); }
    .audience-group-actions { grid-column: 1 / -1; justify-content: flex-end; }
  }
}

body.doc-editor-resizing, body.doc-editor-resizing * { cursor: nwse-resize !important; user-select: none !important; }
body.doc-editor-resizing[data-resize-handle="e"], body.doc-editor-resizing[data-resize-handle="e"] *,
body.doc-editor-resizing[data-resize-handle="w"], body.doc-editor-resizing[data-resize-handle="w"] * { cursor: ew-resize !important; }
body.doc-editor-resizing[data-resize-handle="ne"], body.doc-editor-resizing[data-resize-handle="ne"] *,
body.doc-editor-resizing[data-resize-handle="sw"], body.doc-editor-resizing[data-resize-handle="sw"] * { cursor: nesw-resize !important; }

/* ── Catálogo tranquilo: buscador, tema, estante "Nuevos esta semana", miniaturas y vista rápida ──────────── */
.documentation-portal .doc-finder { position: relative; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; margin-bottom: 18px; }
.documentation-portal .doc-finder-search { position: relative; flex: 1 1 360px; }
.documentation-portal .doc-finder-input { height: 46px !important; padding: 0 16px; border-radius: 12px !important; }
.documentation-portal .doc-finder-input input { font-size: 14.5px; }
.documentation-portal .doc-finder-suggest {
  position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; right: 0;
  display: flex; flex-direction: column; gap: 2px; padding: 8px;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; box-shadow: 0 14px 32px rgba(15, 23, 42, .14);
}
.documentation-portal .doc-finder-suggest-label { padding: 6px 8px 2px; color: #94a3b8; font-size: 10.5px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; }
.documentation-portal .doc-finder-suggest-item {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px;
  color: #1e293b; font-size: 13px; text-align: left; background: transparent; border: 0; border-radius: 8px; cursor: pointer;
}
.documentation-portal .doc-finder-suggest-item:hover, .documentation-portal .doc-finder-suggest-item:focus-visible { background: #f1f5f9; outline: none; }
.documentation-portal .doc-finder-suggest-item span:not(.doc-finder-suggest-icon) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.documentation-portal .doc-finder-suggest-item small { color: #94a3b8; font-size: 11.5px; white-space: nowrap; }
.documentation-portal .doc-finder-suggest-icon { display: grid; place-items: center; width: 24px; height: 24px; color: #475569; background: #f1f5f9; border-radius: 6px; }

.documentation-portal .doc-topic { position: relative; }
.documentation-portal .doc-topic-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 14px;
  color: #1e293b; font-size: 13.5px; font-weight: 600; background: #fff; border: 1px solid #cbd5e1; border-radius: 12px; cursor: pointer;
}
.documentation-portal .doc-topic-btn:hover { border-color: #94a3b8; }
.documentation-portal .doc-topic-btn.is-chosen { color: #17263d; background: var(--app-selected-soft, #fff3c4); border-color: var(--app-selected, #d89d00); }
.documentation-portal .doc-topic-scrim { position: fixed; inset: 0; z-index: 39; }
.documentation-portal .doc-topic-pop {
  position: absolute; z-index: 41; top: calc(100% + 6px); right: 0; width: 320px; max-width: calc(100vw - 32px);
  padding: 10px; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; box-shadow: 0 14px 32px rgba(15, 23, 42, .14);
}
.documentation-portal .doc-topic-search { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px; color: #94a3b8; border: 1px solid #e2e8f0; border-radius: 8px; }
.documentation-portal .doc-topic-search input { flex: 1; min-width: 0; color: #1e293b; font-size: 13px; background: transparent; border: 0; outline: 0; }
.documentation-portal .doc-topic-list { display: flex; flex-direction: column; gap: 2px; max-height: 320px; margin-top: 8px; overflow-y: auto; }
.documentation-portal .doc-topic-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px;
  color: #1e293b; font-size: 13px; text-align: left; background: transparent; border: 0; border-radius: 8px; cursor: pointer;
}
.documentation-portal .doc-topic-item:hover { background: #f1f5f9; }
.documentation-portal .doc-topic-item.is-active { font-weight: 700; background: var(--app-selected-soft, #fff3c4); }
.documentation-portal .doc-topic-item small { min-width: 22px; padding: 1px 7px; color: #64748b; font-size: 11px; font-weight: 700; text-align: center; background: #f1f5f9; border-radius: 999px; }
.documentation-portal .doc-topic-none { padding: 10px; color: #94a3b8; font-size: 12.5px; }

.documentation-portal .doc-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 2px 0 12px; color: #475569; font-size: 13px; }
.documentation-portal .doc-crumbs-back { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; color: #17263d; font-size: 12.5px; font-weight: 600; background: #f1f5f9; border: 0; border-radius: 999px; cursor: pointer; }
.documentation-portal .doc-crumbs-back:hover { background: #e2e8f0; }
.documentation-portal .doc-crumbs-sep { color: #94a3b8; }
.documentation-portal .doc-crumbs strong { color: #0f172a; font-size: 14px; }
.documentation-portal .doc-crumbs-note { color: #94a3b8; }
.documentation-portal .doc-crumbs-count { margin-left: auto; color: #94a3b8; font-size: 12px; }
.documentation-portal .doc-toolbar-compact { justify-content: flex-end; }

.documentation-portal .doc-shelf { margin-top: 4px; }
.documentation-portal .doc-shelf-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.documentation-portal .doc-shelf-head h2 { margin: 0; color: #0f172a; font-size: 16px; font-weight: 700; }
.documentation-portal .doc-shelf-head small { color: #94a3b8; font-size: 12px; }
.documentation-portal .doc-shelf-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 240px); gap: 14px; overflow-x: auto; padding: 2px 2px 12px; scroll-snap-type: x proximity; }
.documentation-portal .doc-shelf-card {
  display: flex; flex-direction: column; gap: 6px; padding: 10px; scroll-snap-align: start;
  background: #fff; border: 1px solid #e4e9f2; border-radius: 12px; transition: border-color .15s, box-shadow .15s;
}
.documentation-portal .doc-shelf-card:hover, .documentation-portal .doc-shelf-card:focus-visible { border-color: #cbd5e1; box-shadow: 0 6px 18px rgba(15, 23, 42, .08); outline: none; }
.documentation-portal .doc-shelf-open { padding: 0; color: #0f172a; font-size: 13.5px; font-weight: 700; line-height: 1.35; text-align: left; background: transparent; border: 0; cursor: pointer; }
.documentation-portal .doc-shelf-open:hover { color: #d81b84; }
.documentation-portal .doc-shelf-card small { color: #64748b; font-size: 11.5px; }
.documentation-portal .doc-shelf-empty { display: flex; align-items: center; gap: 14px; padding: 26px 22px; background: #fff; border: 1px dashed #cbd5e1; border-radius: 12px; }
.documentation-portal .doc-shelf-empty div { display: flex; flex-direction: column; gap: 3px; }
.documentation-portal .doc-shelf-empty strong { color: #0f172a; font-size: 14px; }
.documentation-portal .doc-shelf-empty span:not(.doc-empty-icon) { color: #64748b; font-size: 12.5px; }

/* Miniaturas */
.documentation-portal .doc-thumb-frame { position: relative; }
.documentation-portal .doc-thumb {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 10; overflow: hidden;
  background: #f1f5f9; border: 1px solid #e8edf4; border-radius: 9px;
}
.documentation-portal .doc-thumb-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.documentation-portal .doc-thumb-img.is-page { object-position: top center; }
.documentation-portal .doc-thumb-loading { position: absolute; inset: 0; }
.documentation-portal .doc-thumb-icon { display: grid; place-items: center; width: 100%; height: 100%; color: #94a3b8; }
.documentation-portal .doc-thumb-play { position: absolute; left: 8px; bottom: 8px; display: grid; place-items: center; width: 28px; height: 28px; color: #fff; background: rgba(15, 23, 42, .7); border-radius: 50%; }
.documentation-portal .doc-thumb-page {
  display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 14px 16px; overflow: hidden;
  background: #fff; color: #64748b; font-size: 10.5px; line-height: 1.45;
}
.documentation-portal .doc-thumb-page strong { color: #0f172a; font-size: 12.5px; line-height: 1.3; }
.documentation-portal .doc-thumb-eye {
  position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 32px; height: 32px;
  color: #17263d; background: rgba(255, 255, 255, .92); border: 1px solid #e2e8f0; border-radius: 8px; cursor: pointer;
  opacity: 0; transform: translateY(-2px); transition: opacity .15s, transform .15s;
}
.documentation-portal .doc-card:hover .doc-thumb-eye, .documentation-portal .doc-card:focus-within .doc-thumb-eye,
.documentation-portal .doc-shelf-card:hover .doc-thumb-eye, .documentation-portal .doc-shelf-card:focus-within .doc-thumb-eye,
.documentation-portal .doc-thumb-eye:focus-visible { opacity: 1; transform: none; }
.documentation-portal .doc-card.has-thumb:focus-visible { outline: 2px solid var(--gold, #d89d00); outline-offset: 2px; }
@media (hover: none) { .documentation-portal .doc-thumb-eye { opacity: 1; transform: none; } }

/* Vista rápida */
.documentation-portal .doc-quicklook-backdrop { z-index: 1150; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(15, 23, 42, .55); }
.documentation-portal .doc-quicklook {
  display: flex; flex-direction: column; width: min(1100px, 100%); height: min(86vh, 900px);
  background: #fff; border-radius: 16px; box-shadow: 0 24px 60px rgba(15, 23, 42, .35); outline: none; overflow: hidden;
}
.documentation-portal .doc-quicklook-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid #e8edf4; }
.documentation-portal .doc-quicklook-title { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.documentation-portal .doc-quicklook-title strong { overflow: hidden; color: #0f172a; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.documentation-portal .doc-quicklook-title small { display: flex; flex-wrap: wrap; gap: 10px; color: #64748b; font-size: 12px; }
.documentation-portal .doc-quicklook-actions { display: flex; align-items: center; gap: 8px; }
.documentation-portal .doc-quicklook-body { position: relative; flex: 1; min-height: 0; background: #f4f6fa; }
.documentation-portal .doc-quicklook-content { height: 100%; padding: 18px 64px; overflow: auto; }
.documentation-portal .doc-quicklook-content .file-preview, .documentation-portal .doc-quicklook-content .office-preview { max-height: none; }
.documentation-portal .doc-quicklook-content .file-preview-frame { height: calc(86vh - 120px); }
.documentation-portal .doc-quicklook-article { max-width: 820px; margin: 0 auto; padding: 28px 34px; background: #fff; border: 1px solid #e8edf4; border-radius: 12px; }
.documentation-portal .doc-quicklook-other { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; height: 100%; color: #64748b; font-size: 13px; text-align: center; }
.documentation-portal .doc-quicklook-other strong { color: #0f172a; font-size: 17px; }
.documentation-portal .doc-quicklook-other p { max-width: 520px; margin: 0; }
.documentation-portal .doc-quicklook-other-icon { display: grid; place-items: center; width: 64px; height: 64px; color: #475569; background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; }
.documentation-portal .doc-quicklook-nav {
  position: absolute; z-index: 2; top: 50%; display: grid; place-items: center; width: 40px; height: 40px; margin-top: -20px;
  color: #17263d; background: #fff; border: 1px solid #e2e8f0; border-radius: 50%; box-shadow: 0 4px 12px rgba(15, 23, 42, .12); cursor: pointer;
}
.documentation-portal .doc-quicklook-nav.is-prev { left: 12px; transform: rotate(180deg); }
.documentation-portal .doc-quicklook-nav.is-next { right: 12px; }
.documentation-portal .doc-quicklook-nav:hover { background: #f8fafc; }
@media (max-width: 720px) {
  .documentation-portal .doc-quicklook-backdrop { padding: 0; }
  .documentation-portal .doc-quicklook { height: 100%; border-radius: 0; }
  .documentation-portal .doc-quicklook-content { padding: 12px; }
  .documentation-portal .doc-quicklook-nav { top: auto; bottom: 12px; }
}

/* Pasar páginas en la miniatura de la tarjeta (PDF, diapositivas, hojas, tramos de Word) */
.documentation-portal .doc-thumb-pager {
  position: absolute; left: 50%; bottom: 8px; display: flex; align-items: center; gap: 4px; padding: 3px;
  background: rgba(15, 23, 42, .78); border-radius: 999px; transform: translate(-50%, 2px);
  opacity: 0; transition: opacity .15s, transform .15s;
}
.documentation-portal .doc-card:hover .doc-thumb-pager, .documentation-portal .doc-card:focus-within .doc-thumb-pager,
.documentation-portal .doc-thumb-pager:focus-within { opacity: 1; transform: translate(-50%, 0); }
.documentation-portal .doc-thumb-page-btn {
  display: grid; place-items: center; width: 26px; height: 26px; padding: 0;
  color: #fff; background: transparent; border: 0; border-radius: 50%; cursor: pointer;
}
.documentation-portal .doc-thumb-page-btn:hover:not(:disabled) { background: rgba(255, 255, 255, .18); }
.documentation-portal .doc-thumb-page-btn:disabled { opacity: .35; cursor: default; }
.documentation-portal .doc-thumb-page-btn.is-prev { transform: rotate(180deg); }
.documentation-portal .doc-thumb-page-count { display: inline-flex; align-items: center; justify-content: center; min-width: 46px; color: #fff; font-size: 11.5px; font-weight: 700; }
@media (hover: none) { .documentation-portal .doc-thumb-pager { opacity: 1; transform: translate(-50%, 0); } }

/* El título de la tarjeta estira un enlace invisible sobre toda ella (z-index 1, .doc-card-open::after): las
   flechas de páginas y la vista rápida van por encima, para que su clic no abra el lector. */
.documentation-portal .doc-thumb-eye,
.documentation-portal .doc-thumb-pager { z-index: 3; }

/* Tema a la izquierda del buscador, y panel de temas fijado con el pin */
.documentation-portal .doc-topic-pop { left: 0; right: auto; }
.documentation-portal .doc-topic-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.documentation-portal .doc-topic-head strong { color: #0f172a; font-size: 13px; }
.documentation-portal .doc-topic-pin {
  display: grid; place-items: center; width: 30px; height: 30px; padding: 0;
  color: #64748b; background: transparent; border: 1px solid transparent; border-radius: 8px; cursor: pointer;
}
.documentation-portal .doc-topic-pin:hover { color: #17263d; background: #f1f5f9; }
.documentation-portal .doc-topic-pin.is-pinned { color: #17263d; background: var(--app-selected-soft, #fff3c4); border-color: var(--app-selected, #d89d00); }
.documentation-portal .doc-catalog-body.is-pinned { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; align-items: start; }
.documentation-portal .doc-catalog-main { min-width: 0; }
.documentation-portal .doc-topic-aside {
  position: sticky; top: 12px; padding: 12px;
  background: #fff; border: 1px solid #e4e9f2; border-radius: 12px;
}
.documentation-portal .doc-topic-aside .doc-topic-list { max-height: calc(100vh - 300px); }
@media (min-width: 901px) {
  .documentation-portal .doc-catalog.has-pinned-topics .doc-topic { display: none; }
}
@media (max-width: 900px) {
  .documentation-portal .doc-catalog-body.is-pinned { display: block; }
  .documentation-portal .doc-topic-aside { display: none; }
}

/* ══ Aprovechar el espacio en todo el portal ═══════════════════════════════════════════════════════════════════
   El contenido ocupa el ancho disponible (antes tenía un tope de 1.480 px centrado y sobraban ~170 px a cada lado),
   con márgenes, encabezados, tarjetas y separaciones más compactos y parejos. Solo espacios y tamaños. */
.documentation-portal .doc-page,
.documentation-portal .doc-main .doc-page { max-width: 1920px; padding: 16px 24px 32px; }
.documentation-portal .doc-main .doc-workshop-required { margin: 12px 24px 0; }
.documentation-portal .page-title,
.documentation-portal .doc-section-head { gap: 16px; margin-bottom: 14px; }
.documentation-portal .page-title h1,
.documentation-portal .welcome-row h1 { margin: 2px 0 4px; }
.documentation-portal .welcome-row { margin-bottom: 14px; }

/* Documentación */
.documentation-portal .doc-finder { gap: 8px; margin-bottom: 12px; }
.documentation-portal .doc-finder-input { height: 42px !important; }
.documentation-portal .doc-topic-btn { height: 42px; }
.documentation-portal .doc-crumbs { margin: 0 0 6px; }
.documentation-portal .doc-toolbar { margin-bottom: 10px !important; }
.documentation-portal .doc-page .doc-grid,
.documentation-portal .doc-grid { grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 14px; }
.documentation-portal .doc-card.doc-card-v3 { gap: 7px; padding: 12px; }
.documentation-portal .doc-card-v3 .doc-card-top { min-height: 34px; gap: 8px; }
.documentation-portal .doc-card .doc-summary { min-height: 0; font-size: 12.5px; }
.documentation-portal .doc-card-foot,
.documentation-portal .doc-card-v3 .doc-card-foot { gap: 8px; padding-top: 8px; }
.documentation-portal .doc-thumb { aspect-ratio: 16 / 9; }
.documentation-portal .doc-catalog-body.is-pinned { grid-template-columns: 240px minmax(0, 1fr); gap: 18px; }
.documentation-portal .doc-topic-aside { top: 8px; padding: 10px; }
.documentation-portal .doc-topic-item { padding: 6px 9px; font-size: 12.5px; }
.documentation-portal .doc-topic-aside .doc-topic-list { max-height: calc(100vh - 240px); margin-top: 6px; }
.documentation-portal .doc-list-row { padding-top: 8px; padding-bottom: 8px; }
.documentation-portal .doc-pagination-bar { margin-top: 14px; }

/* Rutas, Inicio, Mis certificados, Mis técnicos, Resumen ejecutivo y Talleres */
.documentation-portal .routes-layout { grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); gap: 16px; }
.documentation-portal .route-card { padding: 12px 14px; }
.documentation-portal .cert-grid { gap: 14px; }
.documentation-portal .doc-stats { gap: 10px; margin-bottom: 14px; }
.documentation-portal .team-grid { gap: 12px; }
.documentation-portal .team-member { padding: 14px; }
.documentation-portal .doc-grid.workshops-grid,
.documentation-portal .workshops-grid { gap: 14px; }
.documentation-portal .workshop-card-body { padding-top: 10px; padding-bottom: 10px; }
.documentation-portal .exec-grid,
.documentation-portal .exec-kpis,
.documentation-portal .exec-insights { gap: 12px; margin-bottom: 12px; }
.documentation-portal .exec-card { padding: 16px 18px; }
.documentation-portal .exec-kpi { padding: 12px 14px; }
.documentation-portal .exec-insight { padding: 10px 14px; }

/* Lector y vista rápida: el documento se ve más grande */
.documentation-portal .doc-reader-modal,
.documentation-portal .modal-box.doc-reader-modal { width: 94vw; max-width: 1640px; max-height: 94vh; }
.documentation-portal .doc-quicklook { width: min(1640px, 94vw); height: min(92vh, 1100px); }
.documentation-portal .doc-quicklook-backdrop { padding: 12px; }
.documentation-portal .doc-quicklook-content { padding: 14px 58px; }
.documentation-portal .doc-quicklook-content .file-preview-frame { height: calc(92vh - 110px); }
@media (max-width: 720px) {
  .documentation-portal .doc-page,
  .documentation-portal .doc-main .doc-page { padding: 12px 12px 28px; }
  .documentation-portal .doc-quicklook-content { padding: 10px; }
}

/* ══ Rutas, Talleres y Mis técnicos: el mismo lenguaje del catálogo ══════════════════════════════════════════════
   Paneles fijables, franjas de cifras, tablas densas y tarjetas compactas con miniatura. */

/* Franja de cifras (Talleres y Mis técnicos) */
.documentation-portal .doc-strip {
  display: flex; flex-wrap: wrap; align-items: stretch; gap: 0;
  margin-bottom: 12px; padding: 4px;
  background: #fff; border: 1px solid #e4e9f2; border-radius: 12px;
}
.documentation-portal .doc-strip-item {
  flex: 1 1 150px; min-width: 0;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  border-right: 1px solid #eef1f6;
}
.documentation-portal .doc-strip-item:last-child { border-right: 0; }
.documentation-portal .doc-strip-item .doc-stat-icon { width: 30px; height: 30px; min-width: 30px; border-radius: 8px; }
.documentation-portal .doc-strip-item > div { min-width: 0; display: flex; flex-direction: column; }
.documentation-portal .doc-strip-item strong { color: #0f172a; font-size: 17px; font-weight: 800; line-height: 1.2; white-space: nowrap; }
.documentation-portal .doc-strip-item strong small { color: #94a3b8; font-size: 12px; font-weight: 600; }
.documentation-portal .doc-strip-item > div > span { overflow: hidden; color: #64748b; font-size: 11.5px; white-space: nowrap; text-overflow: ellipsis; }
.documentation-portal .doc-strip-item.is-wide { flex: 2 1 240px; }
.documentation-portal .doc-strip-item.is-wide .team-progress-track { flex: 1; min-width: 60px; height: 7px; }

/* Mis técnicos: las dos barras del equipo dentro de la franja */
.documentation-portal .team-strip .team-adoption {
  flex: 3 1 420px; min-width: 0;
  display: flex; align-items: stretch; gap: 8px; margin: 0; padding: 4px;
}
.documentation-portal .team-strip .team-adoption-card {
  flex: 1 1 0; min-width: 0; gap: 5px; padding: 8px 12px;
  background: #f8fafc; border: 1px solid #eef1f6; border-radius: 10px;
}
.documentation-portal .team-strip .team-adoption-title { gap: 8px; justify-content: space-between; }
.documentation-portal .team-strip .team-adoption-title strong { overflow: hidden; font-size: 12.5px; white-space: nowrap; text-overflow: ellipsis; }
.documentation-portal .team-strip .team-adoption-value { font-size: 16px; }
.documentation-portal .team-strip .team-adoption-card small { overflow: hidden; color: #94a3b8; font-size: 11px; white-space: nowrap; text-overflow: ellipsis; }
.documentation-portal .team-strip .team-progress-bar { height: 6px; }
.documentation-portal .team-strip .team-adoption-note {
  align-self: center; flex-shrink: 0;
  display: grid; place-items: center; width: 26px; height: 26px;
  color: #94a3b8; border-radius: 50%; cursor: help;
}
.documentation-portal .team-strip .team-adoption-note:hover,
.documentation-portal .team-strip .team-adoption-note:focus-visible { color: #17263d; background: #f1f5f9; outline: none; }

/* Mis técnicos: mi avance en una fila */
.documentation-portal .doc-team .team-self {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px;
  margin-bottom: 12px; padding: 10px 14px;
  border-left-width: 3px; border-radius: 12px; box-shadow: none;
}
.documentation-portal .doc-team .team-self-ring { width: 46px; height: 46px; min-width: 46px; }
.documentation-portal .doc-team .team-self-ring::before { inset: 5px; }
.documentation-portal .doc-team .team-self-ring strong { font-size: 12px; }
.documentation-portal .doc-team .team-self-body { flex: 0 1 auto; gap: 0; }
.documentation-portal .doc-team .team-self-body strong { color: #0f172a; font-size: 14px; }
.documentation-portal .doc-team .team-self .team-member-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.documentation-portal .doc-team .team-self .team-member-chips span { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; color: #475569; font-size: 11.5px; background: #f1f5f9; border-radius: 999px; }
.documentation-portal .doc-team .team-self .team-adoption-bars { flex: 1 1 260px; flex-direction: row; gap: 14px; max-width: 520px; margin: 0; }
.documentation-portal .doc-team .team-self .team-adoption-row { flex: 1; min-width: 0; }
.documentation-portal .doc-team .team-self .doc-link-btn { margin-left: auto; padding: 4px 10px; color: #9d174d; font-size: 12px; font-weight: 600; background: transparent; border: 1px solid transparent; border-radius: 999px; cursor: pointer; }
.documentation-portal .doc-team .team-self .doc-link-btn:hover { background: #fdf2f8; border-color: #f9d0e6; }

/* Mis técnicos: tabla o tarjetas a la izquierda y el detalle de la persona a la derecha */
.documentation-portal .team-body.has-detail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.documentation-portal .team-body-main { min-width: 0; }
.documentation-portal .team-table tbody .team-row { cursor: pointer; }
.documentation-portal .team-table tbody .team-row.is-selected td { background: #fdf2f8; }
.documentation-portal .team-table th,
.documentation-portal .team-table td { padding: 8px 12px; }
.documentation-portal .team-row-open {
  padding: 0; color: #0f172a; font: inherit; font-weight: 600; text-align: left;
  background: transparent; border: 0; cursor: pointer;
}
.documentation-portal .team-row-open:hover { color: #9d174d; }
.documentation-portal .team-row-open:focus-visible { outline: 2px solid #d81b84; outline-offset: 2px; border-radius: 4px; }
.documentation-portal .team-member-photo-slot {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; border-radius: 50%;
}
.documentation-portal .team-member-photo-slot.is-sm { width: 32px; height: 32px; min-width: 32px; background: #e2e8f0; }
.documentation-portal .team-member-photo-slot.is-sm .team-member-avatar,
.documentation-portal .team-member-photo-slot.is-sm .team-member-fallback { font-size: 12px; }
.documentation-portal .doc-team .team-member { position: relative; }
.documentation-portal .doc-team .team-member.is-selected { border-color: #d81b84; box-shadow: 0 0 0 3px rgba(216, 27, 132, 0.12); }
.documentation-portal .doc-team .team-member-name .doc-card-open { overflow: hidden; max-width: 100%; white-space: nowrap; text-overflow: ellipsis; }
.documentation-portal .doc-team .team-member:has(.doc-card-open:focus-visible) { outline: 2px solid #d81b84; outline-offset: 2px; }

.documentation-portal .team-detail {
  position: sticky; top: 8px;
  display: flex; flex-direction: column; gap: 12px;
  max-height: calc(100vh - 24px); overflow-y: auto;
  padding: 14px;
  background: #fff; border: 1px solid #e4e9f2; border-radius: 12px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}
.documentation-portal .team-detail-head { display: flex; align-items: flex-start; gap: 10px; }
.documentation-portal .team-detail-head > .team-member-photo-slot { width: 44px; height: 44px; min-width: 44px; background: #e2e8f0; }
.documentation-portal .team-detail-id { min-width: 0; flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.documentation-portal .team-detail-id strong { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: #0f172a; font-size: 15px; }
.documentation-portal .team-detail-id > span:not(.team-member-state) { color: #64748b; font-size: 12px; }
.documentation-portal .team-detail-close { flex-shrink: 0; }
.documentation-portal .team-detail .team-adoption-bars { margin: 0; }
.documentation-portal .team-detail-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 0; }
.documentation-portal .team-detail-stats div { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; background: #f8fafc; border-radius: 9px; }
.documentation-portal .team-detail-stats dt { display: inline-flex; align-items: center; gap: 4px; color: #64748b; font-size: 11px; }
.documentation-portal .team-detail-stats dd { margin: 0; color: #0f172a; font-size: 13.5px; font-weight: 700; }
.documentation-portal .team-detail-title { margin: 2px 0 0; color: #0f172a; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.documentation-portal .team-detail .team-route-list { margin: 0; padding: 0; }
.documentation-portal .team-detail-empty { margin: 0; color: #94a3b8; font-size: 12.5px; }

/* Tablas densas con anchos fijos y parejos (Talleres y Mis técnicos) */
.documentation-portal .team-table.team-table-fixed { table-layout: fixed; min-width: 980px; }
.documentation-portal .team-table.ws-table { table-layout: fixed; min-width: 1280px; }
.documentation-portal .team-table th.is-num,
.documentation-portal .team-table td.is-num { text-align: center; }
.documentation-portal .team-table td { overflow: hidden; text-overflow: ellipsis; }
.documentation-portal .team-table .exec-progress { min-width: 0; }
.documentation-portal .team-table .exec-progress .team-progress-track { min-width: 40px; }
.documentation-portal .team-table .team-row-person > span:last-child { overflow: hidden; }
.documentation-portal .team-table .team-row-person small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.documentation-portal .team-cell-none { color: #94a3b8; font-size: 12px; }
.documentation-portal .team-col-person { width: 26%; }
.documentation-portal .team-col-bar { width: 15%; }
.documentation-portal .team-col-bar.is-wide { width: 30%; }
.documentation-portal .team-col-num { width: 7%; }
.documentation-portal .team-col-state { width: 12%; }
.documentation-portal .doc-team .team-self .team-adoption-bars { flex: 0 1 380px; }
.documentation-portal .team-self-norutes { color: #94a3b8; font-size: 12px; }

/* Talleres: tabla ordenable */
.documentation-portal .ws-col-name { width: 17%; }
.documentation-portal .ws-col-state { width: 9%; }
.documentation-portal .ws-col-progress { width: 11%; }
.documentation-portal .ws-col-num { width: 5.5%; }
.documentation-portal .ws-col-days { width: 8%; }
.documentation-portal .ws-col-score { width: 8%; }
.documentation-portal .ws-col-actions { width: 14.5%; }
.documentation-portal .ws-days { font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.documentation-portal .ws-days.is-fresh { color: #15803d; }
.documentation-portal .ws-days.is-stale { color: #b45309; }
.documentation-portal .ws-days.is-old { color: #b91c1c; }
.documentation-portal .ws-days.is-never { color: #94a3b8; font-weight: 600; }
.documentation-portal .ws-score { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.15; }
.documentation-portal .ws-score strong { color: #0f172a; font-size: 13px; }
.documentation-portal .ws-score small { color: #64748b; font-size: 11px; white-space: nowrap; }
.documentation-portal .ws-score-of { color: #94a3b8; font-size: 11px; font-weight: 600; }
.documentation-portal .exec-scope select { min-width: 260px; max-width: 360px; }

/* Rutas: buscador que sugiere una ruta y dice si ya está completada */
.documentation-portal .route-finder { display: flex; flex-direction: column; gap: 8px; }
.documentation-portal .route-finder-title { margin: 6px 0 0; color: #64748b; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.documentation-portal .route-finder-empty { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; background: #f7f9fc; border: 1px dashed #cbd5e1; border-radius: 12px; }
.documentation-portal .route-finder-empty strong { color: #0f172a; font-size: 14px; }
.documentation-portal .route-finder-empty span { color: #64748b; font-size: 12.5px; }
.documentation-portal .route-suggestion { display: flex; align-items: center; gap: 14px; padding: 12px 16px; background: #fff; border: 1px solid #e4e9f2; border-radius: 12px; }
.documentation-portal .route-suggestion.is-best { padding: 16px 18px; border-color: #d81b84; box-shadow: 0 6px 18px rgba(216, 27, 132, 0.08); }
.documentation-portal .route-suggestion-icon { width: 34px; height: 34px; flex-shrink: 0; display: grid; place-items: center; color: #9d174d; background: #fce7f3; border-radius: 10px; }
.documentation-portal .route-suggestion.is-done .route-suggestion-icon { color: #15803d; background: #dcfce7; }
.documentation-portal .route-suggestion-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.documentation-portal .route-suggestion-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.documentation-portal .route-suggestion-head strong { color: #0f172a; font-size: 14.5px; }
.documentation-portal .route-suggestion.is-best .route-suggestion-head strong { font-size: 16px; }
.documentation-portal .route-suggestion-head .route-scope-badge,
.documentation-portal .route-suggestion-head .route-status { position: static; }
.documentation-portal .route-suggestion-meta { color: #64748b; font-size: 12.5px; }
.documentation-portal .route-suggestion-hint { color: #334155; font-size: 12.5px; font-weight: 600; }
.documentation-portal .route-suggestion.is-done .route-suggestion-hint { color: #15803d; }
.documentation-portal .route-suggestion > button { flex-shrink: 0; display: inline-flex; align-items: center; gap: 4px; }
@media (max-width: 640px) {
  .documentation-portal .route-suggestion { flex-wrap: wrap; }
}
.documentation-portal .ws-table tbody .ws-row { cursor: pointer; }
.documentation-portal .ws-table tbody .ws-row.is-inactive td { color: #94a3b8; }
.documentation-portal .ws-table .workshop-avatar.is-sm { width: 32px; height: 32px; border-width: 1px; box-shadow: none; }
.documentation-portal .ws-table .workshop-avatar.is-sm .workshop-avatar-initials { font-size: 11.5px; }
.documentation-portal .ws-row-name { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.documentation-portal .ws-table .team-row-person small { display: inline-flex; align-items: center; gap: 5px; }
.documentation-portal .ws-table td.ws-row-actions { overflow: visible; white-space: nowrap; text-align: right; }
.documentation-portal .ws-row-actions > * + * { margin-left: 6px; }
.documentation-portal .ws-row-actions .btn-sm { padding-left: 10px; padding-right: 10px; }
.documentation-portal .ws-sort {
  display: inline-flex; align-items: center; gap: 4px; padding: 0;
  color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit;
  background: transparent; border: 0; cursor: pointer;
}
.documentation-portal .ws-sort:hover,
.documentation-portal .ws-sort.is-active { color: #0f172a; }
.documentation-portal .ws-sort-caret { display: inline-grid; transform: rotate(90deg); }
.documentation-portal .ws-sort-caret.is-reversed { transform: rotate(-90deg); }
.documentation-portal .ws-grid { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.documentation-portal .ws-card { gap: 10px; padding: 14px; }

/* Rutas: catálogo de rutas en tarjetas con portada (como las rutas de Platzi) */
.documentation-portal .route-catalog { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.documentation-portal .doc-routes .route-card.route-tile {
  position: relative;
  display: flex; flex-direction: column; gap: 0;
  padding: 0; overflow: hidden;
  border-radius: 14px;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.documentation-portal .doc-routes .route-card.route-tile::before { content: none; }
.documentation-portal .doc-routes .route-card.route-tile:hover { transform: translateY(-2px); border-color: #d6dde8; box-shadow: 0 14px 30px rgba(15, 23, 42, 0.1); }
.documentation-portal .route-tile-cover { position: relative; }
.documentation-portal .route-tile-cover .doc-thumb { aspect-ratio: 16 / 9; border: 0; border-bottom: 1px solid #eef1f6; border-radius: 0; }
.documentation-portal .route-tile-nocover { display: grid; place-items: center; color: rgba(255, 255, 255, 0.85); background: linear-gradient(135deg, #17263d 0%, #2b3f5c 100%); }
.documentation-portal .route-card-workshop .route-tile-nocover { background: linear-gradient(135deg, #831843 0%, #d81b84 100%); }
/* Collage de la portada: las imágenes y videos de la ruta (2 a 4) en una sola vista. */
.documentation-portal .route-tile-collage {
  position: relative; display: grid; gap: 2px; aspect-ratio: 16 / 9; overflow: hidden;
  background: #eef1f6; border-bottom: 1px solid #eef1f6;
}
.documentation-portal .route-tile-collage.is-2 { grid-template-columns: 1fr 1fr; }
.documentation-portal .route-tile-collage.is-3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.documentation-portal .route-tile-collage.is-3 > .doc-thumb:first-child { grid-row: 1 / span 2; }
.documentation-portal .route-tile-collage.is-4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.documentation-portal .route-tile-cover .route-tile-collage .doc-thumb {
  aspect-ratio: auto; width: 100%; height: 100%; min-height: 0; border: 0; border-radius: 0;
}
.documentation-portal .route-tile-collage .doc-thumb-img { width: 100%; height: 100%; object-fit: cover; }
.documentation-portal .route-tile-collage-more {
  position: absolute; right: 8px; bottom: 8px; padding: 2px 8px; border-radius: 999px;
  background: rgba(15, 23, 42, 0.72); color: #fff; font-size: 12px; font-weight: 700;
}
.documentation-portal .route-tile-cover .route-scope-badge { position: absolute; top: 10px; left: 10px; box-shadow: 0 2px 6px rgba(15, 23, 42, 0.15); }
.documentation-portal .route-tile-cover .route-status { position: absolute; left: 10px; bottom: 10px; box-shadow: 0 2px 6px rgba(15, 23, 42, 0.15); }
.documentation-portal .route-tile .doc-card-tools {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  display: inline-flex; gap: 2px; padding: 2px;
  background: rgba(255, 255, 255, 0.94); border-radius: 8px; box-shadow: 0 2px 6px rgba(15, 23, 42, 0.15);
}
.documentation-portal .route-tile-body { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 12px 14px 14px; }
.documentation-portal .doc-routes .route-tile .route-card-title { font-size: 15.5px; line-height: 1.3; }
.documentation-portal .route-tile-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; color: #64748b; font-size: 12px; }
.documentation-portal .route-tile-meta span { display: inline-flex; align-items: center; gap: 4px; }
.documentation-portal .route-tile-meta .is-cert { color: #7c5800; font-weight: 600; }
.documentation-portal .doc-routes .route-tile .route-card-progress-row { margin-top: auto; padding-top: 4px; }

/* Rutas: página de la ruta abierta */
.documentation-portal .route-page-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }

/* Buscador dentro de una ruta: ir a otra ruta sin volver al catálogo */
.documentation-portal .route-finder-inline { position: relative; flex: 0 1 380px; min-width: 240px; }
.documentation-portal .route-finder-inline-box { width: 100%; height: 38px; }
.documentation-portal .route-finder-inline-box input { flex: 1; min-width: 0; }
.documentation-portal .route-finder-inline-close { width: 24px; height: 24px; flex-shrink: 0; display: grid; place-items: center; padding: 0; color: #64748b; background: none; border: 0; border-radius: 50%; cursor: pointer; }
.documentation-portal .route-finder-inline-close:hover { color: #0f172a; background: #f1f5f9; }
.documentation-portal .route-finder-inline-panel { position: absolute; top: calc(100% + 6px); right: 0; left: 0; z-index: 30; display: flex; flex-direction: column; gap: 2px; max-height: 420px; overflow-y: auto; padding: 8px; background: #fff; border: 1px solid #e4e9f2; border-radius: 14px; box-shadow: 0 16px 36px rgba(15, 23, 42, 0.16); }
.documentation-portal .route-finder-inline-title { padding: 4px 8px 6px; color: #64748b; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.documentation-portal .route-finder-inline-empty { margin: 0; padding: 10px 8px; color: #64748b; font-size: 12.5px; line-height: 1.45; }
.documentation-portal .route-finder-option { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; text-align: left; font: inherit; background: none; border: 0; border-radius: 10px; cursor: pointer; }
.documentation-portal .route-finder-option:hover,
.documentation-portal .route-finder-option:focus-visible { background: #fdf2f8; outline: none; }
.documentation-portal .route-finder-option-icon { width: 30px; height: 30px; flex-shrink: 0; display: grid; place-items: center; color: #9d174d; background: #fce7f3; border-radius: 9px; }
.documentation-portal .route-finder-option-icon.is-done { color: #15803d; background: #dcfce7; }
.documentation-portal .route-finder-option-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.documentation-portal .route-finder-option-text strong { overflow: hidden; color: #0f172a; font-size: 13px; white-space: nowrap; text-overflow: ellipsis; }
.documentation-portal .route-finder-option-text small { overflow: hidden; color: #64748b; font-size: 11.5px; white-space: nowrap; text-overflow: ellipsis; }
.documentation-portal .route-finder-option .route-status { position: static; flex-shrink: 0; }
@media (max-width: 640px) {
  .documentation-portal .route-finder-inline { flex-basis: 100%; }
}
.documentation-portal .route-hero {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 36px;
  margin-bottom: 18px; padding: 26px 30px;
  color: #fff;
  background: radial-gradient(circle at 88% 0%, rgba(216, 27, 132, 0.38), transparent 55%), linear-gradient(135deg, #17263d 0%, #1f2f45 60%, #2b3f5c 100%);
  border-radius: 16px;
}
.documentation-portal .route-hero.is-workshop { background: radial-gradient(circle at 88% 0%, rgba(222, 163, 1, 0.3), transparent 55%), linear-gradient(135deg, #17263d 0%, #3b1530 60%, #831843 100%); }
.documentation-portal .route-hero-main { flex: 1 1 460px; min-width: 0; }
.documentation-portal .route-hero-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.documentation-portal .route-hero .route-scope-badge,
.documentation-portal .route-hero .route-meta-chip { color: #fff; background: rgba(255, 255, 255, 0.14); border-color: transparent; }
.documentation-portal .doc-routes .route-hero .route-detail-title { margin: 0 0 8px; color: #fff; font-size: 26px; line-height: 1.2; }
.documentation-portal .route-hero-desc { max-width: 820px; margin: 0 0 14px; color: #cbd5e1; font-size: 14px; line-height: 1.55; }
.documentation-portal .route-hero-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.documentation-portal .route-hero-meta span { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; color: #e2e8f0; font-size: 12.5px; background: rgba(255, 255, 255, 0.1); border-radius: 999px; }
.documentation-portal .route-hero-meta .is-cert { color: #fde68a; }
.documentation-portal .route-hero-progress { flex: 0 1 280px; display: flex; flex-direction: column; gap: 8px; }
.documentation-portal .route-hero-percent { color: #fff; font-size: 34px; font-weight: 800; line-height: 1; }
.documentation-portal .route-hero-progress .team-progress-track { height: 8px; background: rgba(255, 255, 255, 0.18); }
.documentation-portal .route-hero-progress .team-progress-track i { background: linear-gradient(90deg, #f5c542 0%, #dea301 100%); }
.documentation-portal .route-hero-progress.is-complete .team-progress-track i { background: #22c55e; }
.documentation-portal .route-hero-progress .route-detail-progress-title { color: #cbd5e1; font-size: 13px; font-weight: 600; }

.documentation-portal .route-page { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.documentation-portal .route-page-main { min-width: 0; }
.documentation-portal .route-page-title { margin: 0 0 10px; color: #0f172a; font-size: 17px; font-weight: 800; }
.documentation-portal .route-page-title small { color: #94a3b8; font-size: 14px; font-weight: 600; }
.documentation-portal .route-rows { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.documentation-portal .route-step.route-row {
  position: relative;
  display: grid; grid-template-columns: 200px minmax(0, 1fr) auto; align-items: center; gap: 16px;
  padding: 10px 16px 10px 10px;
  background: #fff; border: 1px solid #e4e9f2; border-radius: 12px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.documentation-portal .route-step.route-row::before { content: none; }
.documentation-portal .route-row:hover { border-color: #d6dde8; box-shadow: 0 8px 20px rgba(15, 23, 42, 0.07); }
.documentation-portal .route-row:focus-visible { outline: 2px solid #d81b84; outline-offset: 2px; }
.documentation-portal .route-row.is-current { border-color: #d81b84; box-shadow: 0 0 0 3px rgba(216, 27, 132, 0.12); }
.documentation-portal .route-row.is-done { background: #fbfefc; border-color: #bbf7d0; }
.documentation-portal .route-row-thumb .doc-thumb { aspect-ratio: 16 / 9; }
.documentation-portal .route-row-nothumb { display: grid; place-items: center; color: #cbd5e1; background: #f8fafc; border-style: dashed; }
.documentation-portal .route-row:hover .doc-thumb-eye,
.documentation-portal .route-row:focus-within .doc-thumb-eye { opacity: 1; transform: none; }
.documentation-portal .route-row:hover .doc-thumb-pager,
.documentation-portal .route-row:focus-within .doc-thumb-pager { opacity: 1; transform: translate(-50%, 0); }
.documentation-portal .route-row-body { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.documentation-portal .route-row-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: #64748b; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.documentation-portal .route-row-num { width: 24px; height: 24px; display: grid; place-items: center; color: #475569; font-size: 11px; letter-spacing: 0; background: #f1f5f9; border-radius: 50%; }
.documentation-portal .route-row.is-done .route-row-num { color: #fff; background: #16a34a; }
.documentation-portal .route-row.is-current .route-row-num { color: #fff; background: #d81b84; }
.documentation-portal .route-row-kicker .route-step-status { padding: 1px 8px; font-size: 10.5px; letter-spacing: 0; text-transform: none; }
.documentation-portal .route-row.is-done .route-step-status { color: #15803d; background: #dcfce7; }
.documentation-portal .route-row.is-current .route-step-status { color: #9d174d; background: #fce7f3; }
.documentation-portal .route-row .route-module-title { margin: 0; color: #0f172a; font-size: 15.5px; font-weight: 700; line-height: 1.3; }
.documentation-portal .route-row .route-module-doc {
  max-width: 100%; padding: 0; overflow: hidden;
  color: #334d6e; font-size: 13px; text-align: left; white-space: nowrap; text-overflow: ellipsis;
  background: transparent; border: 0; border-radius: 0;
}
.documentation-portal .route-row .route-module-doc:hover { color: #9d174d; text-decoration: underline; background: transparent; }
.documentation-portal .route-row-chips { display: flex; flex-wrap: wrap; gap: 6px; }
/* Módulo de la ruta: el título es el del documento y abre el módulo; debajo, de qué trata. */
.documentation-portal .route-row .route-module-open {
  padding: 0; color: inherit; font: inherit; text-align: left; background: transparent; border: 0; cursor: pointer;
}
.documentation-portal .route-row .route-module-open:hover { color: #9d174d; text-decoration: underline; }
.documentation-portal .route-module-summary {
  margin: 0; color: #475569; font-size: 13px; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.documentation-portal .route-side-module { color: #64748b; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }

/* Tarjeta de documento (v4): tipo y duración sobre la portada; tema, título y resumen; datos con su nombre. */
.documentation-portal .doc-card-v4 { display: flex; flex-direction: column; }
.documentation-portal .doc-card-v4 .doc-card-kind-badge {
  position: absolute; left: 8px; top: 8px; display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; color: #0369a1; font-size: 11px; font-weight: 700; background: rgba(255, 255, 255, .95);
  border-radius: 999px; box-shadow: 0 1px 4px rgba(15, 23, 42, .15);
}
.documentation-portal .doc-card-v4 .doc-card-kind-badge.kind-evaluation { color: #9d174d; }
.documentation-portal .doc-card-v4 .doc-card-kind-badge.kind-simulator { color: #6d28d9; }
.documentation-portal .doc-card-v4 .doc-card-kind-badge.kind-file { color: #475569; }
.documentation-portal .doc-card-v4 .doc-card-duration {
  position: absolute; right: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 7px; color: #fff; font-size: 11px; font-weight: 600; background: rgba(15, 23, 42, .72); border-radius: 999px;
}
.documentation-portal .doc-card-v4 .doc-thumb-frame .doc-card-tools {
  position: absolute; left: 8px; bottom: 8px; z-index: 2; margin: 0; padding: 2px;
  background: rgba(255, 255, 255, .94); border-radius: 8px; box-shadow: 0 2px 6px rgba(15, 23, 42, .15);
}
.documentation-portal .doc-card-v4 .doc-card-body { flex: 1; display: flex; flex-direction: column; gap: 6px; padding-top: 4px; }
.documentation-portal .doc-card-v4 .doc-card-topic { color: #d81b84; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.documentation-portal .doc-card-v4 .doc-title { margin: 0; font-size: 15px; line-height: 1.3; }
.documentation-portal .doc-card-v4 .doc-summary {
  margin: 0; color: #475569; font-size: 12.5px; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.documentation-portal .doc-card-v4 .doc-card-facts { display: grid; gap: 4px; margin: 4px 0 0; padding-top: 8px; border-top: 1px dashed #e2e8f0; }
.documentation-portal .doc-card-v4 .doc-card-facts > div { display: grid; grid-template-columns: 74px minmax(0, 1fr); align-items: center; gap: 6px; }
.documentation-portal .doc-card-v4 .doc-card-facts dt { color: #94a3b8; font-size: 11px; font-weight: 600; }
.documentation-portal .doc-card-v4 .doc-card-facts dd { min-width: 0; margin: 0; font-size: 12px; }
.documentation-portal .doc-card-v4 .doc-route-link {
  display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 0;
  color: #9d174d; font-size: 12px; font-weight: 600; background: transparent; border: 0; cursor: pointer;
}
.documentation-portal .doc-card-v4 .doc-route-link span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.documentation-portal .doc-card-v4 .doc-route-link:hover span { text-decoration: underline; }
.documentation-portal .doc-card-v4 .doc-card-foot { margin-top: auto; }
.documentation-portal .route-module-kind { display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px; color: #0369a1; font-size: 11px; font-weight: 600; background: #e0f2fe; border-radius: 6px; }
.documentation-portal .route-module-kind.kind-file { color: #475569; background: #f1f5f9; }
.documentation-portal .route-module-kind.kind-evaluation { color: #9d174d; background: #fce7f3; }
.documentation-portal .route-module-kind.kind-simulator { color: #6d28d9; background: #ede9fe; }
.documentation-portal .route-module-time { display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px; color: #64748b; font-size: 11px; font-weight: 600; background: #f1f5f9; border-radius: 6px; }
.documentation-portal .route-row .route-step-progress { width: 220px; max-width: 100%; }
.documentation-portal .route-row .route-step-howto { margin: 0; line-height: 1.35; }
.documentation-portal .route-row-action .route-step-action { margin: 0; white-space: nowrap; }

/* Rutas: tarjeta fija a la derecha */
.documentation-portal .route-side { position: sticky; top: 8px; display: flex; flex-direction: column; gap: 12px; }
.documentation-portal .route-side-card { display: flex; flex-direction: column; gap: 8px; padding: 16px; background: #fff; border: 1px solid #e4e9f2; border-radius: 14px; }
.documentation-portal .route-side-kicker { color: #d81b84; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.documentation-portal .route-side-next strong { color: #0f172a; font-size: 14px; line-height: 1.35; }
.documentation-portal .route-side-next small { color: #64748b; font-size: 12px; }
.documentation-portal .route-side-thumb .doc-thumb { aspect-ratio: 16 / 9; }
.documentation-portal .route-side-cta { width: 100%; justify-content: center; margin-top: 4px; }
.documentation-portal .route-side-done { width: 36px; height: 36px; display: grid; place-items: center; color: #fff; background: #16a34a; border-radius: 50%; }
.documentation-portal .doc-routes .route-side .route-cert-banner { flex-wrap: wrap; margin: 0; padding: 12px 14px; }
.documentation-portal .route-side-list { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.documentation-portal .route-side-list li { display: flex; align-items: center; gap: 10px; color: #334155; font-size: 13px; }
.documentation-portal .route-side-list li svg { flex-shrink: 0; color: #64748b; }
.documentation-portal .route-side-list li.is-muted { color: #94a3b8; }
.documentation-portal .route-side-manage .outline-button { width: 100%; justify-content: flex-start; }
.documentation-portal .route-side-manage .outline-button.is-danger:hover { color: #dc2626; background: #fef2f2; border-color: #fecaca; }

@media (max-width: 1100px) {
  .documentation-portal .team-body.has-detail { grid-template-columns: minmax(0, 1fr) 300px; }
  .documentation-portal .route-page { grid-template-columns: 1fr; }
  .documentation-portal .route-side { position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
}
@media (max-width: 900px) {
  .documentation-portal .team-body.has-detail { display: flex; flex-direction: column-reverse; }
  .documentation-portal .team-detail { position: static; max-height: none; }
  .documentation-portal .doc-strip-item { border-right: 0; }
}
@media (max-width: 720px) {
  .documentation-portal .route-step.route-row { grid-template-columns: 1fr; padding: 10px; }
  .documentation-portal .route-row-action { justify-self: start; }
  .documentation-portal .route-hero { padding: 18px; }
  .documentation-portal .doc-routes .route-hero .route-detail-title { font-size: 21px; }
}

/* Selector SysTime / Taller: cuántos documentos hay en cada origen */
.documentation-portal .doc-rail-scope-switch .doc-scope-count { margin-left: 4px; padding: 0 6px; font-size: 10.5px; font-weight: 700; line-height: 16px; background: rgba(255, 255, 255, 0.18); border-radius: 999px; }

/* Talleres: cada taller como encabezado y debajo sus tenants (sedes) con su propio nombre y departamento */
.documentation-portal .ws-table tbody .ws-group td { padding: 10px 12px 6px; background: #f8fafc; border-bottom: 1px solid #eef1f6; }
.documentation-portal .ws-table tbody .ws-group:hover td { background: #f8fafc; }
.documentation-portal .ws-group-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.documentation-portal .ws-group-name { color: #0f172a; font-size: 12.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.documentation-portal .ws-group-head small { display: inline-flex; align-items: center; gap: 4px; color: #64748b; font-size: 11.5px; }
.documentation-portal .ws-group-head .ws-docs-btn { margin-left: auto; }
.documentation-portal .ws-table tbody .ws-row.is-tenant td:first-child { padding-left: 34px; }
.documentation-portal .ws-tenant-icon { width: 30px; height: 30px; flex-shrink: 0; display: grid; place-items: center; color: #475569; background: #eef2f7; border-radius: 8px; }
.documentation-portal .ws-tenant-icon.is-lg { width: 44px; height: 44px; border-radius: 12px; }
.documentation-portal .ws-grid-group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 16px 0 8px; }
.documentation-portal .ws-grid-group:first-child { margin-top: 0; }
.documentation-portal .ws-grid-group strong { color: #0f172a; font-size: 13px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.documentation-portal .ws-grid-group small { color: #64748b; font-size: 12px; }
.documentation-portal .ws-grid-group .outline-button { margin-left: auto; }
.documentation-portal .ws-grid + .ws-grid { margin-top: 12px; }
/* Sin botón de actualizar: la vista avisa que se reintenta sola */
.documentation-portal .doc-auto-retry { display: inline-flex; align-items: center; gap: 6px; margin: 4px 0 0; color: #94a3b8; font-size: 12px; }

/* Lector al estilo de Platzi: el documento (video o archivo con su resumen) a la izquierda y los comentarios a la derecha */
.documentation-portal .doc-reader-layout { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.documentation-portal .doc-reader-layout.has-comments { flex-direction: row; }
.documentation-portal .doc-reader-layout .doc-reader-body { min-width: 0; }
.documentation-portal .doc-reader-comments { width: 400px; flex-shrink: 0; overflow-y: auto; padding: 20px 20px 28px; background: #f8fafc; border-left: 1px solid #e4e9f2; }
.documentation-portal .doc-reader-summary { margin-top: 18px; }
.documentation-portal .doc-reader-summary h3 { margin: 0 0 6px; color: #0f172a; font-size: 16px; font-weight: 800; }
.documentation-portal .doc-reader-summary .file-viewer-summary { margin: 0; }
@media (max-width: 1000px) {
  .documentation-portal .doc-reader-layout.has-comments { flex-direction: column; overflow-y: auto; }
  .documentation-portal .doc-reader-layout.has-comments .doc-reader-body { flex: none; overflow: visible; }
  .documentation-portal .doc-reader-comments { width: auto; overflow: visible; border-left: 0; border-top: 1px solid #e4e9f2; }
}

/* Comentarios de un documento (estilo Platzi) */
.documentation-portal .doc-reader-comments { background: #f6f8fb; }
.documentation-portal .doc-comments { display: flex; flex-direction: column; gap: 14px; }
.documentation-portal .doc-comments-head { display: flex; flex-direction: column; gap: 6px; }
.documentation-portal .doc-comments-title { display: flex; align-items: center; gap: 8px; }
.documentation-portal .doc-comments-title-icon { width: 30px; height: 30px; display: grid; place-items: center; color: #d81b84; background: #fce7f3; border-radius: 9px; }
.documentation-portal .doc-comments-title h3 { margin: 0; color: #0f172a; font-size: 17px; font-weight: 800; }
.documentation-portal .doc-comments-count { min-width: 24px; padding: 1px 8px; color: #475569; font-size: 12px; font-weight: 800; text-align: center; background: #e9eef5; border-radius: 999px; }
.documentation-portal .doc-comments-audience { display: flex; align-items: flex-start; gap: 6px; margin: 0; color: #64748b; font-size: 12px; line-height: 1.45; }
.documentation-portal .doc-comments-audience svg { flex-shrink: 0; margin-top: 2px; }

/* Campo de comentario al estilo Platzi: un solo campo redondeado que crece al escribir, con la flecha de enviar adentro */
.documentation-portal .doc-comments-input { position: relative; display: flex; align-items: flex-end; background: #fff; border: 1px solid #d6dde8; border-radius: 22px; transition: border-color .15s ease, box-shadow .15s ease; }
.documentation-portal .doc-comments-input:focus-within { border-color: #d81b84; box-shadow: 0 0 0 3px rgba(216, 27, 132, 0.12); }
.documentation-portal .doc-comments-input textarea { flex: 1; min-width: 0; max-height: 160px; padding: 11px 6px 11px 18px; color: #0f172a; font: inherit; font-size: 13.5px; line-height: 1.5; background: transparent; border: 0; outline: none; resize: none; overflow-y: auto; }
.documentation-portal .doc-comments-input textarea::placeholder { color: #94a3b8; }
.documentation-portal .doc-comments-input-send { width: 36px; height: 36px; flex-shrink: 0; display: grid; place-items: center; margin: 4px 5px 4px 0; padding: 0; color: #d81b84; background: transparent; border: 0; border-radius: 50%; cursor: pointer; transition: background-color .15s ease, color .15s ease; }
.documentation-portal .doc-comments-input-send:hover:not(:disabled) { color: #fff; background: #d81b84; }
.documentation-portal .doc-comments-input-send:disabled { color: #cbd5e1; cursor: default; }
.documentation-portal .doc-comments-input.is-posting { opacity: 0.85; }
.documentation-portal .doc-comments-input textarea:disabled { cursor: not-allowed; color: #94a3b8; }
.documentation-portal .doc-comments-hint { align-self: flex-end; margin-top: -6px; color: #94a3b8; font-size: 11px; }
.documentation-portal .doc-comments-error { margin: -6px 0 0; color: #b91c1c; font-size: 12.5px; }
.documentation-portal .doc-comments-posting-notice { display: inline-flex; align-items: center; gap: 7px; margin-top: -6px; padding: 3px 10px; color: #d81b84; font-size: 12px; font-weight: 600; background: #fdf2f8; border-radius: 6px; align-self: flex-start; }
.documentation-portal .doc-comments-posting-notice .btn-spinner { width: 12px; height: 12px; border: 2px solid rgba(216, 27, 132, 0.25); border-top-color: #d81b84; margin: 0; }
.documentation-portal .doc-spinner-magenta { border-color: rgba(216, 27, 132, 0.25) !important; border-top-color: #d81b84 !important; }

.documentation-portal .doc-comments-filters { display: inline-flex; align-self: flex-start; gap: 4px; padding: 3px; background: #e9eef5; border-radius: 999px; }
.documentation-portal .doc-comments-filters button { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; color: #475569; font: inherit; font-size: 12px; font-weight: 700; background: none; border: 0; border-radius: 999px; cursor: pointer; }
.documentation-portal .doc-comments-filters button.active { color: #0f172a; background: #fff; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08); }
.documentation-portal .doc-comments-filters small { padding: 0 6px; color: #64748b; font-size: 10.5px; background: #f1f5f9; border-radius: 999px; }
.documentation-portal .doc-comments-filters button.active small { color: #9d174d; background: #fce7f3; }

.documentation-portal .doc-comments-state { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px 16px; text-align: center; color: #64748b; font-size: 12.5px; line-height: 1.5; background: #fff; border: 1px dashed #d6dde8; border-radius: 14px; }
.documentation-portal .doc-comments-state strong { color: #0f172a; font-size: 14px; }
.documentation-portal .doc-comments-state-icon { width: 44px; height: 44px; display: grid; place-items: center; color: #d81b84; background: #fce7f3; border-radius: 50%; }
.documentation-portal .doc-comments-state-icon.is-done { color: #15803d; background: #dcfce7; }
.documentation-portal .doc-comments-state.is-error { flex-direction: row; justify-content: space-between; text-align: left; color: #b91c1c; border-style: solid; border-color: #fecaca; background: #fef2f2; }
.documentation-portal .doc-comments-skeleton { display: flex; flex-direction: column; gap: 12px; }
.documentation-portal .doc-comments-skeleton-row { display: flex; gap: 10px; padding: 14px; background: #fff; border-radius: 14px; }
.documentation-portal .doc-comments-skeleton-row > .skeleton-shimmer { width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%; }
.documentation-portal .doc-comments-skeleton-row > div { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.documentation-portal .doc-comments-skeleton-row > div .skeleton-shimmer { height: 10px; border-radius: 6px; }
.documentation-portal .doc-comments-skeleton-row > div .skeleton-shimmer:first-child { width: 40%; }

.documentation-portal .doc-comments-list,
.documentation-portal .doc-comment-replies { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; list-style: none; }
.documentation-portal .doc-comment-thread { display: flex; flex-direction: column; gap: 10px; padding: 14px; background: #fff; border: 1px solid #e4e9f2; border-radius: 14px; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04); }
.documentation-portal .doc-comment-thread.is-focused { border-color: #d81b84; box-shadow: 0 0 0 3px rgba(216, 27, 132, 0.12); }
.documentation-portal .doc-comment-replies { margin-left: 16px; padding-left: 16px; border-left: 2px solid #eef1f6; }
.documentation-portal .doc-comment { display: flex; gap: 10px; }
.documentation-portal .doc-comment-avatar { width: 34px; height: 34px; flex-shrink: 0; display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 800; border-radius: 50%; }
.documentation-portal .doc-comment.is-reply .doc-comment-avatar { width: 28px; height: 28px; font-size: 10.5px; }
.documentation-portal .doc-comment-avatar-img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.documentation-portal .doc-comment.is-reply .doc-comment-avatar-img { width: 28px; height: 28px; }
.documentation-portal .doc-comment-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.documentation-portal .doc-comment-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.documentation-portal .doc-comment-head strong { color: #0f172a; font-size: 13px; }
.documentation-portal .doc-comment-head time { margin-left: auto; color: #94a3b8; font-size: 11.5px; white-space: nowrap; }
.documentation-portal .doc-comment-role { padding: 1px 8px; color: #fff; font-size: 10.5px; font-weight: 800; background: #d81b84; border-radius: 999px; }
.documentation-portal .doc-comment-workshop { display: inline-flex; align-items: center; gap: 3px; color: #64748b; font-size: 11.5px; font-weight: 600; }
.documentation-portal .doc-comment-general { display: inline-flex; align-items: center; gap: 3px; padding: 1px 8px; color: #1d4ed8; font-size: 10.5px; font-weight: 700; background: #dbeafe; border-radius: 999px; }
.documentation-portal .doc-comment.is-staff .doc-comment-text { padding: 8px 10px; background: #fdf2f8; border-radius: 10px; }
.documentation-portal .doc-comment-text { margin: 2px 0 0; color: #334155; font-size: 13.5px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.documentation-portal .doc-comment-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 2px; }
.documentation-portal .doc-comment-action { display: inline-flex; align-items: center; gap: 4px; padding: 3px 6px; margin-left: -6px; color: #475569; font: inherit; font-size: 12px; font-weight: 700; background: none; border: 0; border-radius: 6px; cursor: pointer; }
.documentation-portal .doc-comment-action:hover { color: #d81b84; background: #fdf2f8; }
.documentation-portal .doc-comment-action.is-danger { margin-left: auto; color: #94a3b8; }
.documentation-portal .doc-comment-action.is-danger:hover { color: #b91c1c; background: #fef2f2; }
.documentation-portal .doc-comment-status { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; font-size: 11px; font-weight: 700; border-radius: 999px; }
.documentation-portal .doc-comment-status.is-answered { color: #15803d; background: #dcfce7; }
.documentation-portal .doc-comment-status.is-pending { color: #b45309; background: #fef3c7; }
.documentation-portal .doc-comment-toggle { display: inline-flex; align-self: flex-start; align-items: center; gap: 4px; margin-left: 44px; padding: 0; color: #d81b84; font: inherit; font-size: 12px; font-weight: 700; background: none; border: 0; cursor: pointer; }
.documentation-portal .doc-comment-reply-box { display: flex; flex-direction: column; gap: 8px; margin-left: 44px; margin-top: 4px; padding: 12px 14px; background: #f8fafc; border: 1px solid #d6dde8; border-radius: 12px; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04); transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease; }
.documentation-portal .doc-comment-reply-box:focus-within { background: #fff; border-color: #d81b84; box-shadow: 0 0 0 3px rgba(216, 27, 132, 0.12); }
.documentation-portal .doc-comment-reply-box.is-posting { opacity: 0.85; }
.documentation-portal .doc-comment-reply-target { display: inline-flex; align-items: center; gap: 6px; color: #64748b; font-size: 11.5px; font-weight: 500; }
.documentation-portal .doc-comment-reply-target strong { color: #0f172a; font-weight: 700; }
.documentation-portal .doc-comment-reply-textarea { width: 100%; min-height: 60px; max-height: 180px; padding: 2px 0 6px; color: #0f172a; font: inherit; font-size: 13.5px; line-height: 1.5; background: transparent; border: 0; outline: none; resize: vertical; box-sizing: border-box; overflow-y: auto; }
.documentation-portal .doc-comment-reply-textarea::placeholder { color: #94a3b8; }
.documentation-portal .doc-comment-reply-textarea:disabled { cursor: not-allowed; color: #94a3b8; }
.documentation-portal .doc-comment-reply-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 2px; padding-top: 8px; border-top: 1px solid #edf2f6; }
.documentation-portal .doc-comment-reply-footer .doc-comments-error { margin: 0; margin-right: auto; color: #b91c1c; font-size: 12px; }
.documentation-portal .doc-comment-reply-footer .doc-comments-hint { margin: 0; margin-right: auto; color: #94a3b8; font-size: 11px; }
.documentation-portal .doc-comment-reply-actions { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.documentation-portal .doc-comment-btn-cancel { display: inline-flex; align-items: center; justify-content: center; height: 30px; padding: 0 12px; color: #64748b; font: inherit; font-size: 12.5px; font-weight: 600; background: transparent; border: 1px solid transparent; border-radius: 8px; cursor: pointer; transition: all .15s ease; }
.documentation-portal .doc-comment-btn-cancel:hover:not(:disabled) { color: #0f172a; background: #e2e8f0; }
.documentation-portal .doc-comment-btn-cancel:disabled { opacity: 0.5; cursor: not-allowed; }
.documentation-portal .doc-comment-btn-submit { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 14px; font-size: 12.5px; font-weight: 700; border-radius: 8px; cursor: pointer; }
.documentation-portal .doc-comment-btn-submit .btn-spinner { margin-right: 2px; }
.documentation-portal .doc-comment-edited { color: #94a3b8; font-size: 11px; font-weight: 500; font-style: italic; }
.documentation-portal .doc-comment-edit-box { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.documentation-portal .doc-comment-edit-box textarea { width: 100%; padding: 8px 10px; color: #0f172a; font: inherit; font-size: 13px; line-height: 1.5; background: #fff; border: 1px solid #d6dde8; border-radius: 8px; outline: none; resize: vertical; box-sizing: border-box; }
.documentation-portal .doc-comment-edit-box textarea:focus { border-color: #d81b84; box-shadow: 0 0 0 3px rgba(216, 27, 132, 0.12); }
.documentation-portal .doc-comment-edit-actions { display: flex; align-items: center; gap: 8px; }
/* Preguntas sin responder (SysTime y el jefe de taller) */
.documentation-portal .doc-topbar-questions { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; color: var(--console-text, #fff); font-size: 12.5px; font-weight: 700; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 999px; cursor: pointer; }
.documentation-portal .doc-topbar-questions:hover { background: rgba(255, 255, 255, 0.14); }
.documentation-portal .doc-topbar-questions.has-pending { border-color: #f0b51a; }
.documentation-portal .doc-questions-modal { width: min(760px, 94vw); max-height: 86vh; display: flex; flex-direction: column; }
.documentation-portal .doc-modal-tabs { display: flex; align-items: center; gap: 8px; padding: 0 24px 14px; border-bottom: 1px solid #e2e8f0; }
.documentation-portal .doc-modal-tab { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; font-size: 12.5px; font-weight: 600; color: #64748b; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 999px; cursor: pointer; transition: all .15s ease; }
.documentation-portal .doc-modal-tab:hover { color: #0f172a; background: #f1f5f9; border-color: #cbd5e1; }
.documentation-portal .doc-modal-tab.is-active { color: #17263d; background: #ffffff; border-color: #17263d; font-weight: 700; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08); }
.documentation-portal .doc-modal-tab-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 18px; padding: 0 6px; font-size: 11px; font-weight: 700; border-radius: 999px; background: #e2e8f0; color: #475569; transition: all .15s ease; }
.documentation-portal .doc-modal-tab:hover .doc-modal-tab-badge { background: #cbd5e1; color: #1e293b; }
.documentation-portal .doc-modal-tab.is-active .doc-modal-tab-badge { background: #17263d; color: #ffffff; }
.documentation-portal .doc-modal-tab.has-items .doc-modal-tab-badge { background: #fef3c7; color: #92400e; }
.documentation-portal .doc-modal-tab.is-active.has-items .doc-modal-tab-badge { background: #d89d00; color: #ffffff; }
.documentation-portal .doc-questions-body { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 24px 24px; }
.documentation-portal .doc-comments-empty { margin: 8px 0; color: #64748b; font-size: 13px; line-height: 1.5; }
.documentation-portal .doc-questions-list { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.documentation-portal .doc-question-row { display: flex; align-items: center; gap: 14px; padding: 12px 14px; background: #fff; border: 1px solid #e4e9f2; border-radius: 12px; }
.documentation-portal .doc-question-row.is-answered { background: #fafbfc; border-color: #e5e9f0; }
.documentation-portal .doc-question-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.documentation-portal .doc-question-meta-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.documentation-portal .doc-question-doc { display: inline-flex; align-items: center; gap: 4px; color: #9d174d; font-size: 11.5px; font-weight: 700; }
.documentation-portal .doc-question-answered-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; font-size: 11px; font-weight: 600; color: #065f46; background: #ecfdf5; border: 1px solid #a7f3d0; border-radius: 999px; }
.documentation-portal .doc-question-text p { margin: 0; color: #0f172a; font-size: 13.5px; line-height: 1.45; overflow-wrap: anywhere; }
.documentation-portal .doc-question-text small { color: #64748b; font-size: 11.5px; }
.documentation-portal .doc-question-row > .primary-button,
.documentation-portal .doc-question-row > .outline-button,
.documentation-portal .doc-question-row > .secondary-button { flex-shrink: 0; display: inline-flex; align-items: center; gap: 4px; }

/* Eliminar comentario: el aviso se ve por encima del lector */
.documentation-portal .doc-comment-confirm-backdrop { z-index: 1300; }

/* «i» de la barra, como la de Reportes: círculo de cristal que abre la ayuda por pasos; desde su primer paso se ve el
   recorrido guiado. Mismo alto que los botones vecinos de la barra (34 px). */
.documentation-portal .doc-topbar-info .info-carousel-btn {
  width: 34px; height: 34px;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(30, 41, 59, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.documentation-portal .doc-topbar-info .info-carousel-btn svg { width: 18px; height: 18px; }
.documentation-portal .doc-topbar-info .info-carousel-btn:hover,
.documentation-portal .doc-topbar-info .info-carousel-btn.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.16);
  transform: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
.documentation-portal .doc-topbar-info .info-carousel-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.documentation-portal .doc-topbar-info .info-carousel-card { width: 380px; text-align: left; }
.documentation-portal .doc-help-text { margin: 6px 0 0; font-size: 13px; line-height: 1.5; }
.documentation-portal .doc-help-list { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 0; padding-left: 18px; font-size: 13px; line-height: 1.45; }
.documentation-portal .doc-help-tour-btn {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 12px; padding: 7px 12px;
  color: #9d174d; font: inherit; font-size: 12.5px; font-weight: 700;
  background: #fdf2f8; border: 1px solid #f3a8d0; border-radius: 999px;
  cursor: pointer;
}
.documentation-portal .doc-help-tour-btn:hover { color: #fff; background: #d81b84; border-color: #d81b84; }
.documentation-portal .doc-help-tour-btn:focus-visible { outline: 2px solid #d81b84; outline-offset: 2px; }
/* ── Conoce Systime: menú por plataforma y área, presentación y tarjetas de funciones (diseño del prototipo) ── */
.kn-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.kn-search { flex: 1; display: flex; align-items: center; gap: 10px; padding: 13px 22px; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 4px 14px rgba(23, 38, 61, .07); }
.kn-search:focus-within { border-color: var(--gold, #d89d00); }
.kn-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--navy); font: inherit; font-size: 15px; }
.kn-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 22px; align-items: start; }
.kn-nav { position: sticky; top: 8px; display: flex; flex-direction: column; gap: 4px; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 18px; }
.kn-item { display: flex; align-items: center; gap: 9px; padding: 7px 9px; color: var(--navy); font-size: 13px; font-weight: 600; text-align: left; background: transparent; border: 1px solid transparent; border-radius: 12px; cursor: pointer; transition: background .15s ease; }
.kn-item:hover { background: #f1f5f9; }
.kn-i { width: 26px; height: 26px; display: grid; place-items: center; flex-shrink: 0; color: var(--h, #64748b); background: #f1f5f9; border-radius: 8px; }
.kn-t { flex: 1; min-width: 0; }
.kn-c { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.kn-sep { margin: 8px 9px 2px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.kn-item.on { color: var(--app-selected-text, #17243a); background: var(--app-selected-soft, #fff3c4); border-color: var(--app-selected, #d89d00); }
.kn-item.on .kn-i { color: #17243a; background: var(--app-selected, #d89d00); }
.kn-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.kn-solo { max-width: 900px; }
.kn-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 64px 20px; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 18px; }
.kn-loading strong { color: var(--navy); font-size: 16px; }
.kn-loading span { color: var(--muted); font-size: 13.5px; }
.documentation-portal .primary-button.kn-go { color: #fff; background: var(--pink, #ec0bb1); border-color: var(--pink, #ec0bb1); box-shadow: 0 1px 2px rgba(236, 11, 177, .25); }
.documentation-portal .primary-button.kn-go:hover:not(:disabled) { background: #d4099e; border-color: #d4099e; box-shadow: 0 4px 10px rgba(236, 11, 177, .3); }
.kn-sh { display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px; }
.kn-sh h3 { margin: 0; color: var(--navy); font-size: 19px; letter-spacing: -.01em; }
.kn-sh span { color: var(--muted); font-size: 13.5px; }

/* Presentación: qué es Systime y qué hace */
.kn-hero { display: flex; flex-direction: column; gap: 14px; padding: 30px 30px 26px; background: radial-gradient(circle at 0 0, rgba(229, 0, 205, .08), transparent 55%), radial-gradient(circle at 100% 100%, rgba(46, 168, 255, .08), transparent 50%), #fff; border: 1px solid var(--line); border-radius: 22px; }
.kn-hero h2 { margin: 0; color: var(--navy); font: 800 clamp(1.9rem, 3.4vw, 2.5rem)/1.1 "Inter", system-ui, -apple-system, sans-serif; letter-spacing: -.03em; }
.kn-hero h2 span { color: #c400b0; }
.kn-lead { max-width: 72ch; margin: 0 0 6px; color: #475569; font-size: 15.5px; line-height: 1.6; }
.kn-sub { margin-bottom: -6px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.kn-journey { list-style: none; margin: 0; padding: 4px 0 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kn-journey li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0 8px; text-align: center; }
.kn-journey li:not(:first-child)::before { content: ""; position: absolute; top: 15px; right: 50%; width: 100%; height: 2px; background: var(--line); }
.kn-n { position: relative; z-index: 1; width: 32px; height: 32px; margin-bottom: 6px; display: grid; place-items: center; color: #c400b0; font-size: 13.5px; font-weight: 800; background: #fff; border: 2px solid rgba(196, 0, 176, .45); border-radius: 50%; }
.kn-journey strong { color: var(--navy); font-size: 14.5px; }
.kn-journey small { color: var(--muted); font-size: 12px; }

/* Tareas comunes */
.kn-quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.kn-q { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; background: #fff; border: 1px solid var(--line); border-radius: 18px; transition: border-color .2s; }
.kn-q:hover { border-color: var(--h); }
.kn-q strong { color: var(--navy); font-size: 16px; }
.kn-q p { flex: 1; margin: 0; color: #475569; font-size: 13.5px; line-height: 1.5; }
.kn-q-foot { display: flex; justify-content: flex-end; }
.kn-hint { display: flex; align-items: center; gap: 14px; padding: 14px 18px; background: #f6f8fb; border: 1px dashed var(--line); border-radius: 16px; }
.kn-hint-icon { width: 40px; height: 40px; display: grid; place-items: center; flex-shrink: 0; color: var(--pink, #ec0bb1); background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.kn-hint div { display: flex; flex-direction: column; gap: 2px; }
.kn-hint strong { color: var(--navy); font-size: 14.5px; }
.kn-hint div span { color: var(--muted); font-size: 13.5px; line-height: 1.45; }

/* Cabecera del área */
.kn-ahead { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; padding: 2px 2px 6px; }
.kn-ahead-text { display: flex; flex-direction: column; min-width: 0; }
.kn-ahead-text h1 { margin: 2px 0 3px; font-size: 19px; letter-spacing: -.2px; }
.kn-ahead-text .kicker { font-size: 9px; }
.kn-ahead-text .section-desc { font-size: 12.5px; }
.kn-head h1 { font-size: 19px; letter-spacing: -.2px; }
.kn-ahead-text .section-desc { margin: 0; }
.kn-head { margin-bottom: 2px; }
.kn-tile { width: 42px; height: 42px; display: grid; place-items: center; flex-shrink: 0; color: #fff; background: linear-gradient(135deg, var(--h), color-mix(in srgb, var(--h) 55%, #1a0f3a)); border-radius: 15px; box-shadow: 0 8px 18px color-mix(in srgb, var(--h) 35%, transparent); }
.kn-tag { margin-left: auto; padding: 4px 12px; color: var(--muted); font-size: 12px; font-weight: 700; background: #f1f5f9; border: 1px solid var(--line); border-radius: 999px; }

/* Conoce Systime: dos maneras de ver las funciones (por área o por flujo del taller) */
.kn-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 3px; background: #f1f5f9; border: 1px solid var(--line); border-radius: 12px; }
.kn-seg button { padding: 7px 6px; color: var(--muted); font-size: 12.5px; font-weight: 700; background: transparent; border: 0; border-radius: 9px; cursor: pointer; transition: background .15s ease, color .15s ease; }
.kn-seg button[aria-pressed="true"] { color: #fff; background: var(--pink, #ec0bb1); }
.kn-num { font-size: 12px; font-weight: 800; }
.kn-tile.kn-num { font-size: 18px; }
.kn-ribbon { display: flex; align-items: center; gap: 6px; padding: 2px 2px 8px; overflow-x: auto; scrollbar-width: thin; }
.kn-rb { flex-shrink: 0; padding: 6px 12px; color: var(--navy); font-size: 12px; font-weight: 700; white-space: nowrap; background: #f6f8fb; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; transition: background .15s ease, color .15s ease; }
.kn-rb:hover { background: #eef2f7; }
.kn-rb.on { color: #fff; background: var(--pink, #ec0bb1); border-color: var(--pink, #ec0bb1); }
.kn-flow-note, .kn-step-note { margin: 0; padding: 10px 14px; color: var(--navy); font-size: 13px; line-height: 1.5; border-radius: 12px; }
.kn-flow-note { background: #fde7f7; }
.kn-step-note { background: #f6f8fb; border: 1px solid var(--line); }
.kn-also { color: var(--muted); font-size: 12px; }

/* Tarjetas de función */
.kn-list { display: flex; flex-direction: column; gap: 12px; }
.kn-card { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px; background: linear-gradient(180deg, color-mix(in srgb, var(--h) 5%, #fff), #fff 60%); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 1px 2px rgba(23, 38, 61, .06), 0 8px 20px -14px rgba(23, 38, 61, .35); transition: transform .2s, border-color .2s, box-shadow .2s; }
.kn-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--h) 50%, var(--line)); box-shadow: 0 1px 2px rgba(23, 38, 61, .08), 0 14px 28px -14px rgba(23, 38, 61, .35); }
.kn-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.kn-card-name { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.kn-card-name strong { color: var(--navy); font-size: 16px; letter-spacing: -.01em; }
.kn-badges { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.kn-badge { padding: 2px 9px; color: #475569; font-size: 11px; font-weight: 700; letter-spacing: .04em; background: #eef2f7; border-radius: 999px; }
.kn-desc { max-width: 70ch; margin: 0; color: #475569; font-size: 14.5px; line-height: 1.55; }
.kn-where { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; padding: 6px 12px; background: #f6f8fb; border: 1px dashed color-mix(in srgb, var(--h) 45%, var(--line)); border-radius: 14px; }
.kn-lab { margin-right: 2px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.kn-way { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 13px; }
.kn-way em { padding: 1px 8px; color: var(--muted); font-size: 11px; font-style: normal; font-weight: 700; background: #fff; border: 1px solid var(--line); border-radius: 999px; }
.kn-step { padding: 3px 10px; color: var(--navy); font-weight: 600; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.kn-step.last { font-weight: 800; background: color-mix(in srgb, var(--h) 14%, #fff); border-color: color-mix(in srgb, var(--h) 50%, var(--line)); }
.kn-arrow { color: var(--muted); line-height: 1; }
.kn-links { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.kn-link { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; color: var(--navy); font-size: 13px; font-weight: 600; background: #fff; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; transition: background .15s, border-color .15s; }
.kn-link:hover { background: color-mix(in srgb, var(--h) 12%, #fff); border-color: color-mix(in srgb, var(--h) 55%, var(--line)); }
.kn-link:focus-visible { outline: 2px solid var(--h); outline-offset: 2px; }
.kn-tour { color: var(--muted); font-size: 12.5px; }

/* En pantalla ancha el menú de áreas y las tarjetas se desplazan cada uno por su lado: la ventana no hace scroll. */
@media (min-width: 861px) {
  .doc-scroll:has(> .kn-page) { overflow-y: hidden; }
  .kn-page { height: 100%; box-sizing: border-box; display: flex; flex-direction: column; }
  .kn-page > .kn-bar { flex: none; }
  .kn-page > .kn-layout { flex: 1; min-height: 0; grid-template-rows: minmax(0, 1fr); align-items: stretch; }
  .kn-page > .kn-main { flex: 1; min-height: 0; overflow-y: auto; }
  .kn-nav { position: static; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
  .kn-layout > .kn-main { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 2px 6px 24px 2px; scrollbar-width: thin; }
}

@media (max-width: 860px) {
  .kn-layout { grid-template-columns: minmax(0, 1fr); }
  .kn-nav { position: static; flex-direction: row; overflow-x: auto; padding: 8px; scrollbar-width: none; }
  .kn-item { flex-shrink: 0; white-space: nowrap; }
  .kn-sep, .kn-c { display: none; }
  .kn-journey { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .kn-journey li { flex-direction: row; text-align: left; gap: 10px; }
  .kn-journey li::before { display: none; }
  .kn-n { margin: 0; }
}
