:root {
  --bg: #0f1115;
  --panel: #161a22;
  --border: #262c38;
  --text: #e7ecf3;
  --muted: #8b95a8;
  --accent: #4f8cff;
  --warn: #e5b849;
  --err: #ff5e5b;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.4 -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--muted); }
.warn { color: var(--warn); }
.error { color: var(--err); }

.topbar { display: flex; align-items: center; justify-content: space-between; padding: 0.8rem 1.4rem; border-bottom: 1px solid var(--border); }
.topbar .brand a { color: var(--text); font-weight: 600; }
.topbar nav a { margin-left: 1rem; }
.topbar .pill { background: var(--accent); color: white; padding: 0.3rem 0.7rem; border-radius: 999px; }
.topbar .pill:hover { text-decoration: none; opacity: 0.9; }

.container { max-width: 1100px; margin: 1.4rem auto; padding: 0 1.2rem; }
.center { min-height: 100vh; display: flex; align-items: center; justify-content: center; }

.card { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 1.1rem 1.3rem; margin-bottom: 1.1rem; }
.card h2 { margin: 0 0 0.7rem; font-size: 1.1rem; }
.card.narrow { width: 340px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 720px) { .grid-2 { grid-template-columns: 1fr; } }

label { display: block; margin: 0.5rem 0; font-size: 0.9rem; color: var(--muted); }
input[type=text], input[type=password], input[type=number], input[type=datetime-local],
select, textarea {
  width: 100%; background: #0c0f15; color: var(--text); border: 1px solid var(--border);
  border-radius: 8px; padding: 0.55rem 0.7rem; font: inherit;
}
textarea { resize: vertical; }
button {
  background: var(--accent); color: white; border: 0; border-radius: 8px;
  padding: 0.5rem 0.9rem; font: inherit; cursor: pointer; margin-top: 0.3rem;
}
button.danger { background: transparent; color: var(--err); border: 1px solid var(--err); padding: 0.1rem 0.5rem; }
button:hover { opacity: 0.9; }

.inline { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; margin-bottom: 0.8rem; }
.inline > * { flex: 1; min-width: 140px; }
.inline button { flex: 0; }

.row { display: flex; gap: 0.7rem; align-items: center; flex-wrap: wrap; }
.row.space-between { justify-content: space-between; }

.data { width: 100%; border-collapse: collapse; margin-top: 0.4rem; }
.data th, .data td { padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--border); text-align: left; font-size: 0.92rem; vertical-align: top; }
.data.wide td.post-text { max-width: 420px; white-space: pre-wrap; }

.posts { list-style: none; padding: 0; margin: 0; }
.posts li { padding: 0.7rem 0; border-bottom: 1px solid var(--border); }
.posts li:last-child { border-bottom: 0; }
.post-text { white-space: pre-wrap; margin: 0.3rem 0; }
.post-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.4rem; }

.badge { display: inline-block; padding: 0.05rem 0.45rem; background: #28324a; color: var(--accent); border-radius: 6px; font-size: 0.78rem; text-transform: uppercase; }
.thumb { max-width: 180px; border-radius: 8px; margin: 0.4rem 0; }

.variant { border: 1px solid var(--border); padding: 0.7rem; border-radius: 10px; margin-bottom: 0.8rem; }

.tabs { margin-bottom: 0.8rem; display: flex; gap: 0.8rem; }
.tabs a { padding: 0.3rem 0.7rem; border-radius: 999px; background: #1f2433; color: var(--muted); }
.tabs a.active { background: var(--accent); color: white; }
