/* ── Admin console ────────────────────────────────────────
   Stat cards with an icon chip and a trend delta — denser and more scannable
   than the product dashboard's tiles, because an operator reads twenty numbers
   at once. */

.stat-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 12px;
}

.stat-card {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  padding: 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--bg-raised);
  min-width: 0;
}

.stat-card-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  flex: none;
}

.stat-card-icon svg { width: 17px; height: 17px; }
.stat-card-icon.is-warn { background: rgba(214, 165, 92, 0.12); color: var(--warn); }

.stat-card-body { min-width: 0; }
.stat-card-value { font-size: 25px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.stat-card-label { font-size: 12.5px; color: var(--subtle); margin-top: 3px; }

.stat-card-delta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 7px;
  padding: 2px 9px;
  border-radius: var(--r-pill);
  font-size: 11.5px;
  font-weight: 500;
  background: rgba(111, 191, 143, 0.12);
  color: var(--good);
}

.stat-card-delta.is-flat { background: var(--surface-hi); color: var(--subtle); }
.stat-card-delta.is-bad { background: rgba(217, 128, 128, 0.12); color: var(--danger); }

/* Load-more row under long lists */
.admin-more { display: flex; align-items: center; justify-content: center; gap: 12px; padding-top: 6px; }

/* ── X posts ──────────────────────────────────────────────
   The simulator result is drawn as the post it would become — judging voice
   needs the shape of a tweet, not a settings row. The ledger is content-first
   for the same reason: the operator scans what the account said. */

.x-preview {
  display: flex;
  gap: 12px;
  padding: 16px 18px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--bg-raised);
}

.x-preview-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  font-size: 17px;
  flex: none;
}

.x-preview-name { font-size: 13.5px; font-weight: 600; }
.x-preview-name span { color: var(--subtle); font-weight: 400; margin-left: 6px; }

.x-preview-text {
  margin: 4px 0 8px;
  font-size: 15.5px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.x-post-list { display: flex; flex-direction: column; }

.x-post-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 13px 2px;
  border-top: 1px solid var(--line);
}
.x-post-row:first-child { border-top: 0; }

.x-post-row .chip { flex: none; margin-top: 2px; }

.x-post-main { flex: 1; min-width: 0; }

.x-post-text {
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.x-post-meta { font-size: 12.5px; color: var(--subtle); margin-top: 4px; }
.x-post-meta .is-warn { color: var(--warn); }

.x-post-actions { display: flex; gap: 2px; flex: none; }

/* Interval and budget sit side by side with their units visible. */
.x-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}
.x-settings-grid .input { width: 100%; }

@media (max-width: 700px) {
  .x-preview { padding: 13px; }
  .x-post-row { flex-wrap: wrap; }
}

@media (max-width: 700px) {
  .stat-card-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
  .stat-card { padding: 13px; gap: 10px; }
  .stat-card-icon { width: 32px; height: 32px; border-radius: 9px; }
  .stat-card-value { font-size: 21px; }
}
