/* ============================================================================
   Gerencia · YT Grupo — estilos compartidos
   Base visual de ASIS_YT: degradado #0b0e44 → #af3698, acento #da116d,
   tarjetas blancas translúcidas con sombra, Poppins.
   ========================================================================== */
:root {
  --azul: #0b0e44;
  --morado: #af3698;
  --magenta: #da116d;
  --grad: linear-gradient(135deg, #0b0e44 0%, #af3698 100%);
  --grad-acento: linear-gradient(135deg, #da116d 0%, #af3698 100%);

  --fondo: #f4f4fa;
  --panel: #ffffff;
  --texto: #171a3a;
  --suave: #5f6386;
  --tenue: #9a9db8;
  --linea: #e7e7f1;
  --linea-suave: #f0f0f6;

  --ok: #12a26b;
  --ok-bg: #e2f6ed;
  --alerta: #d98a00;
  --alerta-txt: #a66900;
  --alerta-bg: #fff2d6;
  --malo: #da116d;
  --malo-bg: #fde7f1;

  --radio: 20px;
  --sombra: 0 12px 32px rgba(11, 14, 68, .08), 0 2px 6px rgba(11, 14, 68, .05);
  --sombra-fuerte: 0 30px 60px rgba(0, 0, 0, .35);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  color: var(--texto);
  background: var(--fondo);
  line-height: 1.5;
  min-height: 100vh;
}
button, input, select { font: inherit; color: inherit; }
a { color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid rgba(218, 17, 109, .45); outline-offset: 2px; }

body.hub { background: var(--grad) fixed; }
body.tablero {
  background:
    linear-gradient(135deg, #0b0e44 0%, #5a2373 55%, #af3698 100%) 0 0 / 100% 420px no-repeat,
    var(--fondo);
}

.contenido { max-width: 1360px; margin: 0 auto; padding: 0 24px 56px; }

.sobretitulo {
  margin: 0 0 6px; font-size: .72rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--magenta);
}
.sobretitulo.claro { color: rgba(255, 255, 255, .78); }

/* ───────────── barra superior ───────────── */
.barra {
  max-width: 1360px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; color: #fff;
}
.barra-marca { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-weight: 600; font-size: 1.02rem; min-width: 0; }
.barra-marca b { color: var(--magenta); font-weight: 800; }
.barra-logo { width: 64px; height: 40px; object-fit: cover; object-position: 50% 39%; flex: none; }
.barra-inicio {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-size: .85rem; font-weight: 600; white-space: nowrap;
  padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22);
  transition: background .2s;
}
.barra-inicio:hover { background: rgba(255, 255, 255, .26); }

/* ───────────── hub ───────────── */
@keyframes aparecer { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
.hub { padding: 40px 0 24px; }
.hub-logo {
  display: block; width: 170px; margin: -34px 0 -22px -30px; filter: drop-shadow(0 5px 10px rgba(0, 0, 0, .3));
  animation: flotar 3s ease-in-out infinite;
}
@keyframes flotar { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.hub-cabecera { color: #fff; margin-bottom: 36px; max-width: 720px; }
.hub-saludo { margin: 0; font-size: clamp(2rem, 4.5vw, 3.1rem); font-weight: 700; line-height: 1.15; letter-spacing: -.01em; }
.hub-marca { color: rgba(255, 255, 255, .7); font-weight: 500; }
.hub-sub { margin: 10px 0 0; font-size: 1.08rem; color: rgba(255, 255, 255, .82); }
.hub-grilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 24px; }
.hub-tarjeta {
  display: flex; flex-direction: column; gap: 18px; padding: 30px 28px 26px; min-height: 260px;
  background: rgba(255, 255, 255, .96); border-radius: 24px; box-shadow: var(--sombra-fuerte);
  text-decoration: none; color: var(--texto); transition: transform .25s, box-shadow .25s;
  animation: aparecer .5s ease both;
}
a.hub-tarjeta:hover { transform: translateY(-6px); box-shadow: 0 36px 70px rgba(0, 0, 0, .4); }
a.hub-tarjeta:hover .hub-ir i { transform: translateX(4px); }
.hub-tarjeta.inactiva { opacity: .62; }
.hub-icono {
  width: 66px; height: 66px; border-radius: 20px; display: grid; place-items: center; flex: none;
  background: var(--grad-acento); color: #fff; font-size: 1.7rem; box-shadow: 0 12px 24px rgba(218, 17, 109, .3);
}
.hub-texto { display: grid; gap: 6px; }
.hub-titulo { font-size: 1.5rem; font-weight: 700; color: var(--azul); }
.hub-desc { color: var(--suave); font-size: .95rem; }
.hub-ir { margin-top: auto; font-weight: 600; color: var(--magenta); display: inline-flex; align-items: center; gap: 8px; }
.hub-ir i { transition: transform .2s; }

/* ───────────── cabecera de la vista ───────────── */
.cabecera-vista {
  color: #fff; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end;
  gap: 20px 24px; padding: 10px 0 30px;
}
.cabecera-texto { min-width: 0; }
.volver {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-size: .85rem;
  color: rgba(255, 255, 255, .78); margin-bottom: 14px;
}
.volver:hover { color: #fff; }
.cabecera-titulo { margin: 0; font-size: clamp(2.1rem, 4.4vw, 3rem); font-weight: 700; line-height: 1.1; letter-spacing: -.015em; }
.cabecera-sub { margin: 8px 0 0; color: rgba(255, 255, 255, .85); font-size: .95rem; }
.cabecera-sub i { margin-right: 4px; }
.cabecera-sub .sep { opacity: .6; margin: 0 4px; }
.cabecera-controles { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.selector-linea, .pestanas {
  display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 5px; border-radius: 999px;
  background: rgba(255, 255, 255, .13); border: 1px solid rgba(255, 255, 255, .18);
}
.selector-linea a, .pestanas button {
  border: 0; background: transparent; color: rgba(255, 255, 255, .88); text-decoration: none; cursor: pointer;
  padding: 9px 18px; border-radius: 999px; font-size: .9rem; font-weight: 500; white-space: nowrap; transition: background .2s;
}
.selector-linea a:hover, .pestanas button:hover { background: rgba(255, 255, 255, .12); }
.selector-linea a.activa, .pestanas button[aria-selected="true"] {
  background: #fff; color: var(--azul); font-weight: 700; box-shadow: 0 4px 12px rgba(0, 0, 0, .18);
}
.pestanas button i { margin-right: 6px; opacity: .8; }
.pestanas .corto { display: none; }

/* ───────────── paneles ───────────── */
.panel { background: var(--panel); border-radius: var(--radio); box-shadow: var(--sombra); padding: 22px 24px; min-width: 0; }
.panel-cab { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 12px; }
.panel-cab h2 { margin: 0; font-size: 1.08rem; font-weight: 700; color: var(--azul); }
.etiqueta { font-size: .72rem; color: var(--suave); border: 1px solid var(--linea); border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.nota { margin: 6px 0 0; font-size: .8rem; color: var(--suave); }
.vacio { text-align: center; color: var(--suave); padding: 28px 8px; margin: 0; font-size: .92rem; }
.vacio i { margin-right: 6px; color: var(--morado); }

.estado-vacio { text-align: center; padding: 56px 28px; max-width: 680px; margin: 10px auto 0; }
.estado-vacio h2 { color: var(--azul); margin: 18px 0 8px; font-size: 1.35rem; }
.estado-vacio p { color: var(--suave); margin: 0 0 24px; }
.estado-icono {
  width: 76px; height: 76px; border-radius: 50%; display: inline-grid; place-items: center;
  background: #f4e8f5; color: var(--morado); font-size: 1.9rem;
}
.estado-icono.error { background: var(--malo-bg); color: var(--malo); }

.btn-link {
  background: none; border: 0; padding: 0; cursor: pointer; color: var(--magenta); font-weight: 600; font-size: .86rem;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-link:hover { text-decoration: underline; }
.btn-primario {
  border: 0; border-radius: 12px; padding: 11px 18px; cursor: pointer; background: var(--grad); color: #fff;
  font-weight: 600; font-size: .9rem; display: inline-flex; align-items: center; gap: 8px;
  box-shadow: 0 8px 18px rgba(11, 14, 68, .2); transition: transform .2s, opacity .2s;
}
.btn-primario:hover { transform: translateY(-1px); }
.btn-primario:disabled { opacity: .45; cursor: default; transform: none; }
.btn-secundario, .btn-mas {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; cursor: pointer;
  border: 1px solid var(--linea); background: #fff; color: var(--magenta); font-weight: 600; font-size: .9rem;
  border-radius: 12px; padding: 10px 18px; transition: background .2s;
}
.btn-secundario:hover, .btn-mas:hover { background: #fbf3f8; }
.btn-mas { display: flex; margin: 18px auto 0; }

/* ───────────── filtros ───────────── */
.filtros { display: grid; gap: 16px; }
.filtros-selects { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 14px 18px; }
.filtro { display: grid; gap: 6px; min-width: 0; }
.filtro > span { font-size: .7rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--suave); }
.filtro > span small { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--tenue); }
.filtro select {
  width: 100%; min-width: 0; padding: 10px 36px 10px 12px; border: 1px solid var(--linea); border-radius: 12px;
  background: #fafafe url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235f6386' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 14px center;
  appearance: none; -webkit-appearance: none; font-size: .92rem; cursor: pointer; text-overflow: ellipsis;
}
.filtro select:focus { outline: none; border-color: var(--morado); box-shadow: 0 0 0 3px rgba(175, 54, 152, .15); }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button {
  border: 1px solid var(--linea); background: #fff; border-radius: 12px; padding: 6px 12px; cursor: pointer;
  font-size: .86rem; font-weight: 600; color: var(--texto); line-height: 1.2; text-align: center; min-width: 54px;
  transition: background .15s, border-color .15s;
}
.seg button small { display: block; font-size: .66rem; font-weight: 500; color: var(--tenue); }
.seg button:hover { border-color: var(--morado); }
.seg button[aria-pressed="true"] { background: var(--azul); border-color: var(--azul); color: #fff; }
.seg button[aria-pressed="true"] small { color: rgba(255, 255, 255, .72); }
.filtros-pie { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; border-top: 1px solid var(--linea-suave); padding-top: 12px; }
.viendo { margin: 0; font-size: .88rem; color: var(--suave); min-width: 0; overflow-wrap: anywhere; }
.viendo b { color: var(--azul); }

/* ───────────── resumen ───────────── */
.vista { display: grid; gap: 20px; margin-top: 20px; }
.historia { border-left: 6px solid var(--magenta); padding: 22px 26px; }
.historia-texto { margin: 0; font-size: 1.06rem; line-height: 1.75; max-width: 120ch; }
.historia-texto b { color: var(--azul); font-weight: 700; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 540px) { .kpis { grid-template-columns: minmax(0, 1fr); } }
.kpi {
  position: relative; overflow: hidden; background: var(--panel); border-radius: var(--radio); box-shadow: var(--sombra);
  padding: 20px 22px 22px; display: grid; gap: 4px; min-width: 0;
}
.kpi::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--grad); opacity: .85; }
.kpi.malo::after { background: var(--malo); }
.kpi.bueno::after { background: var(--ok); }
.kpi.acento::after { background: var(--grad-acento); }
.kpi-cab { display: flex; align-items: center; gap: 10px; }
.kpi-icono {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: .9rem;
  background: #eef0fb; color: var(--azul); flex: none;
}
.kpi.malo .kpi-icono, .kpi.acento .kpi-icono { background: var(--malo-bg); color: var(--malo); }
.kpi.bueno .kpi-icono { background: var(--ok-bg); color: var(--ok); }
.kpi-titulo { font-size: .76rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--suave); }
.kpi-valor {
  font-size: clamp(2.1rem, 3.3vw, 2.75rem); font-weight: 700; color: var(--azul); line-height: 1.12;
  letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin-top: 8px; overflow-wrap: anywhere;
}
.kpi-sub { font-size: .85rem; color: var(--suave); }
.kpi-sub b { color: var(--texto); }
.var { font-weight: 700; }
.var.malo { color: var(--malo); }
.var.bueno { color: var(--ok); }

.grilla { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px; }
.grilla > * { grid-column: span 12; }
@media (min-width: 1000px) {
  .grilla > .s7 { grid-column: span 7; }
  .grilla > .s5 { grid-column: span 5; }
  .grilla > .s6 { grid-column: span 6; }
}

/* metas por antigüedad */
.metas { display: grid; gap: 4px; margin-top: 14px; }
.meta-fila {
  display: grid; grid-template-columns: 8rem minmax(0, 1fr) 5.6rem 6.6rem; gap: 14px; align-items: center;
  width: 100%; padding: 9px 10px; border: 0; border-radius: 12px; background: transparent; cursor: pointer; text-align: left;
  transition: background .15s;
}
.meta-fila:hover { background: #f7f4fb; }
.meta-fila.activa { background: #fbeaf3; box-shadow: inset 4px 0 0 var(--magenta); }
.meta-lab b { font-size: 1rem; color: var(--azul); margin-right: 6px; }
.meta-lab small { color: var(--suave); font-size: .78rem; }
.meta-pista { position: relative; height: 14px; border-radius: 999px; background: #efeff6; }
.meta-pista i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; transition: width .4s ease; }
.meta-pista i.ok { background: linear-gradient(90deg, #4fc795, var(--ok)); }
.meta-pista i.no { background: linear-gradient(90deg, #ffc65c, var(--alerta)); }
.meta-pista u { position: absolute; top: -5px; bottom: -5px; width: 3px; margin-left: -1.5px; border-radius: 2px; background: var(--azul); }
.meta-val { text-align: right; line-height: 1.2; font-variant-numeric: tabular-nums; }
.meta-val b { display: block; font-size: 1.02rem; color: var(--texto); }
.meta-val small { font-size: .72rem; color: var(--suave); }
.meta-est { text-align: right; }

.pastilla {
  display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; font-weight: 700; border-radius: 999px;
  padding: 3px 10px; white-space: nowrap; line-height: 1.4;
}
.pastilla.ok { background: var(--ok-bg); color: var(--ok); }
.pastilla.alerta { background: var(--alerta-bg); color: var(--alerta-txt); }
.pastilla.mala { background: var(--malo-bg); color: var(--malo); }
.pastilla.gris { background: #eef0f5; color: var(--suave); font-weight: 600; }

/* evolución */
.leyenda { display: flex; flex-wrap: wrap; gap: 14px; font-size: .78rem; color: var(--suave); margin-top: 10px; }
.leyenda span { display: inline-flex; align-items: center; gap: 6px; }
.leyenda i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.grafico { min-height: 240px; margin-top: 8px; }
.grafico svg { display: block; overflow: visible; }
.grafico .eje { stroke: var(--linea); stroke-width: 1; }
.grafico .g-val { font-size: 12.5px; font-weight: 700; fill: var(--azul); font-family: inherit; }
.grafico .g-val.ult { fill: var(--magenta); }
.grafico .g-x { font-size: 11.5px; font-weight: 500; fill: var(--suave); font-family: inherit; }
.grafico .g-x.ult { fill: var(--azul); font-weight: 700; }
.grafico .g-sub { font-size: 10.5px; fill: var(--tenue); font-family: inherit; }

/* ¿qué tan vencida? */
.vencida { margin-top: 14px; display: grid; gap: 4px; }
.venc-barra { display: flex; height: 34px; border-radius: 10px; overflow: hidden; gap: 2px; margin-bottom: 12px; }
.venc-barra span { display: grid; place-items: center; color: #fff; font-size: .78rem; font-weight: 700; min-width: 4px; text-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.venc-barra span:first-child { color: #7a0d42; text-shadow: none; }
.venc-cab, .venc-fila { display: grid; grid-template-columns: minmax(0, 1.25fr) 5.5rem minmax(0, 1.4fr); gap: 12px; align-items: center; }
.venc-cab { font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--tenue); padding: 0 2px 4px; border-bottom: 1px solid var(--linea-suave); }
.venc-cab span:nth-child(2) { text-align: right; }
.venc-fila { padding: 9px 2px; border-bottom: 1px solid var(--linea-suave); font-size: .9rem; }
.venc-lab { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.venc-lab i { width: 11px; height: 11px; border-radius: 3px; flex: none; }
.venc-n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.venc-n b { color: var(--azul); font-size: 1.02rem; }
.venc-n small { color: var(--suave); font-size: .74rem; margin-left: 2px; }
.venc-monto { display: flex; align-items: center; gap: 10px; min-width: 0; }
.venc-monto b { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--texto); font-size: .92rem; }
.venc-pista { flex: 1; height: 8px; border-radius: 4px; background: #f1edf6; position: relative; overflow: hidden; min-width: 30px; }
.venc-pista i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; }
.vencida .nota { margin-top: 10px; }

/* puente (cascada) */
.grafico .wf-con { stroke: var(--tenue); stroke-dasharray: 3 3; stroke-width: 1; }
.grafico .g-val.wf-ok { fill: var(--ok); }
.grafico .g-val.wf-sale { fill: var(--suave); }
.grafico .g-val.wf-malo { fill: var(--magenta); }
.grafico .g-val.wf-entra { fill: var(--morado); }
#puente { min-height: 270px; margin-top: 10px; }

/* mapas de calor */
.mapa-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-top: 12px; }
.mapa { border-collapse: separate; border-spacing: 4px; width: 100%; font-size: .86rem; font-variant-numeric: tabular-nums; }
.mapa th { font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--suave); padding: 4px 6px; white-space: nowrap; text-align: center; }
.mapa tbody th { text-align: left; text-transform: none; letter-spacing: 0; font-size: .84rem; color: var(--azul); font-weight: 600; }
.mapa td { text-align: center; padding: 9px 6px; border-radius: 8px; font-weight: 600; color: var(--texto); min-width: 52px; }
.mapa td.claro { color: #fff; }
.mapa td.mapa-vacia { color: var(--tenue); background: #f7f7fb; font-weight: 400; }
.mapa tr.total th { color: var(--texto); }
.mapa tr.total td { box-shadow: inset 0 0 0 2px rgba(11, 14, 68, .12); }

/* pendientes con Sanna */
.pend-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 14px 0 8px; }
.pend-tile { background: #fafafe; border: 1px solid var(--linea-suave); border-radius: 14px; padding: 12px 14px; display: grid; gap: 2px; min-width: 0; }
.pend-tile b { font-size: 1.6rem; color: var(--azul); line-height: 1.1; font-variant-numeric: tabular-nums; }
.pend-tile span { font-size: .76rem; color: var(--suave); line-height: 1.3; }
.tabla-compacta td, .tabla-compacta th { padding: 8px 6px; }
.tabla-compacta td.nombre { white-space: normal; }

/* equipos */
.tabla .col-barra { min-width: 240px; }
.sup-pista { display: inline-block; position: relative; width: calc(100% - 64px); max-width: 360px; min-width: 90px; height: 10px; border-radius: 5px; background: #f1edf6; vertical-align: middle; margin-right: 10px; }
.sup-pista i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; background: #8f93c4; }
.sup-pista i.sobre { background: var(--grad-acento); }
.sup-pista u { position: absolute; top: -5px; bottom: -5px; width: 2px; margin-left: -1px; background: var(--azul); border-radius: 1px; }
.tabla .col-barra b { font-variant-numeric: tabular-nums; }
.tabla .col-barra b.malo { color: var(--malo); }
.sub-jefe { display: block; font-size: .72rem; color: var(--tenue); font-weight: 500; }
.tabla-sel tr[data-j] { cursor: pointer; }
.tabla-sel tr[data-j]:hover .baja-nivel { color: var(--magenta); }
.tabla tbody tr.activa td { background: #fbeaf3; }
.tabla tbody tr.activa td:first-child { box-shadow: inset 4px 0 0 var(--magenta); }

/* movimientos */
#movs { margin-top: 14px; }
.movs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 540px) { .movs { grid-template-columns: minmax(0, 1fr); } }
.mov { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: 16px; background: #fafafe; border: 1px solid var(--linea-suave); }
.mov-icono { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 1.05rem; }
.mov.bueno .mov-icono { background: var(--ok-bg); color: var(--ok); }
.mov.malo .mov-icono { background: var(--malo-bg); color: var(--malo); }
.mov.entra .mov-icono { background: #f4e8f5; color: var(--morado); }
.mov.sale .mov-icono { background: #eef0f5; color: var(--suave); }
.mov-num { font-size: 1.9rem; font-weight: 700; color: var(--azul); line-height: 1.1; font-variant-numeric: tabular-nums; }
.mov-tit { font-weight: 600; font-size: .92rem; }
.mov-desc { font-size: .78rem; color: var(--suave); }
.movs-saldo { margin: 14px 0 0; font-size: .9rem; color: var(--suave); }
.movs-saldo b { color: var(--azul); }

/* migas */
.migas { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 14px 0 6px; font-size: .88rem; }
.migas button { background: none; border: 0; padding: 0; cursor: pointer; color: var(--magenta); font-weight: 600; }
.migas button:hover { text-decoration: underline; }
.migas span { font-weight: 700; color: var(--azul); }
.migas i { font-size: .62rem; color: var(--tenue); }

/* tablas */
.tabla-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-top: 8px; }
.tabla { width: 100%; border-collapse: collapse; font-size: .86rem; font-variant-numeric: tabular-nums; }
.tabla th {
  text-align: left; font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--suave);
  padding: 10px 10px; border-bottom: 2px solid var(--linea); white-space: nowrap;
}
.tabla th button {
  background: none; border: 0; padding: 0; cursor: pointer; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.tabla th button i { font-size: .7rem; opacity: .45; }
.tabla th[aria-sort="ascending"] button, .tabla th[aria-sort="descending"] button { color: var(--azul); }
.tabla th[aria-sort="ascending"] i, .tabla th[aria-sort="descending"] i { opacity: 1; color: var(--magenta); }
.tabla td { padding: 11px 10px; border-bottom: 1px solid var(--linea-suave); white-space: nowrap; }
.tabla .n { text-align: right; }
.tabla th.n button { flex-direction: row-reverse; }
.tabla tbody tr:hover td { background: #fbf8fc; }
.tabla tr.total td { font-weight: 700; background: #f6f6fb; }
.tabla tfoot td { font-weight: 700; background: #f6f6fb; border-top: 2px solid var(--linea); border-bottom: 0; }
.tabla-sel tr[data-idx] { cursor: pointer; }
.tabla .baja-nivel { color: var(--azul); font-weight: 600; }
.tabla-sel tr[data-idx]:hover .baja-nivel { color: var(--magenta); }
.tabla-sel tr[data-idx] .baja-nivel::after { content: "\f054"; font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: .6rem; margin-left: 8px; color: var(--tenue); }
.tabla td.malo { color: var(--malo); }
.tabla td.bueno { color: var(--ok); font-weight: 600; }
.tabla td.alerta { color: var(--alerta-txt); font-weight: 600; }
.tabla td.fuerte { font-weight: 700; }
.tabla td.codigo { font-weight: 600; color: var(--azul); }
.tabla td.vacio { white-space: normal; }
.tenue { color: var(--tenue); }
.tabla td.barra-pct small { display: block; font-size: .72rem; font-weight: 600; color: var(--tenue); padding-left: 56px; line-height: 1.2; }
.tabla td.barra-pct small.malo { color: var(--malo); }
.tabla td.barra-pct small.bueno { color: var(--ok); }
.mini-pista { display: inline-block; position: relative; width: 48px; height: 8px; border-radius: 4px; background: #f1edf6; vertical-align: middle; margin-right: 8px; overflow: hidden; }
.mini-pista i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--grad-acento); min-width: 2px; }
.th-sub { font-size: .62rem; font-weight: 600; color: var(--tenue); letter-spacing: .02em; }

/* detalle */
.det-barra { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin: 16px 0 6px; }
.buscador { position: relative; flex: 1 1 280px; max-width: 520px; min-width: 0; }
.buscador i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--tenue); font-size: .9rem; }
.buscador input {
  width: 100%; padding: 11px 14px 11px 40px; border: 1px solid var(--linea); border-radius: 12px; background: #fafafe; font-size: .92rem;
}
.buscador input:focus { outline: none; border-color: var(--morado); box-shadow: 0 0 0 3px rgba(175, 54, 152, .15); background: #fff; }

.pie-nota { margin: 26px 4px 0; font-size: .78rem; color: var(--suave); line-height: 1.65; max-width: 1100px; }
.pie-nota b { color: var(--texto); font-weight: 600; }

/* ───────────── responsivo ───────────── */
@media (max-width: 640px) {
  .contenido { padding: 0 16px 40px; }
  .barra { padding: 12px 16px; }
  .panel { padding: 18px 16px; }
  .historia { padding: 18px 18px; }
  .historia-texto { font-size: 1rem; }
  .kpis, .grilla, .vista { gap: 14px; }
  .selector-linea, .pestanas { display: flex; width: 100%; }
  .selector-linea a, .pestanas button { flex: 1 1 0; text-align: center; padding: 9px 10px; font-size: .86rem; }
  .selector-linea, .pestanas { flex-wrap: nowrap; }
  .pestanas button { padding: 9px 4px; font-size: .8rem; }
  .pestanas .largo { display: none; }
  .pestanas .corto { display: inline; }
  .venc-cab, .venc-fila { grid-template-columns: minmax(0, 1fr) 4.6rem; }
  .venc-cab span:nth-child(3) { display: none; }
  .venc-monto { grid-column: 1 / -1; }
  .pend-tile b { font-size: 1.3rem; }
  .pend-tile { padding: 10px; }
  .tabla .col-barra { min-width: 128px; }
  .sup-pista { width: 56px; min-width: 56px; margin-right: 6px; }
  .mapa td { min-width: 44px; padding: 8px 4px; }
  .tabla.tabla-compacta td, .tabla.tabla-compacta th { padding: 8px 4px; }
  .tabla.tabla-compacta td.nombre { min-width: 5rem; }
  .sub-jefe { display: none; }
  #ejecutivos td.nombre { min-width: 6rem; }
  .meta-fila { grid-template-columns: 4.2rem minmax(0, 1fr) auto; gap: 6px 12px; }
  .meta-lab small { display: block; font-size: .7rem; }
  .meta-est { grid-column: 2 / -1; text-align: left; }
  .tabla .opc { display: none; }
  .tabla td.nombre { white-space: normal; min-width: 7rem; }
  .tabla .th-sub { display: none; }
  #detalle td:nth-child(7) { white-space: normal; min-width: 8rem; }
  .tabla .mini-pista { display: none; }
  .tabla td.barra-pct small { padding-left: 0; }
  .tabla { font-size: .82rem; }
  .tabla th { letter-spacing: .02em; font-size: .64rem; }
  .tabla th, .tabla td { padding: 10px 5px; }
  .det-barra .btn-primario { width: 100%; justify-content: center; }
  .buscador { flex-basis: 100%; max-width: none; }
}
@media (max-width: 420px) {
  .barra-marca span { font-size: .88rem; }
  .barra-inicio span { display: none; }
  .pestanas button i { display: none; }
}
