:root {
  --bg: #f6f6fb; --card: #fff; --text: #17172b; --muted: #6b6b85; --line: #e3e3ee;
  --accent: #5b2cff; --accent-2: #ff3d71; --ok: #12a150; --warn: #d98a00; --err: #d6334a;
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0f0f1a; --card: #181828; --text: #ececf6; --muted: #9a9ab5; --line: #2a2a40; }
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
       background: var(--bg); color: var(--text); }
a { color: var(--accent); }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
       padding: 12px 20px; background: var(--card); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text); text-decoration: none; }
.brand img { width: 28px; height: 28px; }
nav { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
nav a { text-decoration: none; color: var(--text); }
.wrap { max-width: 920px; margin: 0 auto; padding: 24px 16px 60px; }
.foot { text-align: center; color: var(--muted); font-size: 13px; padding: 20px; }
.foot a { color: var(--muted); }
h1 { font-size: 26px; margin: 0 0 16px; }
h2 { font-size: 18px; margin: 0 0 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
label { display: block; font-weight: 600; font-size: 13px; margin: 10px 0 4px; }
input[type=text], input[type=password], input[type=date], input[type=time], input[type=number], input[type=url],
select, textarea { width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg); color: var(--text); font: inherit; }
textarea { min-height: 110px; resize: vertical; }
input[type=file] { width: 100%; padding: 8px; border: 1px dashed var(--line); border-radius: 10px; background: var(--bg); color: var(--text); }
.btn, button.btn { display: inline-block; border: 0; border-radius: 10px; padding: 10px 18px; font: inherit; font-weight: 600;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; cursor: pointer; text-decoration: none; }
.btn.small { padding: 6px 12px; font-size: 14px; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.danger { background: var(--err); }
.btn:disabled { opacity: .5; cursor: wait; }
button.link { background: none; border: 0; color: var(--text); font: inherit; cursor: pointer; padding: 0; }
form.inline { display: inline; }
.flash { padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; border: 1px solid var(--line); background: var(--card); }
.flash.ok { border-color: var(--ok); }
.flash.error { border-color: var(--err); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.section-head h2 { margin: 0; }
.toggle { display: flex; align-items: center; gap: 8px; font-weight: 600; margin: 0; cursor: pointer; }
.toggle input { width: 18px; height: 18px; }
.section-body.off { display: none; }
.counter { float: right; font-weight: 400; color: var(--muted); }
.counter.over { color: var(--err); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 12px; padding: 3px 9px; border-radius: 99px; border: 1px solid var(--line); white-space: nowrap; }
.st-pending, .st-working { border-color: var(--warn); color: var(--warn); }
.st-scheduled { border-color: var(--accent); color: var(--accent); }
.st-published { border-color: var(--ok); color: var(--ok); }
.st-failed, .st-manual { border-color: var(--err); color: var(--err); }
.st-canceled { color: var(--muted); }
.svc { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; background: var(--err); }
.dot.on { background: var(--ok); }
table { width: 100%; border-collapse: collapse; }
td, th { text-align: left; padding: 10px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.rel { display: block; text-decoration: none; color: var(--text); }
.rel:hover { border-color: var(--accent); }
.progress { height: 10px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 10px 0; }
.progress > div { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .2s; }
.err-box { color: var(--err); white-space: pre-wrap; font-size: 13px; }
.hero { text-align: center; padding: 40px 10px; }
.hero h1 { font-size: 34px; }
pre.copy { white-space: pre-wrap; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.sticky-submit { position: sticky; bottom: 0; background: var(--bg); padding: 12px 0; border-top: 1px solid var(--line); }
@media (max-width: 560px) { h1 { font-size: 22px; } td, th { padding: 8px 3px; } }
