/* Imago MVP — minimal dark theme */
:root {
  --bg: #0b1220;
  --surface: #131c2e;
  --surface-2: #1d2942;
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #60a5fa;
  --warn: #fbbf24;
  --danger: #f87171;
  --radius: 10px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: var(--surface);
  border-bottom: 1px solid #1f2937;
  position: sticky; top: 0; z-index: 10;
}
.brand { display: flex; align-items: baseline; gap: 6px; text-decoration: none; color: var(--text); }
.brand-mark { font-size: 22px; color: var(--accent); }
.brand-text { font-weight: 700; font-size: 18px; }
.brand-tag { color: var(--muted); font-size: 13px; }
.topbar nav a {
  color: var(--muted); text-decoration: none; padding: 6px 12px;
  border-radius: var(--radius); transition: background .12s;
}
.topbar nav a:hover { background: var(--surface-2); color: var(--text); }
.topbar nav a.active { background: var(--surface-2); color: var(--accent); }

main { padding: 28px 24px; max-width: 1400px; margin: 0 auto; }

.grid-meta h1 { margin: 0 0 6px; font-weight: 600; }
.grid-meta p { margin: 0 0 24px; color: var(--muted); }
.grid-meta-row {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 24px; margin-bottom: 8px;
}
.btn-shortlist {
  background: var(--accent); color: #000;
  white-space: nowrap; align-self: center;
}
.btn-shortlist:hover:not([disabled]) { background: #93c5fd; }
.btn-shortlist:disabled {
  background: var(--surface-2); color: var(--muted); cursor: not-allowed;
}

.grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}
.card {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 12px;
  transition: transform .15s, box-shadow .15s;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0,0,0,.35); }
.card[data-fav="true"] { outline: 2px solid var(--warn); }
.fav {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  background: rgba(0,0,0,.4); color: var(--warn); border: none;
  width: 32px; height: 32px; border-radius: 999px; cursor: pointer;
  font-size: 18px; line-height: 1;
}
.fav.is-fav { background: var(--warn); color: #000; }
.thumb-wrap { display: block; aspect-ratio: 1/1; background: var(--surface-2); border-radius: 8px; overflow: hidden; }
.thumb { width: 100%; height: 100%; object-fit: contain; padding: 12px; }
.meta { display: flex; flex-direction: column; padding: 10px 4px 2px; }
.meta .title { font-weight: 600; font-size: 14px; }
.meta .slug { color: var(--muted); font-size: 12px; }

.detail {
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px;
  align-items: start;
}
.detail-art {
  background: var(--surface); border-radius: var(--radius); padding: 32px;
  aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center;
}
.detail-art img { width: 100%; height: 100%; object-fit: contain; }
.detail-info h1 { margin-top: 0; }
.detail-info .slug { color: var(--muted); }
.tag { display: inline-block; padding: 3px 10px; background: var(--surface-2); border-radius: 999px; font-size: 12px; margin: 0 6px 6px 0; color: var(--muted); }
.actions { display: flex; gap: 12px; margin-top: 20px; }

.btn {
  display: inline-block; padding: 10px 18px; border-radius: var(--radius);
  background: var(--surface-2); color: var(--text); border: none;
  text-decoration: none; cursor: pointer; font: inherit;
}
.btn:hover { background: #2a3a5e; }
.btn-promote { background: var(--warn); color: #000; }
.btn-promote:hover { background: #fcd34d; }
.btn-reject { background: var(--danger); color: #000; }
.btn-reject:hover { background: #fca5a5; }
.btn-keep { background: var(--accent); color: #000; }
.btn-keep:hover { background: #93c5fd; }
.btn-clear { background: transparent; color: var(--muted); border: 1px solid var(--surface-2); }

/* Reject modal */
.modal {
  border: 1px solid #1f2937; border-radius: var(--radius);
  background: var(--surface); color: var(--text);
  padding: 24px; max-width: 520px; width: 92%;
}
.modal::backdrop { background: rgba(0, 0, 0, 0.6); }
.modal h2 { margin: 0 0 8px; }
.modal-help { color: var(--muted); margin: 0 0 18px; font-size: 13px; }
.modal label {
  display: block; margin-bottom: 14px; font-size: 13px; color: var(--muted);
}
.modal input, .modal select, .modal textarea {
  display: block; width: 100%; margin-top: 6px; padding: 8px 10px;
  background: var(--surface-2); color: var(--text);
  border: 1px solid #1f2937; border-radius: 6px; font: inherit;
}
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }

/* Bank page */
.bank-filters {
  display: flex; gap: 16px; align-items: end; flex-wrap: wrap;
  padding: 14px 18px; background: var(--surface); border-radius: var(--radius);
  margin-bottom: 24px;
}
.bank-filters label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 12px; color: var(--muted);
}
.bank-filters select {
  padding: 6px 10px; background: var(--surface-2); color: var(--text);
  border: 1px solid #1f2937; border-radius: 6px; font: inherit;
}
.bank-empty {
  padding: 60px; text-align: center; color: var(--muted);
  background: var(--surface); border-radius: var(--radius);
}
.bank-card .meta { gap: 4px; }
.bank-card.status-rejected .thumb-wrap { outline: 2px solid var(--danger); outline-offset: -2px; }
.bank-card.status-kept-for-inspiration .thumb-wrap { outline: 2px solid var(--accent); outline-offset: -2px; }
.bank-card.status-promoted .thumb-wrap { outline: 2px solid var(--warn); outline-offset: -2px; }
.bank-status {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; text-transform: uppercase; margin-top: 4px; align-self: flex-start;
}
.badge-rejected { background: rgba(248, 113, 113, 0.15); color: var(--danger); }
.badge-kept-for-inspiration { background: rgba(96, 165, 250, 0.15); color: var(--accent); }
.badge-promoted { background: rgba(251, 191, 36, 0.15); color: var(--warn); }
.bank-reason {
  margin-top: 6px; font-size: 12px; color: var(--muted); line-height: 1.4;
}

.promote-log {
  margin-top: 16px; padding: 12px; background: #000; color: #cfeaff;
  border-radius: 6px; max-height: 240px; overflow: auto; white-space: pre-wrap;
  font-size: 12px;
}

.preview-strip {
  display: flex; gap: 14px; align-items: center;
  padding: 12px; background: var(--surface); border-radius: var(--radius);
  margin-bottom: 12px;
}
.preview-strip .preview-current { flex: 1; color: var(--muted); }
.preview-frame {
  width: 100%; height: calc(100vh - 180px);
  border: 1px solid #1f2937; border-radius: var(--radius);
  background: #fff;
}

@media (max-width: 1100px) { .grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 800px)  { .grid { grid-template-columns: repeat(3, 1fr); } .detail { grid-template-columns: 1fr; } }
@media (max-width: 540px)  { .grid { grid-template-columns: repeat(2, 1fr); } }
