* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: #111827;
  color: #f9fafb;
  font-family: Arial, Helvetica, sans-serif;
  min-height: 100vh;
}

.encabezado {
  padding: 30px 20px;
  text-align: center;
  background: #1f2937;
  border-bottom: 1px solid #374151;
}

.encabezado h1 {
  font-size: 2rem;
  margin-bottom: 10px;
}

.encabezado p {
  color: #d1d5db;
}

.contenedor {
  max-width: 1200px;
  margin: 30px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 25px;
}

.panel-formulario,
.panel-lista {
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: 14px;
  padding: 20px;
}

.panel-formulario h2,
.panel-lista h2 {
  margin-bottom: 18px;
}

#serieForm {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#serieForm input,
#serieForm textarea,
#serieForm button {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #4b5563;
  font-size: 0.95rem;
}

#serieForm input,
#serieForm textarea {
  background: #111827;
  color: #f9fafb;
}

#serieForm textarea {
  min-height: 110px;
  resize: vertical;
}

#serieForm button {
  background: #2563eb;
  color: white;
  border: none;
  cursor: pointer;
  font-weight: bold;
}

#serieForm button:hover {
  background: #1d4ed8;
}

.grid-series {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

.tarjeta-serie {
  background: #111827;
  border: 1px solid #374151;
  border-radius: 14px;
  overflow: hidden;
}

.tarjeta-serie img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
}

.tarjeta-contenido {
  padding: 14px;
}

.tarjeta-contenido h3 {
  margin-bottom: 8px;
}

.tarjeta-contenido p {
  font-size: 0.9rem;
  color: #d1d5db;
  margin-bottom: 6px;
}

@media (max-width: 900px) {
  .contenedor {
    grid-template-columns: 1fr;
  }
}

.acciones-tarjeta {
  margin-top: 14px;
  display: flex;
  gap: 10px;
}

.btn-eliminar {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 10px;
  background: #dc2626;
  color: white;
  font-weight: bold;
  cursor: pointer;
}

.btn-eliminar:hover {
  background: #b91c1c;
}

.btn-editar {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 10px;
  background: #2563eb;
  color: white;
  font-weight: bold;
  cursor: pointer;
}

.btn-editar:hover {
  background: #1d4ed8;
}

.barra-controles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.barra-controles input,
.barra-controles select,
.barra-controles button {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #4b5563;
  background: #111827;
  color: #f9fafb;
  font-size: 0.95rem;
}

.barra-controles button {
  background: #2563eb;
  border: none;
  cursor: pointer;
  font-weight: bold;
}

.barra-controles button:hover {
  background: #1d4ed8;
}

.paginacion {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
}

.paginacion button {
  padding: 10px 16px;
  border: none;
  border-radius: 10px;
  background: #374151;
  color: white;
  cursor: pointer;
  font-weight: bold;
}

.paginacion button:hover {
  background: #4b5563;
}

#btnExportarCSV {
  background: #059669;
  border: none;
  cursor: pointer;
  font-weight: bold;
}

#btnExportarCSV:hover {
  background: #047857;
}