/* ============================================================
   Reporte — panel de cifras

   Sigue la tercera referencia que pasó Kevin (tarjetas de cifras,
   anillos y barras) con la paleta de la segunda: crema, negro y
   pasteles planos. Sin bordes duros y con esquinas muy redondeadas.
   ============================================================ */

/* ---------- Envase común de los bloques ---------- */
.panel {
  background: var(--fondo-tarjeta);
  border: 1px solid var(--borde-tenue);
  border-radius: var(--r-panel);
  padding: var(--e-3);
}
.panel__sub {
  font-size: 13px;
  margin: 4px 0 var(--e-2);
}
.panel--centrado {
  display: grid;
  place-items: center;
  text-align: center;
  padding-block: var(--e-5);
}

/* ---------- Tarjetas de cifras ---------- */
.rejilla-cifras {
  display: grid;
  gap: var(--e-15);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 900px) {
  .rejilla-cifras { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.cifra {
  display: grid;
  align-content: start;
  gap: 2px;
  min-height: 132px;
  padding: var(--e-2);
  border-radius: var(--r-grande);
  background: var(--t-fondo, var(--fondo-sutil));
  color: var(--t-texto, var(--texto));
}
.cifra__cabecera {
  display: flex;
  align-items: center;
  gap: var(--e-1);
  margin-bottom: var(--e-1);
}
.cifra__glifo {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, .55);
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
}
/* Sobre el panel oscuro, el blanco translúcido desaparece */
.cifra[data-tono="oscuro"] .cifra__glifo { background: rgba(255, 255, 255, .16); }

.cifra__distintivo {
  margin-left: auto;
  padding: 3px var(--e-1);
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .6);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.cifra__valor {
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.035em;
  font-variant-numeric: tabular-nums;
}
.cifra__etiqueta { font-size: 14px; font-weight: 700; margin-top: 4px; }
.cifra__pie { font-size: 12px; opacity: .72; }

/* ---------- Dos columnas de gráficos ---------- */
.reporte__columnas {
  display: grid;
  gap: var(--e-15);
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .reporte__columnas { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

/* ---------- Anillos concéntricos ---------- */
.anillo-fila {
  display: flex;
  align-items: center;
  gap: var(--e-3);
  flex-wrap: wrap;
}
.anillo-envase {
  position: relative;
  width: 168px;
  height: 168px;
  flex: none;
  margin-inline: auto;
}
.anillo { width: 100%; height: 100%; display: block; }
.anillo__pista {
  fill: none;
  stroke: var(--fondo-sutil);
  stroke-width: 11;
}
.anillo__arco {
  fill: none;
  stroke-width: 11;
  stroke-linecap: round;
  stroke: var(--e-punto);
}
.anillo-centro {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
  pointer-events: none;
}
.anillo-centro__valor {
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.anillo-centro__texto { font-size: 12px; color: var(--texto-tenue); }

/* ---------- Leyenda ---------- */
.leyenda {
  flex: 1;
  min-width: 190px;
  display: grid;
  gap: var(--e-1);
  align-content: center;
}
.leyenda__fila {
  display: flex;
  align-items: center;
  gap: var(--e-1);
  padding: var(--e-1) var(--e-15);
  border-radius: var(--r-chico);
  background: var(--e-fondo);
  color: var(--e-texto);
  font-size: 13px;
}
.leyenda__punto {
  width: 9px;
  height: 9px;
  flex: none;
  border-radius: 50%;
  background: var(--e-punto);
}
.leyenda__texto { font-weight: 600; }
.leyenda__valor {
  margin-left: auto;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.leyenda__pct {
  min-width: 42px;
  text-align: right;
  opacity: .75;
  font-variant-numeric: tabular-nums;
}

/* ---------- Barras ---------- */
.barras {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: var(--e-1);
  align-items: end;
  height: 168px;
}
.barras__columna {
  display: grid;
  grid-template-rows: 18px 1fr 20px;
  justify-items: center;
  height: 100%;
  min-width: 0;
}
.barras__valor {
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--texto-medio);
}
.barras__pista {
  display: flex;
  align-items: flex-end;
  width: 100%;
  height: 100%;
  border-radius: var(--r-chico);
  background: var(--fondo-sutil);
  overflow: hidden;
}
.barras__barra {
  width: 100%;
  min-height: 3px;
  border-radius: var(--r-chico);
  background: var(--lila-fondo);
}
/* Lo vencido ya no es una previsión: es una deuda. Va en rosa. */
.barras__columna[data-alerta="si"] .barras__barra { background: var(--danado-punto); }
.barras__columna[data-alerta="si"] .barras__etiqueta { color: var(--danado-texto); font-weight: 700; }
.barras__etiqueta {
  font-size: 11px;
  color: var(--texto-tenue);
  align-self: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* ---------- Lista de últimos movimientos ---------- */
.movimientos { display: grid; gap: var(--e-05); }
.movimiento {
  display: flex;
  align-items: center;
  gap: var(--e-15);
  padding: var(--e-1) 0;
  border-bottom: 1px solid var(--borde-tenue);
}
.movimiento:last-child { border-bottom: 0; }
.movimiento__punto {
  width: 10px;
  height: 10px;
  flex: none;
  border-radius: 50%;
  background: var(--e-punto, var(--texto-tenue));
}
.movimiento__titulo {
  display: block;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -.01em;
}
.movimiento__texto {
  display: block;
  font-size: 13px;
  color: var(--texto-medio);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.movimiento__fecha {
  flex: none;
  font-size: 12px;
  color: var(--texto-tenue);
  white-space: nowrap;
}

/* ---------- Cabecera y fichas del reporte ---------- */
.reporte__acciones {
  display: flex;
  flex-wrap: wrap;
  gap: var(--e-1);
}

.reporte__cabecera {
  display: flex;
  align-items: center;
  gap: var(--e-2);
  padding-bottom: var(--e-2);
  border-bottom: 2px solid var(--texto);
}

.reporte__lista { display: grid; gap: var(--e-1); }

.reporte__fila {
  display: flex;
  gap: var(--e-15);
  align-items: flex-start;
  padding: var(--e-15);
  border-radius: var(--r-grande);
  background: color-mix(in srgb, var(--e-fondo, #FFFFFF) 50%, #FFFFFF);
}

.reporte__marcas {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: var(--e-1);
}

.reporte__foto {
  width: 96px;
  height: 96px;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: var(--r-chico);
  background: rgba(255, 255, 255, .7);
}
.reporte__foto--vacia {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--texto-tenue);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.reporte__pie {
  margin: 0;
  padding-top: var(--e-2);
  border-top: 1px solid var(--borde);
  color: var(--texto-tenue);
  font-size: 12px;
}

@media (max-width: 420px) {
  .reporte__foto { width: 72px; height: 72px; }
  .cifra { min-height: 116px; }
}
