/* Changelog → X — admin-only tool. Scoped to #changelogRoot so nothing here can
   reach the rest of the app. Uses the app's existing tokens (--surface, --border…)
   and .btn classes, so it inherits any future theme change for free. */

#changelogRoot { max-width: 820px; }

.cl-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}
.cl-head h1 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 6px;
}
.cl-head-actions { display: flex; gap: 8px; flex-shrink: 0; }
.cl-sub { color: var(--text-muted); font-size: 13px; margin: 0; }

/* ─── Batch list ───────────────────────────────────────────────────────────── */

.cl-batches { display: flex; flex-direction: column; gap: 8px; }
.cl-batch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  cursor: pointer;
  transition: border-color .15s, transform .15s;
  color: var(--text);
  font-family: var(--font);
}
.cl-batch:hover { border-color: var(--accent); transform: translateY(-1px); }
.cl-batch-title { font-size: 14px; font-weight: 600; margin-bottom: 3px; }
.cl-batch-meta { font-size: 12px; color: var(--text-muted); }
.cl-batch-arrow { color: var(--text-dim); font-size: 22px; line-height: 1; }
.cl-pill-draft { color: var(--accent); }

.cl-empty {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 44px 32px;
  text-align: center;
}
.cl-empty p { margin: 0 0 10px; }
.cl-empty .cl-sub { max-width: 420px; margin: 0 auto 20px; }

/* ─── Compose form ─────────────────────────────────────────────────────────── */

.cl-form { display: flex; flex-direction: column; gap: 18px; }
.cl-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 680px) { .cl-row { grid-template-columns: 1fr; } }

.cl-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.cl-opt { font-weight: 400; color: var(--text-dim); font-size: 12px; }
.cl-hint { font-size: 12px; color: var(--text-muted); font-weight: 400; }
.cl-hint-indent { margin: -10px 0 0 26px; }

.cl-check {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  cursor: pointer;
  font-weight: 600;
}
.cl-check input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.cl-check-inline { font-weight: 400; }

#clSource { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 12.5px; line-height: 1.6; }

.cl-progress-wrap { padding: 40px 0; text-align: center; }
.cl-progress {
  height: 6px;
  background: var(--surface2);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 14px;
}
.cl-progress-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 99px;
  transition: width .4s ease;
}

/* ─── Bulk bar ─────────────────────────────────────────────────────────────── */

.cl-bulk {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 16px;
  margin-bottom: 16px;
  position: sticky;
  top: 12px;
  z-index: 5;
}
.cl-bulk-count { font-size: 12px; color: var(--text-muted); margin-left: auto; }

/* ─── Post cards ───────────────────────────────────────────────────────────── */

.cl-list { display: flex; flex-direction: column; gap: 10px; }
.cl-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.cl-card-over { border-color: var(--danger); }

.cl-card-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.cl-sel { display: flex; align-items: center; }
.cl-sel input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.cl-sel-spacer { display: inline-block; width: 16px; }

.cl-ver {
  font-size: 11px;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  color: var(--text-muted);
  background: var(--surface2);
  border-radius: 5px;
  padding: 2px 7px;
}
.cl-count { margin-left: auto; font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.cl-count-over { color: var(--danger); font-weight: 600; }

.cl-badge {
  font-size: 11px;
  font-weight: 600;
  border-radius: 5px;
  padding: 2px 8px;
  background: var(--surface2);
  color: var(--text-muted);
}
.cl-badge-sched { background: rgba(61,99,221,.15); color: var(--accent-hover); }
.cl-badge-ok    { background: rgba(16,185,129,.15); color: var(--success); }
.cl-badge-bad   { background: rgba(239,68,68,.15); color: var(--danger); }

.cl-text {
  width: 100%;
  min-height: 72px;
  font-size: 14px;
  line-height: 1.55;
  resize: vertical;
}
.cl-text[readonly] { opacity: .75; cursor: default; }

.cl-src { margin-top: 8px; }
.cl-src summary {
  font-size: 12px;
  color: var(--text-dim);
  cursor: pointer;
  list-style: none;
}
.cl-src summary::-webkit-details-marker { display: none; }
.cl-src summary::before { content: '▸ '; }
.cl-src[open] summary::before { content: '▾ '; }
.cl-src summary:hover { color: var(--text-muted); }
.cl-src p {
  font-size: 12px;
  color: var(--text-muted);
  margin: 8px 0 0;
  padding-left: 14px;
  border-left: 2px solid var(--border);
  white-space: pre-wrap;
}

.cl-err { font-size: 12px; color: var(--danger); margin: 8px 0 0; }

.cl-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}
.cl-btn-sm { padding: 6px 12px !important; font-size: 12px !important; }
.cl-when {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text);
  font-family: var(--font);
  font-size: 12px;
  padding: 5px 9px;
  width: auto;
  margin-left: auto;
}

/* ─── Bulk schedule modal ──────────────────────────────────────────────────── */

.cl-modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}
.cl-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 26px;
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.cl-modal h3 { margin: 0; font-size: 17px; }
.cl-times { display: flex; flex-wrap: wrap; gap: 8px; }
.cl-time {
  width: auto !important;
  flex: 0 0 auto;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  padding: 7px 10px;
}
.cl-time:focus { border-color: var(--accent); outline: none; }
.cl-modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
