.consola {
  height: 24rem;
  overflow: auto;
  font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre-wrap;
  word-break: break-word;
  color: #d5fef5;
}
@media (max-width: 767px) {
  .consola { height: 16rem; }
}
.tabulator {
  border: none !important;
  background: transparent !important;
  font-size: 13px;
}
.tabulator .tabulator-header .tabulator-col {
  background: var(--fallback-b2, #1d232a) !important;
  border-right: none !important;
}
.tabulator-row .tabulator-cell { border-right: none !important; }
.tabulator-tr:nth-child(even) { background: rgba(128, 128, 128, 0.06); }
.tabulator .tabulator-loader { background: transparent !important; }
.tabulator-print-table { display: none; }

/* ---- Resumen de jornada (estilo cartulina) ---- */
.resumen-envoltorio {
  max-width: 980px;
  background: #0d1b2a;
  border: 3px solid #f5c518;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
  color: #fff;
}
.resumen-top {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.9rem 1.1rem 0.55rem;
  background: linear-gradient(180deg, #0a1420 0%, #10233a 100%);
}
.resumen-pastilla {
  border: 2px solid #f5c518;
  border-radius: 0.6rem;
  padding: 0.1rem 1rem;
  font-size: 1.55rem;
  font-weight: 800;
  background: #10233a;
  letter-spacing: 0.02em;
}
.resumen-select { position: relative; display: inline-flex; align-items: center; }
select.resumen-pastilla {
  color: #fff;
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 2.3rem;
  line-height: 1.15;
}
select.resumen-pastilla option { color: #fff; background: #10233a; }
.resumen-caret {
  position: absolute;
  right: 0.7rem;
  color: #f5c518;
  font-size: 0.95rem;
  pointer-events: none;
}
.resumen-refrescar {
  margin-left: auto;
  display: inline-grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border: 2px solid #f5c518;
  border-radius: 50%;
  background: #10233a;
  color: #f5c518;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.resumen-refrescar:hover { background: #f5c518; color: #10233a; }
.resumen-fecha { font-size: 0.8rem; opacity: 0.65; }
.resumen-partidos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
  padding: 0.7rem 0.6rem 0.85rem;
  background: #10233a;
  border-top: 1px solid #1b2f4b;
  border-bottom: 3px solid #f5c518;
}
.rp-col { text-align: center; }
.rp-escudos { display: flex; align-items: center; justify-content: center; gap: 0.45rem; }
.escudo {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  font-weight: 800;
  font-size: 1.1rem;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}
.escudo-img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  padding: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  border: 2px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.35));
}
.vs { font-weight: 800; color: #f5c518; font-size: 0.95rem; }
.rp-marcador {
  font-weight: 800;
  color: #fff;
  font-size: 1.1rem;
  background: #0a1420;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 0.4rem;
  padding: 0.05rem 0.45rem;
}
.rp-nombre { font-weight: 700; text-transform: uppercase; font-size: 0.86rem; margin-top: 0.35rem; line-height: 1.25; }
.rp-1x2 { font-size: 0.74rem; opacity: 0.85; font-weight: 600; }
.rp-estado { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.04em; margin-top: 0.15rem; }
.rp-directo { color: #ff5252; animation: rp-pulso 1.4s ease-in-out infinite; }
.rp-descanso { color: #38bdf8; animation: rp-pulso 1.4s ease-in-out infinite; }
.rp-final { color: #94a3b8; }
.rp-suspendido { color: #f59e0b; }
.rp-hora { color: #94a3b8; text-transform: none; letter-spacing: 0; }
@keyframes rp-pulso { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.resumen-scroll { overflow-x: auto; }
.resumen-tabla { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.resumen-tabla thead th {
  position: sticky; top: 0;
  color: #fff; font-size: 0.7rem; text-transform: uppercase;
  padding: 0.28rem 0.4rem; letter-spacing: 0.02em;
}
.resumen-tabla th.rt-part { background: #10233a; text-align: left; padding-left: 0.8rem; }
.resumen-tabla th.rt-p1 { background: #b91c1c; }
.resumen-tabla th.rt-p2 { background: #1d4ed8; }
.resumen-tabla th.rt-p3 { background: #f5c518; color: #10233a; }
.resumen-tabla th.rt-part, .resumen-tabla td.rt-nom { width: 1%; white-space: nowrap; }
.resumen-tabla tbody td {
  border-top: 1px solid #1b2f4b;
  padding: 0.2rem 0.5rem;
  text-align: center;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.resumen-tabla tbody td.rt-nom {
  position: sticky; left: 0;
  text-align: left;
  font-family: inherit;
  font-weight: 600;
  border-right: 1px solid #1b2f4b;
  padding-left: 0.6rem;
  z-index: 1;
}
.resumen-tabla tbody tr:nth-child(odd) td { background: #0d1b2a; }
.resumen-tabla tbody tr:nth-child(even) td { background: #12233a; }
.resumen-tabla .rt-vacio { color: #475569; font-weight: 400; }
.resumen-tabla td.rt-ok { color: #4ade80; }
.resumen-tabla td.rt-ko { color: #f87171; }
.rt-nom-ko { color: #f87171; }
.rt-fijo {
  position: relative;
  display: inline-block;
  width: 0;
  height: 6px;
  vertical-align: middle;
}
.rt-fijo::after {
  position: absolute;
  left: 0.3rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85em;
  font-weight: 800;
  line-height: 1;
}
.rt-fijo-ok::after { content: "\2713"; color: #4ade80; }
.rt-fijo-ko::after { content: "\2717"; color: #f87171; }
.rt-vivo {
  position: relative;
  display: inline-block;
  width: 0;
  height: 6px;
  vertical-align: middle;
}
.rt-vivo::after {
  position: absolute;
  left: 0.3rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.82em;
  font-weight: 800;
  line-height: 1;
  animation: rp-pulso 1.4s ease-in-out infinite;
}
.rt-vivo-ok::after { content: "\2713"; color: #4ade80; }
.rt-vivo-ko::after { content: "\2717"; color: #f87171; }
.rt-aciertos {
  margin-left: 0.4rem;
  background: #4ade80;
  color: #10233a;
  border-radius: 0.6rem;
  padding: 0.02rem 0.38rem;
  font-size: 0.66rem;
  font-weight: 800;
}
.rt-dup {
  display: inline-block;
  min-width: 0.95rem;
  margin-left: 0.35rem;
  padding: 0.02rem 0.25rem;
  border-radius: 0.35rem;
  background: #f5c518;
  color: #10233a;
  font-family: inherit;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  vertical-align: middle;
}
.rt-dup-leyenda { margin-right: 0.5rem; opacity: 0.9; }
.resumen-pie {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
  padding: 0.5rem 0.9rem;
  font-size: 0.7rem;
  opacity: 0.55;
  background: #0a1420;
}
.rp-descargar { opacity: 0.75; font-size: 0.66rem; }
.rp-descargar:hover { opacity: 1; }
@media (max-width: 640px) {
  .resumen-envoltorio { border-radius: 0.7rem; }
  .resumen-top { padding: 0.6rem 0.7rem 0.4rem; gap: 0.6rem; }
  .resumen-pastilla { font-size: 1.05rem; padding: 0.05rem 0.6rem; }
  select.resumen-pastilla { padding-right: 1.7rem; }
  .resumen-caret { right: 0.5rem; font-size: 0.75rem; }
  .resumen-refrescar { width: 1.7rem; height: 1.7rem; font-size: 0.85rem; border-width: 1.5px; }
  .resumen-fecha { font-size: 0.62rem; }
  .resumen-partidos { gap: 0.15rem; padding: 0.45rem 0.2rem 0.55rem; }
  .escudo { width: 34px; height: 34px; font-size: 0.8rem; }
  .escudo-img { width: 34px; height: 34px; padding: 2px; }
  .vs { font-size: 0.72rem; }
  .rp-nombre { font-size: 0.6rem; margin-top: 0.25rem; }
  .rp-1x2 { font-size: 0.54rem; }
  .rp-marcador { font-size: 0.76rem; padding: 0.02rem 0.3rem; }
  .rp-estado { font-size: 0.52rem; }
  .resumen-tabla { font-size: 0.72rem; }
  .resumen-tabla thead th { font-size: 0.52rem; padding: 0.2rem 0.12rem; word-break: break-word; }
  .resumen-tabla th.rt-part, .resumen-tabla td.rt-nom { padding-left: 0.45rem; }
  .resumen-tabla tbody td { padding: 0.16rem 0.15rem; }
  .resumen-tabla tbody td.rt-nom { font-size: 0.68rem; }
  .resumen-pie { font-size: 0.58rem; padding: 0.35rem 0.6rem; }
}

/* ---- PWA: boton de instalar (bajo la tabla principal) ---- */
.pwa-instalar {
  max-width: 980px;
  margin: 1rem auto 2.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
}
.pwa-instalar[hidden], .pwa-ios[hidden] { display: none !important; }
.pwa-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  border: 2px solid #f5c518;
  border-radius: 0.6rem;
  background: #10233a;
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  transition: background 0.15s, color 0.15s;
}
.pwa-btn:hover { background: #f5c518; color: #10233a; }
.pwa-ico { font-size: 1.05rem; line-height: 1; }
.pwa-ios {
  max-width: 400px;
  text-align: center;
  font-size: 0.78rem;
  line-height: 1.45;
  color: #cbd5e1;
  background: #0d1b2a;
  border: 1px solid #1b2f4b;
  border-radius: 0.6rem;
  padding: 0.5rem 0.85rem;
}
