:root {
  --bg: #0b0b12; --panel: #14141f; --panel2: #1b1b29; --line: #2a2a3d;
  --text: #e8e8f2; --muted: #9090a8; --cyan: #33e6ff; --pink: #ff3d9a; --lime: #9dff4a;
  --amber: #ffb020; --red: #ff4d5e; --radius: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 24px; margin: 0 0 4px; letter-spacing: .3px; }
h2 { font-size: 17px; margin: 0 0 12px; color: var(--text); }
h3 { font-size: 15px; margin: 0 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
code, pre { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 13px; }
pre { background: #08080d; border: 1px solid var(--line); padding: 12px; border-radius: 8px; overflow: auto; white-space: pre-wrap; }

/* Layout */
.top { display: flex; align-items: center; gap: 28px; padding: 0 28px; height: 58px; border-bottom: 1px solid var(--line); background: #0d0d16; position: sticky; top: 0; z-index: 10; }
.brand { font-weight: 800; letter-spacing: 3px; color: var(--cyan); text-shadow: 0 0 12px rgba(51,230,255,.5); }
.brand span { color: var(--pink); text-shadow: 0 0 12px rgba(255,61,154,.5); }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a { color: var(--muted); padding: 7px 12px; border-radius: 8px; font-weight: 500; }
.nav a:hover { color: var(--text); background: var(--panel); text-decoration: none; }
.nav a.on { color: var(--text); background: var(--panel2); box-shadow: inset 0 -2px 0 var(--cyan); }
.who { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; }
main { max-width: 1280px; margin: 0 auto; padding: 28px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid3 { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; }
@media (max-width: 900px) { .grid2, .grid3 { grid-template-columns: 1fr; } .top { gap: 10px; padding: 0 12px; } main { padding: 16px; } }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card + .card { margin-top: 18px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat b { display: block; font-size: 26px; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 13px; }
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* Formulare */
label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 4px; }
input[type=text], input[type=email], input[type=password], input[type=datetime-local], input[type=search], select, textarea {
  width: 100%; background: #0e0e17; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; font: inherit;
}
textarea { resize: vertical; min-height: 90px; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(51,230,255,.15); }
.btn { display: inline-flex; align-items: center; gap: 6px; background: var(--panel2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 8px 14px; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: #44445e; text-decoration: none; }
.btn.primary { background: var(--cyan); color: #04141a; border-color: var(--cyan); }
.btn.primary:hover { box-shadow: 0 0 14px rgba(51,230,255,.45); }
.btn.pink { background: var(--pink); color: #1a0410; border-color: var(--pink); }
.btn.danger { color: var(--red); }
.btn.small { padding: 4px 10px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: wait; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.spacer { flex: 1; }
.check { display: inline-flex; align-items: center; gap: 6px; color: var(--text); margin: 0; font-size: 14px; cursor: pointer; }

/* Status */
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 99px; background: var(--panel2); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.pill.draft { color: var(--muted); }
.pill.approved { color: var(--lime); border-color: rgba(157,255,74,.35); }
.pill.scheduled { color: var(--cyan); border-color: rgba(51,230,255,.4); }
.pill.posted { color: #04141a; background: var(--lime); border-color: var(--lime); }
.pill.partial, .pill.publishing { color: var(--amber); border-color: rgba(255,176,32,.4); }
.pill.failed { color: var(--red); border-color: rgba(255,77,94,.45); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--line); margin-right: 6px; }
.dot.ok { background: var(--lime); box-shadow: 0 0 8px var(--lime); }
.dot.warn { background: var(--amber); }
.dot.off { background: #444; }
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; border: 1px solid; }
.flash.err { border-color: rgba(255,77,94,.5); background: rgba(255,77,94,.08); color: #ffb3bb; }
.flash.ok { border-color: rgba(157,255,74,.4); background: rgba(157,255,74,.06); color: #d4ffb0; }

/* Listen */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 10px; border-bottom: 1px solid #1f1f2e; vertical-align: middle; }
tr:hover td { background: #161622; }
.chs { display: inline-flex; gap: 4px; }
.ch { font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 5px; background: #222233; color: var(--muted); }
.ch.posted { background: rgba(157,255,74,.15); color: var(--lime); }
.ch.failed { background: rgba(255,77,94,.15); color: var(--red); }
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 9px 0; border-bottom: 1px solid #1f1f2e; display: flex; gap: 10px; align-items: center; }
.list li:last-child { border-bottom: 0; }

/* Bibliothek */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.filters input[type=search] { max-width: 320px; }
.filters select { width: auto; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; color: var(--text); position: relative; }
.tile:hover { border-color: var(--cyan); text-decoration: none; }
.tile .th { aspect-ratio: 16/10; background: #08080d center/contain no-repeat; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 28px; font-weight: 800; }
.tile .meta { padding: 9px 11px; font-size: 13px; }
.tile .meta b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.tile .badge { position: absolute; top: 8px; left: 8px; background: rgba(0,0,0,.7); font-size: 11px; padding: 2px 7px; border-radius: 5px; }
.tile.sel { border-color: var(--pink); box-shadow: 0 0 0 2px var(--pink); }
.preview { background: #08080d; border-radius: 8px; display: flex; justify-content: center; align-items: center; min-height: 200px; overflow: hidden; }
.preview img, .preview video { max-width: 100%; max-height: 70vh; }
dl.kv { display: grid; grid-template-columns: 110px 1fr; gap: 6px 12px; margin: 0; font-size: 14px; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; word-break: break-all; }
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 18px; }

/* Post-Editor */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.tab { padding: 9px 14px; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.tab.on { color: var(--text); border-bottom-color: var(--cyan); }
.tab .off { opacity: .4; }
.pane { display: none; }
.pane.on { display: block; }
.counter { font-size: 12px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.counter.over { color: var(--red); font-weight: 700; }
.mediabar { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.mthumb { width: 96px; height: 64px; border-radius: 6px; background: #08080d center/cover no-repeat; border: 1px solid var(--line); position: relative; font-size: 10px; display: flex; align-items: flex-end; color: #fff; padding: 3px; overflow: hidden; }
.mthumb button { position: absolute; top: 2px; right: 2px; background: rgba(0,0,0,.75); border: 0; color: #fff; border-radius: 4px; cursor: pointer; font-size: 12px; line-height: 1; padding: 3px 5px; }
.mthumb span { background: rgba(0,0,0,.6); padding: 0 3px; border-radius: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.preview-post { background: #000; border: 1px solid var(--line); border-radius: 12px; padding: 14px; white-space: pre-wrap; font-size: 14px; }

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.7); display: none; align-items: center; justify-content: center; z-index: 50; }
.modal.on { display: flex; }
.modal .box { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; width: min(1000px, 94vw); max-height: 88vh; display: flex; flex-direction: column; }
.modal .box header { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: center; }
.modal .box .body { padding: 16px 18px; overflow: auto; }
.modal .tiles { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }

/* Claude */
.sugg { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: var(--panel); margin-bottom: 16px; }
.sugg h3 { color: var(--cyan); }
.variant { border-top: 1px solid #1f1f2e; padding: 10px 0; }
.variant .lbl { font-size: 12px; font-weight: 700; color: var(--pink); text-transform: uppercase; letter-spacing: .6px; }
.warn { color: var(--amber); font-size: 13px; }
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--cyan); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { background: transparent; color: var(--muted); border: 0; padding: 7px 14px; font: inherit; font-weight: 600; cursor: pointer; }
.seg button.on { background: var(--panel2); color: var(--text); box-shadow: inset 0 -2px 0 var(--cyan); }

.login { max-width: 380px; margin: 12vh auto; }
.login .brand { font-size: 28px; text-align: center; margin-bottom: 20px; }
