/* admin.html — layered on top of photos.css, which supplies the palette,
   Montserrat, .ghost-btn / .solid-btn, .field and .auth-error. */

.admin-head {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 20px 6px;
  display: flex; flex-wrap: wrap; gap: 14px;
  align-items: center; justify-content: space-between;
}
.admin-kicker {
  margin: 0; font-size: .72rem; font-weight: 800; letter-spacing: .18em;
  text-transform: uppercase; color: var(--ink-faint);
}
.admin-title { margin: 2px 0 0; font-size: 1.5rem; font-weight: 800; color: var(--navy); }
.admin-head-right { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.admin-who { font-size: .85rem; color: var(--ink-soft); }

.admin-wrap { max-width: 1180px; margin: 0 auto; padding: 14px 20px 60px; }

.admin-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  margin-bottom: 20px;
}
.admin-h2 {
  margin: 0 0 6px; font-size: .95rem; font-weight: 800;
  letter-spacing: .1em; text-transform: uppercase; color: var(--navy);
}
.admin-note { margin: 0 0 14px; font-size: .85rem; color: var(--ink-soft); max-width: 68ch; }
.admin-field { display: block; max-width: 420px; margin-bottom: 14px; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

.admin-warn {
  margin: 14px 0 0; padding: 12px 14px;
  border: 1px solid var(--yellow); border-left-width: 5px;
  border-radius: var(--r-ctl);
  background: rgba(255, 191, 26, .12);
  font-size: .86rem; font-weight: 600; color: var(--yellow-ink);
}

/* ---------- Counters ---------- */
.stat-row { display: flex; flex-wrap: wrap; gap: 12px; }
.stat {
  flex: 1 1 180px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-ctl);
  padding: 12px 14px;
}
.stat-label {
  display: block; font-size: .7rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint);
}
.stat-value { font-size: 1.35rem; font-weight: 800; color: var(--navy); }

/* ---------- Play stats ---------- */
.stats-scroll { overflow-x: auto; margin-top: 14px; }
.stats-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 16px; }
.stats-controls select {
  font: inherit; font-weight: 700; color: var(--navy);
  padding: 6px 10px; background: var(--surface);
  border: 1px solid var(--line-firm); border-radius: var(--r-ctl);
}
.stats-controls select:focus-visible { outline: 3px solid var(--navy); outline-offset: 1px; }
.stats-table { width: 100%; border-collapse: collapse; font-size: .85rem; font-variant-numeric: tabular-nums; }
.stats-table th, .stats-table td {
  padding: 8px 10px; text-align: right; white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
.stats-table thead th {
  font-size: .68rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-faint);
}
.stats-table th:first-child { text-align: left; }
.stats-table tbody th { font-weight: 700; color: var(--navy); }
.stats-table tbody td[colspan] { text-align: left; color: var(--ink-soft); }
/* Also used inline in the note above each table, to show what the tag means. */
.new-tag {
  display: inline-block;
  margin-left: 6px; padding: 2px 6px; border-radius: 999px;
  font-size: .66rem; font-weight: 800; letter-spacing: .04em;
  border: 1px solid var(--green); color: var(--green);
}

/* ---------- Upload slots ---------- */
.slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.slot {
  border: 1px solid var(--line);
  border-radius: var(--r-ctl);
  background: var(--surface-2);
  padding: 10px;
  display: flex; flex-direction: column; gap: 8px;
}
.slot-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  background: #fff;
  border: 1px dashed var(--line-firm);
  overflow: hidden;
  display: grid; place-items: center;
}
.slot-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slot-num {
  position: absolute; top: 6px; left: 8px;
  font-size: .72rem; font-weight: 800; color: var(--ink-faint);
}
.slot-name {
  font: inherit; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  padding: 7px 9px; border: 1px solid var(--line-firm); border-radius: 8px; background: #fff; color: var(--ink);
}
.slot-name:focus-visible, .slot-file:focus-visible { outline: 3px solid var(--navy); outline-offset: 1px; }
.slot-file { font-size: .75rem; }

.pack-check { margin: 14px 0 0; font-size: .85rem; font-weight: 600; color: var(--ink-soft); }
.pack-check.good { color: var(--green); }
.pack-check.bad  { color: var(--red); }

/* ---------- Pack list ---------- */
.pack-list { display: flex; flex-direction: column; gap: 14px; }
.pack {
  border: 1px solid var(--line);
  border-radius: var(--r-ctl);
  padding: 14px;
  background: var(--surface-2);
}
.pack.live { border-color: var(--navy); box-shadow: inset 4px 0 0 var(--navy); }
.pack.archived { opacity: .82; }
.pack-head { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: flex-start; }
.pack-name { margin: 0; font-size: 1rem; font-weight: 800; color: var(--navy); }
.pack-meta { margin: 2px 0 0; font-size: .78rem; color: var(--ink-faint); }
.pack-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  padding: 4px 8px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line-firm); color: var(--ink-soft);
}
.tag.live   { background: var(--navy); border-color: var(--navy); color: #fff; }
.tag.pinned { background: rgba(255, 191, 26, .2); border-color: var(--yellow); color: var(--yellow-ink); }
.tag.unused { border-color: var(--green); color: var(--green); }

.pack-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 8px;
  margin: 12px 0 0;
}
.pack-thumbs figure { margin: 0; }
.pack-thumbs img {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block;
  border-radius: 8px; border: 1px solid var(--line);
}
.pack-thumbs figcaption {
  margin-top: 3px; font-size: .68rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--ink-soft); text-align: center;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pack-thumbs .reveal { display: flex; justify-content: center; gap: 2px; overflow: visible; }
.reveal button {
  flex: 0 1 20px; min-width: 0; height: 22px; padding: 0;
  font: inherit; color: var(--ink-soft); cursor: pointer;
  background: var(--surface); border: 1px solid var(--line-firm); border-radius: 4px;
}
.reveal button[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: #fff; }
.reveal button:focus-visible { outline: 2px solid var(--navy); outline-offset: 1px; }

.pack-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.ghost-btn.danger { color: var(--red); border-color: rgba(227, 25, 25, .35); }
.ghost-btn.danger:hover { border-color: var(--red); }

@media (max-width: 560px) {
  .admin-head { padding-top: 16px; }
  .slots { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}

.pack-schedule { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-top: 16px; }
.pack-schedule .field { max-width: 240px; }
.pack-schedule .pack-actions { margin-top: 0; }
