/* ============================================================
   DETAIL VIEW — Vista de administración / resultados
   ============================================================ */
.detail-view {
  flex-direction: column;
  min-height: 100vh;
  background: var(--surface);
}

.detail-content {
  padding: clamp(1rem, 3vw, 2rem);
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  flex: 1;
}

/* ── Stat cards (fila resumen) ── */
.stat-card {
  background: var(--surface-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.2rem 1.4rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s;
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
}

.stat-value {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--bb-bronze-dark);
  line-height: 1;
  letter-spacing: -.03em;
}

.stat-label {
  font-size: .78rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: .3rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ── Tarjeta genérica ── */
.card-soft {
  background: var(--surface-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-header-soft {
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-warm);
}

.card-header-soft h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -.01em;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.card-body-soft {
  padding: 1.3rem 1.5rem;
}

/* ── Panel de tabs ── */
.tab-panel {
  display: none;
}
.tab-panel.active {
  display: block;
}

/* ── Tabla ── */
.table-soft {
  font-size: .88rem;
  width: 100%;
  border-collapse: collapse;
}

.table-soft thead th {
  font-weight: 700;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
  padding: .8rem 1.1rem;
  background: var(--surface-warm);
  white-space: nowrap;
}

.table-soft tbody td {
  padding: .85rem 1.1rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
  vertical-align: middle;
}

.table-soft tbody tr:last-child td {
  border-bottom: none;
}

.table-soft tbody tr:hover {
  background: rgba(186,157,121,.04);
}

.table-soft tbody tr.es-ganador {
  background: rgba(227,205,174,.12);
}

.table-soft tbody tr.es-ganador:hover {
  background: rgba(227,205,174,.2);
}

/* ── Barra de probabilidad ── */
.prob-bar {
  width: 100%;
  max-width: 120px;
  height: 6px;
  background: var(--border-light);
  border-radius: 3px;
  overflow: hidden;
}

.prob-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--bb-bronze-dark), var(--bb-bronze-light));
  border-radius: 3px;
  transition: width .4s ease;
}

/* ── Reglas ── */
.regla-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-light);
}

.regla-item:last-child {
  border-bottom: none;
}

.regla-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(186,157,121,.12);
  color: var(--bb-bronze-dark);
  font-weight: 700;
  font-size: .8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(186,157,121,.2);
}

.regla-text {
  font-size: .9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.regla-text strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .detail-content { padding: 1rem; }
  .table-soft { font-size: .82rem; }
  .table-soft thead th,
  .table-soft tbody td { padding: .65rem .7rem; }
}

/* ═══════════════════════════════════════════════════════
   NUEVOS COMPONENTES — Premios, Badges, Ganadores
   ═══════════════════════════════════════════════════════ */

/* ── Badge de posición (medallones) ── */
.badge-posicion {
  display: inline-block;
  padding: .22rem .55rem;
  border-radius: 6px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge-posicion.oro {
  background: linear-gradient(135deg, #d4b030, #e8cc50);
  color: #4a3800;
}

.badge-posicion.plata {
  background: linear-gradient(135deg, #a0a0b8, #c8c8d8);
  color: #2a2a40;
}

.badge-posicion.bronce {
  background: linear-gradient(135deg, var(--bb-bronze-dark), var(--bb-bronze));
  color: #fff;
}

.badge-posicion.normal {
  background: var(--bb-bronze-bg);
  color: var(--bb-bronze-dark);
  border: 1px solid var(--bb-bronze-border);
}


/* ── Grid de premios ── */
.premios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 1rem;
  padding: 1.2rem 1.5rem;
}

.premio-card {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-alt);
  transition: box-shadow .18s, transform .18s;
}

.premio-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.premio-card.is-awarded {
  border-color: var(--bb-bronze-border);
  background: var(--surface-warm);
}

.premio-card-img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  display: block;
}

.premio-card-img-placeholder {
  width: 100%;
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 2rem;
  opacity: .5;
}

.premio-card-body {
  padding: .8rem .95rem;
}

.premio-card-desc {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: .38rem 0 .55rem;
  line-height: 1.3;
}

.premio-card-ganador {
  font-size: .76rem;
  color: var(--bb-bronze-dark);
  font-weight: 600;
  display: flex;
  flex-direction: column;
  gap: .05rem;
}

.premio-card-ganador span {
  color: var(--text-muted);
  font-weight: 400;
  font-size: .7rem;
}

.premio-card-pendiente {
  font-size: .73rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ── Empty state genérico ── */
.empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 2rem;
  display: block;
  margin-bottom: .5rem;
  opacity: .35;
}

.empty-state p {
  margin: 0;
  font-size: .88rem;
}

/* ── Responsive grid ── */
@media (max-width: 600px) {
  .premios-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: .75rem;
    padding: .8rem;
  }
  .premio-card-img,
  .premio-card-img-placeholder { height: 100px; }
}
