* { box-sizing: border-box; }
body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: #f6f8fc;
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: start center;
  padding: 40px 16px;
}
.container {
  width: min(960px, 96vw);
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}
h1 { margin: 0 0 16px; }
.upload-form { display: grid; gap: 10px; margin-bottom: 14px; }
.upload-form input[type="file"] {
  border: 2px dashed #cfd7e6;
  padding: 14px;
  border-radius: 12px;
  background: #fafcff;
}
.upload-form button {
  justify-self: start;
  background: #2563eb;
  color: white;
  padding: 10px 16px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
}
.info { margin: 6px 0 10px; color: #444; }
.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #1e3a8a;
  margin-right: 6px;
  font-size: 12px;
}
.toolbar { display: flex; gap: 8px; margin: 8px 0 12px; }
.toolbar button {
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
}
.toolbar button:hover { background: #f3f4f6; }

.tile-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  min-height: 40px;
  border: 1px dashed #cfd7e6;
  padding: 12px;
  border-radius: 12px;
  background: #fbfdff;
}
.tile {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  cursor: move;
  user-select: none;
}
.tile.dragging {
  opacity: 0.6;
  transform: scale(0.98);
}
.tile-title {
  font-weight: 600;
  font-size: 14px;
  color: #111827;
}
.tile-sub {
  font-size: 12px;
  color: #6b7280;
}

.actions { margin-top: 14px; }
.actions .primary {
  background: #16a34a;
  color: white;
  border: none;
  border-radius: 10px;
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 700;
}
.actions .primary:hover { filter: brightness(0.95); }
