/* Prototipo en gris: valida recorridos, no colores. Los tokens se cambian por la marca real sin tocar el resto. */
:root {
  --bg: #f4f4f4; --surface: #ffffff; --surface-2: #ececec; --text: #1c1c1c; --muted: #666;
  --border: #d0d0d0; --accent: #333; --accent-fg: #fff; --focus: #000;
  --ok: #444; --warn: #555; --bad: #222;
  --radius: 6px; --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --test-bg: #fffbe6; --test-border: #b59f3b;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: var(--font); background: #dcdcdc; color: var(--text); font-size: 15px; line-height: 1.45; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ---------- Barra de pruebas ---------- */
#testbar { position: sticky; top: 0; z-index: 50; background: var(--test-bg); border-bottom: 2px dashed var(--test-border);
  padding: 6px 12px; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font: 12px/1.3 ui-monospace, Consolas, monospace; }
#testbar strong { font-size: 12px; }
#testbar label { display: inline-flex; gap: 4px; align-items: center; }
#testbar select, #testbar button { font: 12px ui-monospace, Consolas, monospace; padding: 2px 4px; }
#testbar .sep { opacity: .4; }

/* ---------- Marco (móvil / escritorio) ---------- */
#marco { margin: 0 auto; background: var(--bg); min-height: calc(100vh - 40px); }
#marco.movil { width: 375px; max-width: 100%; margin: 12px auto; min-height: 740px; height: 740px; border: 8px solid #222; border-radius: 28px;
  overflow: hidden; position: relative; display: flex; flex-direction: column; }
#marco.movil > .app { flex: 1; overflow: hidden; display: flex; flex-direction: column; }
@media (max-width: 500px) { #marco.movil { width: 100%; height: calc(100vh - 60px); border: 0; border-radius: 0; margin: 0; } }

.app { display: flex; flex-direction: column; min-height: inherit; }

/* ---------- Encabezado del alumno ---------- */
.hdr { display: flex; align-items: center; gap: 16px; padding: 10px 20px; background: var(--surface); border-bottom: 1px solid var(--border); }
.logo { font-weight: 700; letter-spacing: .2px; display: flex; align-items: center; gap: 8px; text-decoration: none; }
.logo i { width: 26px; height: 26px; border-radius: 6px; background: var(--accent); display: inline-block; }
.hdr nav { display: flex; gap: 4px; flex: 1; }
.hdr nav a { padding: 6px 10px; border-radius: var(--radius); text-decoration: none; color: var(--muted); }
.hdr nav a.on { color: var(--text); background: var(--surface-2); font-weight: 600; }
.chip { font-size: 12px; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); white-space: nowrap; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); display: grid; place-items: center;
  font-size: 12px; font-weight: 700; cursor: pointer; }
.menu-usuario { position: absolute; right: 12px; top: 52px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 6px 20px rgba(0,0,0,.15); min-width: 230px; z-index: 30; padding: 6px; }
.menu-usuario a, .menu-usuario button { display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0; background: none; text-decoration: none; border-radius: 4px; cursor: pointer; }
.menu-usuario a:hover, .menu-usuario button:hover { background: var(--surface-2); }
.menu-usuario .tit { font-size: 12px; color: var(--muted); padding: 6px 10px 2px; }
.rel { position: relative; }

/* ---------- Layout interno (sidebar) ---------- */
.int { display: flex; flex: 1; min-height: 0; }
.side { width: 230px; background: var(--surface); border-right: 1px solid var(--border); padding: 12px 8px; flex-shrink: 0; }
.side a.logo { display: flex; padding: 4px 10px 14px; color: var(--text); }
.side a { display: block; padding: 8px 10px; border-radius: var(--radius); text-decoration: none; color: var(--muted); }
.side a.on { background: var(--surface-2); color: var(--text); font-weight: 600; }
.side .grupo { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); padding: 12px 10px 4px; }
.int-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 10px 20px; background: var(--surface); border-bottom: 1px solid var(--border); }
.topbar .sp { flex: 1; }
.hamb { display: none; background: none; border: 1px solid var(--border); border-radius: var(--radius); padding: 4px 8px; cursor: pointer; }

main { flex: 1; padding: 20px; overflow: auto; max-width: 1180px; width: 100%; margin: 0 auto; }

/* ---------- Barra inferior (alumno móvil) ---------- */
.bottom { display: none; }

/* ---------- Ajustes móviles (por clase del marco) ---------- */
.movil .hdr nav, .movil .hdr .chip-xp { display: none; }
.movil .hdr { padding: 10px 14px; }
.movil main { padding: 14px; }
.movil .bottom { display: flex; border-top: 1px solid var(--border); background: var(--surface); }
.movil .bottom a, .movil .bottom button { flex: 1; text-align: center; padding: 8px 2px 10px; font-size: 11px; text-decoration: none; color: var(--muted); background: none; border: 0; cursor: pointer; padding-bottom: 16px; }
.movil .bottom a.on { color: var(--text); font-weight: 700; }
.movil .bottom .ico { display: block; font-size: 18px; line-height: 1.2; }
.movil .side { display: none; position: absolute; inset: 0 auto 0 0; z-index: 40; box-shadow: 4px 0 20px rgba(0,0,0,.2); }
.movil .side.abierta { display: block; }
.movil .hamb { display: inline-block; }
.movil .grid-2, .movil .grid-3, .movil .grid-4, .movil .split { grid-template-columns: minmax(0, 1fr) !important; }
.grid-2 > *, .grid-3 > *, .grid-4 > *, .split > * { min-width: 0; margin-top: 0 !important; }
.app, main, .int-main { min-width: 0; }
#marco.movil main { overflow-x: hidden; }
.movil .tabla-wrap { overflow-x: auto; }
.movil .ocultar-movil { display: none !important; }
.movil h1 { font-size: 20px; }
.solo-movil { display: none; }
.movil .solo-movil { display: block; }

/* ---------- Componentes ---------- */
h1 { font-size: 24px; margin: 0 0 4px; }
h2 { font-size: 17px; margin: 0 0 10px; }
h3 { font-size: 15px; margin: 0 0 6px; }
.sub { color: var(--muted); margin: 0 0 18px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.card + .card { margin-top: 14px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.split { display: grid; grid-template-columns: 280px 1fr; gap: 16px; }
.fila { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.fila .sp { flex: 1; }
.mt { margin-top: 14px; } .mb { margin-bottom: 14px; }
.muted { color: var(--muted); } .small { font-size: 13px; }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--surface); cursor: pointer; text-decoration: none; font-weight: 500; }
.btn:hover { background: var(--surface-2); }
.btn.pri { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.btn.pri:hover { opacity: .9; }
.btn.peligro { border-color: var(--bad); font-weight: 700; }
.btn.link { border: 0; background: none; padding: 4px 0; text-decoration: underline; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn.sm { padding: 4px 10px; font-size: 13px; }
.barra { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; border: 1px solid var(--border); }
.barra > i { display: block; height: 100%; background: var(--accent); }
.estado { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; }
.estado.fuerte { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.estado.borde { background: transparent; border-style: dashed; }
.kpi .v { font-size: 28px; font-weight: 700; }
.kpi .l { color: var(--muted); font-size: 13px; }
.aviso { border: 1px solid var(--border); border-left: 4px solid var(--accent); background: var(--surface); padding: 10px 14px; border-radius: var(--radius); margin-bottom: 14px; }
.aviso.fuerte { background: var(--surface-2); }
.lista { list-style: none; margin: 0; padding: 0; }
.lista > li { padding: 12px 0; border-bottom: 1px solid var(--border); display: flex; gap: 12px; align-items: center; }
.lista > li:last-child { border-bottom: 0; }
.lista .bloq { color: var(--muted); }
.ico-l { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border); display: grid; place-items: center; font-size: 13px; flex-shrink: 0; background: var(--surface-2); }

table { width: 100%; border-collapse: collapse; background: var(--surface); }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border); font-size: 14px; vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); background: var(--surface-2); cursor: default; }
th[data-orden] { cursor: pointer; user-select: none; }
th[data-orden]::after { content: " ↕"; opacity: .4; }
.tabla-wrap { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.tabla-wrap tr:last-child td { border-bottom: 0; }

input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], select, textarea {
  border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 10px; background: var(--surface); width: 100%; }
textarea { min-height: 90px; resize: vertical; }
.campo { margin-bottom: 12px; }
.campo label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.campo .ayuda { font-size: 12px; color: var(--muted); margin-top: 3px; }
.buscar { max-width: 280px; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 8px 14px; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.on { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips button { border: 1px solid var(--border); background: var(--surface); padding: 4px 12px; border-radius: 99px; cursor: pointer; font-size: 13px; }
.chips button.on { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }

/* HU discretas */
.hu { font: 10px ui-monospace, Consolas, monospace; color: #8a7a2b; border: 1px dashed #c9b866; padding: 0 4px; border-radius: 3px; margin-left: 6px; vertical-align: middle; white-space: nowrap; }
.sin-hu .hu { display: none; }

/* Esqueletos */
.esq { background: linear-gradient(90deg, #e6e6e6 25%, #f0f0f0 50%, #e6e6e6 75%); background-size: 200% 100%; animation: brillo 1.2s infinite; border-radius: 4px; }
@keyframes brillo { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* Estados vacío / error */
.vacio, .error { text-align: center; padding: 48px 20px; }
.vacio .ico-g, .error .ico-g { font-size: 34px; opacity: .5; }

/* Diálogo y toast */
.velo { position: fixed; inset: 0; background: rgba(0,0,0,.4); display: grid; place-items: center; z-index: 60; padding: 16px; }
.dialogo { background: var(--surface); border-radius: 8px; max-width: 540px; width: 100%; max-height: 90vh; overflow: auto; box-shadow: 0 10px 40px rgba(0,0,0,.3); }
.dialogo header { padding: 16px 18px 0; display: flex; align-items: start; gap: 10px; }
.dialogo header h2 { flex: 1; margin: 0; }
.dialogo .cuerpo { padding: 14px 18px; }
.dialogo footer { padding: 12px 18px 16px; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.x { background: none; border: 0; font-size: 20px; cursor: pointer; line-height: 1; }
#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #222; color: #fff; padding: 10px 16px; border-radius: 6px;
  z-index: 70; font-size: 14px; display: none; max-width: 90vw; }

/* Pantallas sueltas (login, verificación) */
.centro { flex: 1; display: grid; place-items: start center; padding: 40px 16px; }
.centro .card { width: 100%; max-width: 420px; }
.pub-hdr { padding: 12px 20px; background: var(--surface); border-bottom: 1px solid var(--border); display: flex; align-items: center; }

/* Lección y examen */
.video { aspect-ratio: 16 / 9; background: #2b2b2b; border-radius: var(--radius); display: grid; place-items: center; color: #ddd; position: relative; }
.video .play { width: 64px; height: 64px; border-radius: 50%; border: 2px solid #ddd; background: none; color: #ddd; font-size: 24px; cursor: pointer; }
.video .pie { position: absolute; left: 10px; right: 10px; bottom: 8px; font-size: 12px; }
.video .pista { height: 4px; background: #555; border-radius: 2px; margin-top: 4px; overflow: hidden; }
.video .pista i { display: block; height: 100%; background: #ddd; }
.temario a, .temario span { display: flex; gap: 8px; align-items: center; padding: 8px; border-radius: 4px; text-decoration: none; font-size: 14px; }
.temario a.on { background: var(--surface-2); font-weight: 600; }
.temario span { color: var(--muted); }
.pdf { border: 1px solid var(--border); background: var(--surface-2); height: 300px; display: grid; place-items: center; border-radius: var(--radius); color: var(--muted); }
.opcion { display: flex; gap: 10px; align-items: center; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 8px; cursor: pointer; background: var(--surface); }
.opcion.sel { border: 2px solid var(--accent); padding: 11px; font-weight: 600; }
.reloj { font: 600 18px ui-monospace, Consolas, monospace; }
.puntos { display: flex; gap: 4px; flex-wrap: wrap; }
.puntos button { width: 28px; height: 28px; border-radius: 4px; border: 1px solid var(--border); background: var(--surface); font-size: 12px; cursor: pointer; }
.puntos button.resp { background: var(--surface-2); font-weight: 700; }
.puntos button.on { outline: 2px solid var(--accent); }
.examen-modo { user-select: none; }
.cert { border: 2px solid var(--accent); border-radius: 8px; padding: 18px; background: var(--surface); display: flex; gap: 16px; align-items: center; }
.qr { width: 72px; height: 72px; flex-shrink: 0; background:
  repeating-linear-gradient(90deg, #222 0 6px, transparent 6px 12px), repeating-linear-gradient(0deg, #222 0 6px, #fff 6px 12px); opacity: .8; border: 4px solid #fff; outline: 1px solid #222; }
.insignia { text-align: center; padding: 14px; }
.insignia .med { width: 56px; height: 56px; margin: 0 auto 8px; border-radius: 50%; border: 2px solid var(--accent); display: grid; place-items: center; font-size: 22px; }
.insignia.no { opacity: .4; }
.insignia.no .med { border-style: dashed; }
.arbol details { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); margin-bottom: 10px; }
.arbol summary { padding: 12px 14px; cursor: pointer; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.arbol .hijos { padding: 0 14px 12px 34px; }
.senal { padding: 6px 10px; border-left: 3px solid var(--accent); background: var(--surface-2); margin: 4px 0; font-size: 13px; border-radius: 0 4px 4px 0; }
.codigo { font: 600 15px ui-monospace, Consolas, monospace; letter-spacing: 1px; }
.cod-rec { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; font: 14px ui-monospace, Consolas, monospace; background: var(--surface-2); padding: 12px; border-radius: var(--radius); }
.paso { display: flex; gap: 6px; margin-bottom: 14px; }
.paso i { flex: 1; height: 4px; background: var(--surface-2); border-radius: 2px; }
.paso i.on { background: var(--accent); }

/* ---------- Ronda 1 → 2 ---------- */
.badge { display: inline-block; min-width: 18px; padding: 0 6px; margin-left: 4px; border-radius: 99px; background: var(--accent); color: var(--accent-fg); font-size: 11px; font-weight: 700; text-align: center; line-height: 18px; }
/* Selector de vista del responsable (siempre visible) y tono distinto en la vista de responsable */
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 99px; overflow: hidden; flex-shrink: 0; }
.seg a { padding: 4px 12px; font-size: 13px; text-decoration: none; color: var(--muted); background: var(--surface); }
.seg a.on { background: var(--accent); color: var(--accent-fg); font-weight: 600; }
.hdr.tono-res { background: #3a3a3a; border-bottom-color: #222; color: #f2f2f2; }
.hdr.tono-res nav a { color: #cfcfcf; }
.hdr.tono-res nav a.on { background: #555; color: #fff; }
.hdr.tono-res .logo i { background: #f2f2f2; }
.hdr.tono-res .seg { border-color: #777; }
.hdr.tono-res .seg a { background: #3a3a3a; color: #cfcfcf; }
.hdr.tono-res .seg a.on { background: #f2f2f2; color: #222; }
.franja-res { background: #4a4a4a; color: #f2f2f2; font-size: 13px; padding: 6px 20px; }
/* Inicio del alumno */
.urgente { border-left: 4px solid var(--accent); }
.dias { width: 52px; text-align: center; border: 1px solid var(--border); border-radius: var(--radius); padding: 4px 0; background: var(--surface-2); flex-shrink: 0; }
.dias b { display: block; font-size: 20px; line-height: 1.1; }
.dias span { font-size: 11px; color: var(--muted); }
.siguiente { border: 1px dashed var(--border); border-radius: var(--radius); padding: 6px 10px; }
/* Lección */
.video.falla { background: #3a3a3a; text-align: center; padding: 16px; }
.video.falla .ico-g { color: #ddd; }
.lectura { max-height: 170px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius); padding: 4px 12px; background: var(--surface); }
.opcion-grande { width: 100%; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; font: inherit; }
.opcion-grande:hover { border-color: var(--accent); }
/* Tableros */
.split-ancho { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.movil .split-ancho { grid-template-columns: minmax(0, 1fr); }
.fila-click { cursor: pointer; }
.fila-click.abierta td { background: var(--surface-2); }
tr.detalle td { background: var(--surface-2); padding-top: 0; }
.correo { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; background: var(--surface-2); font-size: 13px; }
/* Formularios */
.sangria { padding-left: 24px; }
.editor { border: 1px solid var(--border); border-radius: var(--radius); }
.editor .barra-ed { font-size: 12px; color: var(--muted); padding: 4px 8px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.editor textarea { border: 0; width: 100%; }
.chips button[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- Ronda 2 → 3 ---------- */
/* Menú lateral: títulos de sección marcados y opciones con sangría (H43) */
.side .grupo { font-weight: 700; color: var(--text); border-top: 1px solid var(--border); margin-top: 8px; padding-top: 12px; }
.side .grupo:first-of-type { border-top: 0; }
.side a:not(.logo) { padding-left: 22px; }
.codigo-c { font: 12px ui-monospace, Consolas, monospace; color: var(--muted); white-space: nowrap; }
.mas-urgente { background: var(--surface-2); border-radius: var(--radius); padding-left: 8px !important; padding-right: 8px !important; }
.mas-urgente .dias { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.mas-urgente .dias span { color: var(--accent-fg); }
.etiqueta-seg { color: var(--muted); }
.hdr.tono-res .etiqueta-seg { color: #cfcfcf; }
.asistencia { white-space: nowrap; }
.hdr.tono-res .asistencia { background: #3a3a3a; color: #f2f2f2; border-color: #777; }
/* Buscador con autocompletado */
.buscador { position: relative; min-width: 240px; flex: 0 1 340px; }
.buscador input { width: 100%; }
.buscador .sugerencias { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 6px 18px rgba(0,0,0,.12); }
.buscador .sugerencias:empty { display: none; }
.buscador .sugerencias a { display: block; padding: 8px 10px; text-decoration: none; border-bottom: 1px solid var(--border); }
.buscador .sugerencias a:hover { background: var(--surface-2); }
.movil .buscador { flex-basis: 100%; min-width: 0; }
/* Video: subtítulos y controles */
.subtitulo { position: absolute; left: 8%; right: 8%; bottom: 44px; text-align: center; background: rgba(0,0,0,.75); color: #fff; padding: 4px 8px; border-radius: 4px; font-size: 14px; }
.controles { margin-top: 8px; flex-wrap: wrap; gap: 8px; }
.controles select { width: auto; }
/* Examen: resumen tipo Pearson VUE */
.rejilla-rev { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin: 12px 0; }
.rejilla-rev .celda { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px; border: 1px dashed var(--border); border-radius: var(--radius); background: var(--surface); cursor: pointer; font: inherit; font-size: 13px; text-align: left; }
.rejilla-rev .celda.resp { border-style: solid; background: var(--surface-2); }
.rejilla-rev .celda.marcada { border: 2px solid var(--accent); }
/* Calificación */
.estrellas { display: flex; gap: 4px; margin: 6px 0; }
.estrellas button { font-size: 24px; background: none; border: 0; cursor: pointer; color: var(--border); padding: 0 2px; }
.estrellas button.on { color: var(--accent); }
/* Banco: lo que falta */
.checklist { list-style: none; padding: 0; margin: 0 0 8px; font-size: 13px; }
.checklist li { padding: 4px 0; }
.checklist li.no { font-weight: 600; }

/* ---------- Ronda 3 → 4 ---------- */
/* Menú único (PA-004): lateral en escritorio; en móvil, «☰ Menú» arriba a la izquierda. */
.hamb { font-weight: 600; white-space: nowrap; }
.topbar.tono-res { background: #3a3a3a; border-bottom-color: #222; color: #f2f2f2; }
.topbar.tono-res .muted { color: #cfcfcf; }
.movil .side { width: 82%; max-width: 300px; overflow-y: auto; }
.movil .topbar { padding: 8px 12px; gap: 8px; }
/* Tablas como tarjetas en móvil (H54) */
.movil .tabla-wrap { overflow-x: visible; border: 0; }
.movil .tabla-wrap table, .movil .tabla-wrap tbody, .movil .tabla-wrap tr, .movil .tabla-wrap td { display: block; width: 100%; }
.movil .tabla-wrap thead { display: none; }
.movil .tabla-wrap tr { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; padding: 6px 10px; background: var(--surface); }
.movil .tabla-wrap td { border: 0 !important; padding: 3px 0; text-align: left !important; white-space: normal !important; }
.movil .tabla-wrap td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: 12px; }
/* Resumen compacto en móvil (H52): 2 columnas, todo visible, sin desplazamiento lateral */
.movil .grid-4:has(> .kpi), .movil .grid-3:has(> .kpi) { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 8px; }
.movil .grid-4 > .card.kpi, .movil .grid-3 > .card.kpi { padding: 8px 10px; margin: 0; min-width: 0; }
.movil .kpi .l { font-size: 12px; }
/* Pestañas: en escritorio siempre; en móvil, con más de 3, selector desplegable */
.tabs-sel { display: none; }
.movil .tabs-sel { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.movil .tabs-sel select { flex: 1; }
.movil .tabs.muchas { display: none; }
.movil .tabs { flex-wrap: wrap; overflow-x: visible; }
.movil .kpi .v { font-size: 18px; }
.topbar.tono-res .btn, .topbar.tono-res .avatar { background: #555; color: #fff; border-color: #888; }
