/* editions.css - admin page for Circular Light limited-edition prints */

:root {
  --teal: #5BA5B0;
  --ink: #1a1d1f;
  --muted: #6b7177;
  --line: #e6e8ea;
  --bg: #f6f7f8;
  --card: #fff;
  --ok: #2e9e6b;
  --ok-bg: #e8f6ef;
  --warn: #b9821f;
  --warn-bg: #faf1dd;
  --danger: #b23b3b;
}

* { box-sizing: border-box; }
.is-hidden { display: none !important; }

.ed-body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}

/* Header */
.ed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.25rem;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.ed-logo { font-weight: 800; font-size: 1.1rem; text-decoration: none; color: var(--ink); }
.ed-logo span { color: var(--teal); }
.ed-nav a {
  margin-left: 1rem;
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
}
.ed-nav a.is-active { color: var(--teal); }

/* Layout */
.ed-main { max-width: 920px; margin: 0 auto; padding: 1.5rem 1.25rem 4rem; }
.ed-title { font-size: 1.7rem; margin: 0.5rem 0 0.25rem; }
.ed-sub { color: var(--muted); margin: 0 0 1.5rem; max-width: 640px; }

.ed-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}
.ed-card h2 { margin: 0 0 1rem; font-size: 1.15rem; }
.ed-card-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.ed-card-head h2 { margin: 0; }

/* Forms */
.ed-form { display: block; }
.ed-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.9rem;
}
.req { color: var(--danger); }
.ed-form input[type="text"],
.ed-form input[type="number"],
.ed-form input[type="password"],
.ed-form select {
  display: block;
  width: 100%;
  margin-top: 0.3rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--ink);
}
.ed-form input:focus,
.ed-form select:focus { outline: 2px solid var(--teal); outline-offset: 1px; border-color: var(--teal); }
.ed-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.ed-grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 1rem; }

/* Picker */
.ed-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 0.4rem;
  max-height: 240px;
  overflow-y: auto;
  padding: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  margin-bottom: 1rem;
}
.ed-pick {
  padding: 0; border: 2px solid transparent; border-radius: 8px;
  background: none; cursor: pointer; aspect-ratio: 1/1; overflow: hidden;
}
.ed-pick img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ed-pick.is-sel { border-color: var(--teal); }
.ed-pick:focus { outline: 2px solid var(--teal); outline-offset: 1px; }

/* Buttons */
.ed-actions { display: flex; align-items: center; gap: 0.8rem; margin-top: 0.5rem; }
.ed-btn {
  background: var(--teal); color: var(--card); border: none; font-weight: 700;
  padding: 0.6rem 1.2rem; border-radius: 8px; cursor: pointer; font-size: 0.95rem;
}
.ed-btn:hover { filter: brightness(0.96); }
.ed-btn:disabled { opacity: 0.6; cursor: default; }
.ed-btn--outline { background: var(--card); color: var(--teal); border: 1px solid var(--teal); }

.ed-msg { font-size: 0.85rem; color: var(--muted); }
.ed-msg--err { color: var(--danger); }

/* List */
.ed-empty { color: var(--muted); padding: 1rem 0; }
.ed-group { margin-bottom: 1.5rem; }
.ed-group h3 { font-size: 1rem; margin: 0 0 0.6rem; padding-bottom: 0.4rem; border-bottom: 1px solid var(--line); }
.ed-item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
}
.ed-item:last-child { border-bottom: none; }
.ed-qr { width: 52px; height: 52px; flex-shrink: 0; background: var(--card); border: 1px solid var(--line); border-radius: 6px; }
.ed-info { flex: 1; min-width: 0; }
.ed-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--bg); padding: 0.1rem 0.4rem; border-radius: 4px;
  font-size: 0.82rem; margin-left: 0.4rem; letter-spacing: 0.04em;
}
.ed-meta { font-size: 0.8rem; color: var(--muted); margin-top: 0.2rem; }
.ed-status { font-weight: 700; text-transform: capitalize; }
.ed-status--active { color: var(--ok); }
.ed-status--sold { color: var(--warn); }
.ed-status--void { color: var(--danger); }

.ed-item-acts { display: flex; gap: 0.35rem; flex-wrap: wrap; justify-content: flex-end; }
.ed-mini {
  background: var(--card); border: 1px solid var(--line); color: var(--ink);
  font-size: 0.78rem; padding: 0.32rem 0.6rem; border-radius: 6px; cursor: pointer;
}
.ed-mini:hover { border-color: var(--teal); color: var(--teal); }
.ed-mini--danger:hover { border-color: var(--danger); color: var(--danger); }

@media (max-width: 640px) {
  .ed-grid2, .ed-grid3 { grid-template-columns: 1fr; }
  .ed-item { flex-wrap: wrap; }
  .ed-item-acts { width: 100%; justify-content: flex-start; }
}
