/* The admin pages (/admin): counts, the launch checklist, tables, messages and the export. */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.75rem;
  margin: 1.5rem 0 2rem;
  padding: 0;
  list-style: none;
}
.stats li {
  padding: 1rem 1.25rem;
  background: rgb(255 255 255 / 0.6);
  border-radius: 1rem;
}
.stats a { text-decoration: none; }
.stats strong {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
}

.checklist {
  display: grid;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0;
  list-style: none;
}
.checklist li {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.75rem 1rem;
  background: rgb(255 255 255 / 0.6);
  border-left: 4px solid #a0144f;
  border-radius: 0.6rem;
}
.checklist li.is-done { border-left-color: #2e7d32; opacity: 0.75; }
.checklist span { font-size: 0.9rem; }

.admin-table {
  width: 100%;
  margin-top: 1rem;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.admin-table th,
.admin-table td,
.files th,
.files td {
  padding: 0.5rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid rgb(91 58 85 / 0.15);
}

.messages {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 0;
  list-style: none;
}
.message {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  background: rgb(255 255 255 / 0.65);
  border-radius: 1rem;
}
.message.is-handled { opacity: 0.55; }
.message .tool { align-self: flex-start; }
.message-body p + p { margin-top: 0.5rem; }

.export { display: flex; flex-direction: column; gap: 1rem; }
.export h2 { margin-bottom: 0.4rem; font-size: 1.25rem; }
.export-checks ul { padding-left: 1.2rem; }
.export-checks li.is-problem { color: #a0144f; font-weight: 600; }
.export-files { display: flex; flex-direction: column; align-items: flex-start; gap: 0.75rem; }
.export-status { font-weight: 600; }
.files { border-collapse: collapse; font-size: 0.9rem; }
.files td:nth-child(3) { font-family: ui-monospace, monospace; }

/* Templates (/admin/templates): categories, each a list of starter designs with their controls. */
.lede { max-width: 48rem; margin-top: 0.5rem; }
.template-category { margin-top: 2rem; }
.template-category.is-hidden .template-category-bar { opacity: 0.6; }
.template-category-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  padding: 0.6rem 0.9rem;
  background: rgb(255 255 255 / 0.6);
  border-radius: 0.8rem;
}
.inline-form, .template-form, .template-actions, .move-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.6rem;
}
.inline-form input[type=text], .template-form input[type=text], .template-form select {
  padding: 0.3rem 0.5rem;
  font: inherit;
  border: 1px solid rgb(91 58 85 / 0.3);
  border-radius: 0.4rem;
}
.category-name { font-weight: 700; }
.move-buttons { margin-left: auto; }
.move-buttons form, .template-actions form { display: contents; }
.template-list-admin {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
  padding: 0;
  list-style: none;
}
.template-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem;
  background: rgb(255 255 255 / 0.6);
  border-radius: 0.8rem;
}
.template-card.is-hidden { opacity: 0.55; }
.template-preview canvas, .version-preview canvas { display: block; width: 100%; }
.version-preview { width: 12rem; }
.template-info { display: flex; flex-direction: column; gap: 0.4rem; }
.template-form input[type=text] { flex: 1 1 10rem; min-width: 0; }
.template-description-field {
  flex: 1 1 100%;
  padding: 0.4rem 0.5rem;
  font: inherit;
  border: 1px solid rgb(91 58 85 / 0.3);
  border-radius: 0.4rem;
  resize: vertical;
}
.template-excerpt { margin: 0.1rem 0 0.4rem; font-size: 0.85rem; color: rgb(91 58 85 / 0.8); }
.mood-badge, .pick-badge { padding: 0 0.4rem; font-size: 0.75rem; border-radius: 0.5rem; background: rgb(91 58 85 / 0.08); }
.mood-sweet { background: #fde4ef; }
.mood-cheeky { background: #fff1c9; }
.mood-spicy { background: #ffd2d2; }
.pick-badge { background: #e3f4e1; }
.template-paddles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
  gap: 1rem;
  margin: 0.75rem 0 1.5rem;
  padding: 0;
  list-style: none;
}
.template-paddles li { display: flex; flex-direction: column; gap: 0.3rem; }
.template-paddles canvas { width: 100%; }
