/* ---------- Base reset ---------- */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: #f6f7f9;
  color: #1f2937;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, sans-serif;
  line-height: 1.5;
}

/* ---------- Layout ---------- */
.app {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px;
}

.header {
  margin-bottom: 16px;
}

.header h1 {
  font-size: 1.4rem;
  margin: 0;
}

/* ---------- Cards ---------- */
.card {
  background: #ffffff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.05);
}

.card h2 {
  font-size: 1.1rem;
  margin: 0 0 12px 0;
}

/* ---------- Forms ---------- */
label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 4px;
}

input[type="text"],
input[type="file"],
select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  font-size: 0.95rem;
  background: #fff;
}

input:focus,
select:focus {
  outline: none;
  border-color: #6366f1;
}

/* ---------- Buttons ---------- */
button {
  appearance: none;
  border: none;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  background: #6366f1;
  color: #fff;
}

button.secondary {
  background: #e5e7eb;
  color: #111827;
}

button.full {
  width: 100%;
}

/* ---------- Alerts ---------- */
.alert {
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.alert.success {
  background: #ecfdf5;
  color: #065f46;
}

.alert.error {
  background: #fef2f2;
  color: #991b1b;
}

/* ---------- Tables (mobile friendly) ---------- */
.table {
  width: 100%;
  border-collapse: collapse;
}

.table th {
  text-align: left;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: #6b7280;
  padding: 8px 4px;
}

.table td {
  padding: 10px 4px;
  border-top: 1px solid #e5e7eb;
  font-size: 0.9rem;
}

/* ---------- Media previews ---------- */
.thumb {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  object-fit: cover;
}

/* ---------- Footer links ---------- */
.back-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.85rem;
  color: #6366f1;
  text-decoration: none;
}

/* ---------- Desktop enhancements ---------- */
@media (min-width: 768px) {
  .header h1 {
    font-size: 1.8rem;
  }

  .card {
    padding: 20px;
  }
}
.media-thumb {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}

.media-thumb--carousel {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
}
