:root {
  --bg: #0f172a;
  --panel: #111827;
  --line: #243044;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --brand: #60a5fa;
  --ok: #22c55e;
  --warn: #f59e0b;
  --danger: #ef4444;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, system-ui, Arial, sans-serif;
  background: linear-gradient(180deg, #0b1222, #0f172a);
  color: var(--text);
}
.topbar {
  position: sticky; top: 0;
  z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 20px;
  background: rgba(2,6,23,.9);
  border-bottom: 1px solid var(--line);
}
.topbar .brand { font-weight: 700; }
.topbar a { color: var(--muted); text-decoration: none; margin-left: 14px; }
.topbar a.active, .topbar a:hover { color: var(--brand); }
.container { max-width: 1100px; margin: 20px auto 40px; padding: 0 14px; }
.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}
.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}
.stat .label { color: var(--muted); font-size: 12px; }
.stat .value { font-size: 26px; font-weight: 700; margin-top: 4px; }
.panel {
  margin-top: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}
.filters { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.filters p { color: var(--muted); margin: 4px 0 0; font-size: 13px; }
.filters .right { display: flex; gap: 8px; }
select {
  background: #0f172a;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
}
.board {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
}
.card {
  background: #0f172a;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
}
.meta { display:flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.badges { display:flex; gap: 6px; }
.badge {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
}
.badge.x { color: #93c5fd; border-color: #1d4ed8; }
.badge.threads { color: #fca5a5; border-color: #991b1b; }
.badge.facebook { color: #a5b4fc; border-color: #3730a3; }
.badge.draft { color: #facc15; border-color: #854d0e; }
.badge.approved { color: #86efac; border-color: #166534; }
.badge.revise { color: #fdba74; border-color: #9a3412; }
.badge.posted { color: #93c5fd; border-color: #1d4ed8; }
.text {
  white-space: pre-wrap;
  line-height: 1.4;
  font-size: 14px;
  color: #e2e8f0;
  border-left: 2px solid #22324d;
  padding-left: 10px;
  margin: 8px 0;
  min-height: 116px;
}
.controls { display:flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.btn {
  border: 1px solid var(--line);
  background: #17243b;
  color: var(--text);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 12px;
}
.btn:hover { border-color: #3b82f6; }
.btn.ok { background: #12311f; border-color: #14532d; }
.btn.warn { background: #35250f; border-color: #78350f; }
.btn.ghost { background: transparent; }
.head-row { display:flex; justify-content: space-between; align-items: center; }
.table-wrap { overflow:auto; }
table { width:100%; border-collapse: collapse; font-size: 13px; }
th, td { border-bottom: 1px solid var(--line); padding: 8px; text-align: left; }
.hint { color: var(--muted); font-size: 12px; margin-top: 8px; }
code { background: #0b1222; border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; }
@media (max-width: 700px) {
  .filters { flex-direction: column; align-items: flex-start; }
  .board { grid-template-columns: 1fr; }
}
