/* Estilos específicos del lector de resultados (complementan ../css/style.css) */

.meet-tag {
  display: block;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.35;
  color: #cfe6f5;
  margin-bottom: 4px;
}
.meet-tag strong { color: #fff; display: block; font-size: 12.5px; margin-bottom: 2px; }
.meet-tag.hidden { display: none; }

/* Zona de carga (drop) */
.dropzone {
  border: 2px dashed var(--border);
  border-radius: 14px;
  background: var(--surface);
  padding: 54px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--accent);
  background: #f0fdff;
}
.dropzone .big-icon { font-size: 54px; margin-bottom: 12px; }
.dropzone h2 { margin: 0 0 6px; font-size: 20px; }
.dropzone p { margin: 4px 0; color: var(--text-muted); font-size: 14px; }
.dropzone .hint { font-size: 12.5px; }

/* Biblioteca de competencias */
.lib-head { display: flex; gap: 10px; margin-bottom: 14px; }
.lib-head input[type="search"] {
  flex: 1; padding: 9px 12px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 14px; background: var(--surface);
}
.lib-section { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); margin: 4px 2px 10px; }
.lib-section:not(:first-child) { margin-top: 22px; }
.lib-grid { display: flex; flex-direction: column; gap: 8px; }
.lib-item.repo { border-color: #c7d2fe; background: #eef2ff; }
.lib-item.repo:hover { border-color: #6366f1; background: #e0e7ff; }
.lib-item.repo .lib-open { color: #4338ca; }
.lib-item {
  display: flex; align-items: center; gap: 14px; width: 100%;
  text-align: left; background: var(--surface); cursor: pointer;
  border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px;
  font-size: 14px; color: var(--text); transition: border-color .15s ease, background .15s ease;
}
.lib-item:hover { border-color: var(--accent); background: #f0fdff; }
.lib-item:disabled { opacity: .6; cursor: default; }
.lib-icon { font-size: 24px; flex-shrink: 0; }
.lib-main { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.lib-title { font-weight: 600; font-size: 15px; }
.lib-sub { color: var(--text-muted); font-size: 12.5px; }
.lib-open { color: var(--accent-dark); font-weight: 600; font-size: 13px; white-space: nowrap; }

.loading-inline {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text-muted); font-size: 14px; margin-top: 14px;
}
.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 3px solid var(--border); border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Selector de equipo / atletas */
.selector-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 20px;
  align-items: start;
}
@media (max-width: 860px) { .selector-grid { grid-template-columns: 1fr; } }

.team-list { max-height: 420px; overflow-y: auto; }
.team-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 11px; border-radius: 8px; cursor: pointer;
  font-size: 14px; border: 1px solid transparent;
}
.team-item:hover { background: #f8fafc; }
.team-item.active { background: var(--accent); color: #fff; }
.team-item.active .count { background: rgba(255,255,255,.25); color: #fff; }
.team-item .count {
  background: #f1f5f9; color: #475569; border-radius: 999px;
  padding: 1px 9px; font-size: 12px; font-weight: 600;
}

.athlete-picker { max-height: 300px; overflow-y: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 16px; }
@media (max-width: 620px) { .athlete-picker { grid-template-columns: 1fr; } }
.athlete-check {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 4px; font-size: 14px; cursor: pointer; border-radius: 6px;
}
.athlete-check:hover { background: #f8fafc; }
.athlete-check input { width: 16px; height: 16px; cursor: pointer; }
.athlete-check .meta { color: var(--text-muted); font-size: 12px; margin-left: auto; }

.pick-actions { display: flex; gap: 12px; margin: 8px 0 4px; }

/* Resultado: badges de lugar */
.place-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 26px; height: 24px; padding: 0 7px; border-radius: 6px;
  font-weight: 700; font-size: 13px; background: #f1f5f9; color: #475569;
}
.place-badge.gold   { background: #fef9c3; color: #a16207; }
.place-badge.silver { background: #f1f5f9; color: #475569; }
.place-badge.bronze { background: #fde9d3; color: #b45309; }

.time-cell { font-variant-numeric: tabular-nums; font-weight: 600; }
.time-cell.dq { text-decoration: line-through; color: var(--text-muted); font-weight: 500; }

.athlete-group { margin-bottom: 22px; }
.athlete-group h3 {
  margin: 0 0 8px; font-size: 15px; display: flex; align-items: baseline; gap: 10px;
}
.athlete-group h3 .sub { font-size: 12.5px; color: var(--text-muted); font-weight: 500; }

.result-count { color: var(--text-muted); font-size: 13px; margin-left: 8px; }

.cap-note {
  background: #fef3c7; color: #92400e; border: 1px solid #fde68a;
  border-radius: 8px; padding: 8px 12px; font-size: 13px; margin-bottom: 12px;
}

/* Gráficas de progresión */
.chart-card {
  border: 1px solid var(--border); border-radius: 10px;
  padding: 14px 16px; margin-bottom: 16px; background: var(--surface);
}
.chart-head {
  display: flex; justify-content: space-between; align-items: baseline;
  flex-wrap: wrap; gap: 8px; margin-bottom: 6px; font-size: 14.5px;
}
.chart-head .ch-course { background: #f1f5f9; color: #475569; border-radius: 6px; padding: 1px 7px; font-size: 12px; font-weight: 600; }
.chart-stats { display: flex; gap: 14px; font-size: 13px; color: var(--text-muted); }
.chart-stats .delta-good { color: var(--success); font-weight: 600; }
.chart-stats .delta-bad { color: var(--danger); font-weight: 600; }
.chart-svg { width: 100%; height: auto; display: block; }
.chart-svg .ch-axis { fill: var(--text-muted); font-size: 11px; font-family: inherit; }
.chart-svg .ch-grid { stroke: var(--border); stroke-width: 1; stroke-dasharray: 3 3; }

/* Impresión / PDF */
@media print {
  .sidebar, .toolbar, .no-print, .btn { display: none !important; }
  .content { max-width: none; padding: 0; }
  .panel { border: none; padding: 0; box-shadow: none; }
  body { background: #fff; }
  thead th { color: #000; }
  .print-header { display: block !important; margin-bottom: 14px; }
}
.print-header { display: none; }
.print-header h1 { margin: 0 0 4px; font-size: 20px; }
.print-header p { margin: 2px 0; font-size: 13px; color: #333; }
