/* ============================================================
   KPOP GALA — REGISTRO.CSS
   Estilos del formulario de registro semanal
   ============================================================ */

/* ── Layout del formulario ───────────────────────────────────── */
.form-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 768px) {
  .form-container { grid-template-columns: 1fr; }
}

/* ── Card del formulario ─────────────────────────────────────── */
.form-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}
.form-card.p1-card { border-top: 4px solid var(--rosa); }
.form-card.p2-card { border-top: 4px solid var(--cyan); }

.form-card-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}
.form-card-title .person-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 900;
  color: #fff;
  flex-shrink: 0;
}
.p1-card .person-icon { background: linear-gradient(135deg, var(--rosa), var(--violeta)); }
.p2-card .person-icon { background: linear-gradient(135deg, var(--cyan), var(--verde)); }

.form-card-title h2 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.1rem;
  color: var(--text);
}
.form-card-title p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ── Campos del formulario ───────────────────────────────────── */
.form-grid {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.pos-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.3rem;
}
.pos-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  border-radius: 99px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 0.78rem;
  background: var(--surface2);
  color: var(--text-muted);
  border: 1.5px solid var(--border);
}
.pos-badge.top { background: linear-gradient(135deg, var(--amarillo), #f59e0b); color: #fff; border-color: transparent; }

/* Puntos preview */
.pts-preview {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--surface2);
  border-radius: var(--radius-md);
  margin-top: 0.5rem;
}
.pts-preview .pts-val {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.4rem;
  background: linear-gradient(135deg, var(--rosa), var(--violeta));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.p2-card .pts-preview .pts-val {
  background: linear-gradient(135deg, var(--cyan), var(--verde));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.pts-preview .pts-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ── Semana selector global ──────────────────────────────────── */
.semana-selector {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
}
.semana-selector label {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--text-soft);
  white-space: nowrap;
}
.semana-selector select {
  flex: 1;
  min-width: 200px;
  padding: 0.6rem 2.5rem 0.6rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23f472b6' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.semana-selector select:focus {
  border-color: var(--rosa);
  box-shadow: 0 0 0 3px var(--rosa-glow);
}
.semana-chip {
  padding: 0.45rem 1rem;
  background: linear-gradient(135deg, var(--rosa-glow), var(--violeta-glow));
  border: 1.5px solid rgba(244, 114, 182, 0.3);
  border-radius: 99px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.8rem;
  color: var(--rosa);
  white-space: nowrap;
}

/* ── Historial reciente ──────────────────────────────────────── */
.historial-section {
  margin-top: 2.5rem;
}
.historial-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.historial-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 0.25rem;
}
.historial-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  transition: border-color 0.2s;
}
.historial-item:hover { border-color: rgba(244,114,182,0.3); }
.historial-item .hi-pos {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1rem;
  color: var(--text-muted);
  min-width: 2rem;
  text-align: center;
}
.historial-item .hi-name {
  flex: 1;
  font-weight: 600;
  color: var(--text);
}
.historial-item .hi-rep {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.historial-item .hi-pts {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 0.9rem;
  color: var(--rosa);
}
.historial-item.p2-item .hi-pts { color: var(--cyan); }

/* Botón eliminar */
.btn-delete {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(244,114,182,0.1);
  border: none;
  color: var(--rosa);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
.btn-delete:hover {
  background: var(--rosa);
  color: #fff;
}

/* Botón Editar */
.btn-edit {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(34, 211, 238, 0.1); /* Tono cyan suave */
  border: none;
  color: var(--cyan);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
.btn-edit:hover {
  background: var(--cyan);
  color: #fff;
}

/* Contenedor de acciones en el historial */
.historial-actions {
  display: flex;
  gap: 0.35rem;
}