/* ============================================================
   smgr · css/pages/viz_resumen_temporada.css — DISEÑO de las SEIS tarjetas
   capturables de "Resumen de la temporada" (visualizacion_resumen_temporada.php).
   Portado 1:1 del clásico.

   MULTI-CAPTURA: hay seis targets (capPodio..capParticipacion), no #captureArea,
   así que el reset scopeado de viz.css no los cubre → aquí se replica ese reset
   bajo la clase .viz-card (común a las seis). Todo el diseño va scopeado bajo
   .viz-card; sólo los helpers de maquetación fuera de las tarjetas
   (.viz-capbar / .viz-scroll / .rt-empty) van sin scope. Ancho fijo 1080px; en
   móvil se hace scroll horizontal.
   ============================================================ */

/* ---------- Maquetación fuera de las tarjetas (chrome Foco) ---------- */
.viz-capbar { display: flex; justify-content: flex-end; margin-top: var(--sp-4); }
.viz-scroll { margin-top: var(--sp-2); overflow-x: auto; }
.rt-empty {
  margin-top: var(--sp-4);
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card, 12px);
}

/* ---------- Reset scopeado (equivalente al de viz.css para #captureArea) ---------- */
.viz-card, .viz-card * { margin: 0; padding: 0; box-sizing: border-box; }
.viz-card { line-height: normal; color: #1a202c; }
.viz-card img { display: inline; max-width: none; vertical-align: baseline; }

/* ---------- Tarjeta ---------- */
.viz-card {
  font-family: 'Inter', sans-serif;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.1);
  overflow: hidden;
  width: 1080px;
}

.viz-card .header {
  background: linear-gradient(135deg, #2c5282 0%, #2a4365 100%);
  color: white; padding: 12px 20px; text-align: center;
}
.viz-card .logo-section { display: flex; align-items: center; justify-content: center; gap: 15px; }
.viz-card .header h1 { font-size: 22px; font-weight: 900; }
.viz-card .header p { font-size: 12.5px; opacity: 0.92; margin-top: 3px; }

.viz-card .footer {
  background: #2d3748; color: white; padding: 9px 20px; text-align: center;
  font-size: 11.5px; display: flex; justify-content: center; gap: 22px;
}
.viz-card .footer span { opacity: 0.82; }

.viz-card table { width: 100%; border-collapse: collapse; }
.viz-card thead th {
  background: #2d3748; color: white; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.3px;
  padding: 9px 6px; text-align: center; font-size: 11px; white-space: nowrap;
}
.viz-card tbody td { padding: 6px 8px; border-bottom: 1px solid #e8edf3; font-size: 14px; font-weight: 600; text-align: center; }
.viz-card tbody tr:nth-child(even) td { background: rgba(0,0,0,0.018); }

.viz-card .col-pos { width: 46px; }
.viz-card td.pos { font-weight: 900; font-size: 16px; color: #2d3748; }
.viz-card .mgr-cell { text-align: left; }
.viz-card .mgr { display: flex; align-items: center; gap: 9px; }
.viz-card .mgr-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; border: 1px solid #d8e0ea; background: #eef2f7; flex: 0 0 auto; }
.viz-card .mgr-avatar.sm { width: 24px; height: 24px; }
.viz-card .cell-sub { font-size: 11px; color: #a0aec0; font-weight: 600; }
.viz-card .fpos { font-weight: 800; color: #2d3748; font-variant-numeric: tabular-nums; }
.viz-card .block-border-left { border-left: 1px dotted #cbd5e0 !important; }
.viz-card .mgr-txt { display: flex; flex-direction: column; line-height: 1.15; }
.viz-card .mgr-user { font-weight: 800; color: #1a365d; font-size: 14px; }
.viz-card .mgr-team { font-weight: 600; color: #718096; font-size: 11.5px; }
.viz-card td.pts { font-weight: 800; color: #1a365d; font-variant-numeric: tabular-nums; }
.viz-card td.broker { color: #4a5568; font-variant-numeric: tabular-nums; }

.viz-card .row-gold td { background: rgba(212, 167, 106, 0.18) !important; }
.viz-card .row-silver td { background: rgba(160, 174, 192, 0.16) !important; }
.viz-card .row-bronze td { background: rgba(180, 120, 70, 0.13) !important; }
.viz-card .row-record td { background: rgba(220, 80, 80, 0.16) !important; }
.viz-card .medal { font-size: 16px; }

/* two side-by-side tables */
.viz-card .split { display: flex; gap: 0; }
.viz-card .split > div { flex: 1; }
.viz-card .split .leg-title {
  background: #1a365d; color: #fff; text-align: center; font-weight: 800;
  font-size: 13px; padding: 7px; text-transform: uppercase; letter-spacing: .4px;
}
.viz-card .split table { font-size: 13px; }
.viz-card .split tbody td { padding: 5px 7px; font-size: 13px; }
.viz-card .split-divider { border-left: 2px solid #cbd5e0; }
.viz-card .jcol { width: 40px; font-weight: 800; color: #2d3748; }

/* relay (relevo) */
.viz-card .relay { padding: 18px 24px 8px; }
.viz-card .relay-axis { display: flex; justify-content: space-between; font-size: 10px; color: #a0aec0; font-weight: 700; padding: 0 2px 4px; }
.viz-card .relay-row { display: flex; align-items: center; height: 40px; }
.viz-card .relay-track { position: relative; flex: 1; height: 32px; }
.viz-card .relay-bar {
  position: absolute; top: 0; height: 32px; border-radius: 7px;
  display: flex; align-items: center; gap: 7px; padding: 0 5px;
  white-space: nowrap; box-shadow: 0 2px 6px rgba(0,0,0,0.12); min-width: 28px;
}
.viz-card .relay-bar.with-label { padding: 0 11px; }
.viz-card .relay-bar img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; border: 1px solid rgba(255,255,255,.6); flex: 0 0 auto; background: rgba(255,255,255,.25); }
.viz-card .rb-inside { color: #fff; display: flex; align-items: center; gap: 7px; overflow: hidden; }
.viz-card .rb-inside .rb-name { font-size: 13px; font-weight: 800; }
.viz-card .rb-inside .rb-j { opacity: .9; font-weight: 600; font-size: 11.5px; }
.viz-card .relay-label {
  position: absolute; top: 0; height: 32px; display: flex; align-items: center; gap: 7px;
  white-space: nowrap; pointer-events: none;
}
.viz-card .relay-label.rgt { padding-left: 8px; }
.viz-card .relay-label.lft { flex-direction: row; justify-content: flex-end; padding-right: 8px; }
.viz-card .relay-label .rb-name { font-size: 13px; font-weight: 800; color: #1a365d; }
.viz-card .relay-label .rb-j { font-size: 11.5px; font-weight: 600; color: #718096; }

/* records grid */
.viz-card .records-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 22px; }
.viz-card .rec-card {
  background: #f7fafc; border: 1px solid #e8edf3; border-radius: 14px; padding: 16px;
  display: flex; flex-direction: column; gap: 4px;
}
.viz-card .rec-card.hl { background: linear-gradient(135deg, #fff8ec, #fdeccd); border-color: #e9d3a6; }
.viz-card .rec-ico { font-size: 22px; }
.viz-card .rec-label { font-size: 11.5px; color: #718096; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; }
.viz-card .rec-main { font-size: 19px; font-weight: 900; color: #1a365d; line-height: 1.1; }
.viz-card .rec-sub { font-size: 12px; color: #4a5568; font-weight: 600; }

/* participación */
.viz-card .stat-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding: 22px 22px 6px; }
.viz-card .tile { background: #f7fafc; border: 1px solid #e8edf3; border-radius: 14px; padding: 16px 14px; text-align: center; }
.viz-card .tile-num { font-size: 27px; font-weight: 900; color: #1a365d; line-height: 1; font-variant-numeric: tabular-nums; }
.viz-card .tile-lab { font-size: 11.5px; color: #718096; font-weight: 700; margin-top: 6px; line-height: 1.25; }
.viz-card .tile.alert .tile-num { color: #c0392b; }
.viz-card .chart-wrap { padding: 6px 18px 18px; }
.viz-card .chart-title { font-size: 14px; font-weight: 800; color: #2d3748; padding: 8px 6px 0; }
.viz-card .stk-legend { display: flex; justify-content: center; gap: 22px; padding: 2px 6px 8px; font-size: 12px; font-weight: 700; color: #2d3748; }
.viz-card .stk-legend i { display: inline-block; width: 13px; height: 13px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
