:root { --bg:#0f1117; --panel:#13151b; --line:#2a2f3a; --txt:#cfd6e6; --mut:#8b93a7; --accent:#e5342b; }
* { box-sizing: border-box; }
body { margin:0; background:var(--bg); color:var(--txt); font:14px/1.5 system-ui,sans-serif; }
a { color:inherit; text-decoration:none; }
.topbar { display:flex; align-items:center; gap:16px; padding:12px 20px; border-bottom:1px solid var(--line); }
.brand { font-weight:700; } .topbar nav { display:flex; gap:14px; } .soon { color:var(--mut); }
.topbar .new { margin-left:auto; }
main { padding:20px; max-width:1100px; margin:0 auto; }
.grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:14px; }
.card { background:var(--panel); border:1px solid var(--line); border-radius:9px; overflow:hidden; }
.thumb { height:120px; display:flex; align-items:center; justify-content:center; color:var(--mut);
  background:linear-gradient(135deg,#1a1d24,#0f1117); }
.thumb img { width:100%; height:100%; object-fit:cover; }
.card-body { padding:10px; } .topic { color:var(--mut); font-size:12px; margin:3px 0 8px; }
.badges { display:flex; align-items:center; gap:6px; flex-wrap:wrap; font-size:11px; color:var(--mut); }
.pill { background:#232838; padding:1px 8px; border-radius:20px; }
.dot { width:9px; height:9px; border-radius:50%; display:inline-block; }
.dot-rendered { background:#22c55e; } .dot-slides { background:#f59e0b; } .dot-draft { background:#555; }
.empty { color:var(--mut); }
.detail-head { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:16px; }
.detail-head .slug { font-size:18px; } .back { color:var(--mut); }
.actions { margin-left:auto; display:flex; gap:6px; }
.btn { padding:6px 12px; border-radius:6px; border:1px solid var(--line); background:#232838; color:var(--txt); cursor:pointer; }
.btn-red { background:var(--accent); border-color:var(--accent); color:#fff; }
.detail-body { display:flex; gap:16px; align-items:flex-start; }
.left { flex:1; } .right { width:320px; }
.ptabs { display:flex; gap:14px; flex-wrap:wrap; margin-bottom:10px; }
.ptabs a, .ptabs button { color:#7aa2ff; }
.meta { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:14px; }
.scene { display:flex; align-items:center; gap:8px; background:var(--panel); border-radius:6px; padding:6px 9px; margin-bottom:5px; }
.scene .n { color:var(--accent); font-weight:700; } .scene .ly { margin-left:auto; background:#232838; padding:1px 8px; border-radius:5px; color:var(--mut); }
.scene small { color:#9aa3b5; }
.status { margin-bottom:8px; } .status.running { color:#f59e0b; } .status.failed { color:var(--accent); } .status.done { color:#22c55e; } .status.idle { color:var(--mut); }
.spin { width:11px; height:11px; border:2px solid #f59e0b; border-top-color:transparent; border-radius:50%; display:inline-block; animation:spin 0.8s linear infinite; vertical-align:middle; }
@keyframes spin { to { transform:rotate(360deg); } }
.log { background:#080a0e; border:1px solid var(--line); border-radius:7px; padding:9px; font:11px/1.45 monospace; color:#6ee7a8; height:220px; overflow:auto; white-space:pre-wrap; }
.files { display:flex; flex-direction:column; gap:3px; font-size:12px; } .files a { color:#7aa2ff; }
.error { background:#3a1a1a; border:1px solid var(--accent); color:#ffd9d4; padding:8px 12px; border-radius:7px; margin-bottom:14px; }
.create-form { max-width:560px; display:flex; flex-direction:column; gap:14px; }
.form-field label { display:block; margin-bottom:5px; color:var(--mut); font-size:12px; }
.create-form textarea, .create-form input[type=text] { width:100%; background:var(--panel); border:1px solid var(--line); border-radius:6px; color:var(--txt); padding:8px; font:inherit; }
.checks, .radios { display:flex; gap:14px; flex-wrap:wrap; }
.checks label, .radios label { color:var(--txt); font-size:13px; display:flex; gap:5px; align-items:center; }
.daily-grid { display:grid; grid-template-columns:1fr 1fr; gap:24px; margin-bottom:20px; }
.daily-grid h4 { margin:0 0 8px; }
.sources { margin:6px 0; padding-left:18px; color:var(--mut); font-size:12px; }
.interests { background:var(--panel); border:1px solid var(--line); border-radius:6px; padding:8px; white-space:pre-wrap; font:12px/1.5 inherit; color:var(--txt); }
.runs { width:100%; border-collapse:collapse; font-size:13px; }
.runs th, .runs td { text-align:left; padding:7px 9px; border-bottom:1px solid var(--line); }
.runs th { color:var(--mut); font-weight:600; }
.runs td.empty { color:var(--mut); }
.subtle { color:var(--mut); font-size:12px; }
.dot-failed { background:var(--accent); }
.label { color:var(--mut); font-size:11px; text-transform:uppercase; letter-spacing:0.04em; margin:12px 0 4px; }
.config-form { display:flex; flex-direction:column; gap:10px; max-width:520px; margin-top:8px; }
.config-form textarea, .config-form input[type=text], .config-form input[type=number] { width:100%; background:var(--panel); border:1px solid var(--line); border-radius:6px; color:var(--txt); padding:7px; font:inherit; }
.news-list { list-style:none; padding:0; margin:8px 0; display:flex; flex-direction:column; gap:4px; }
.news-list li { display:flex; align-items:center; gap:8px; background:var(--panel); border:1px solid var(--line); border-radius:6px; padding:6px 9px; font-size:13px; }
.news-list li label { display:flex; align-items:center; gap:7px; flex:1; cursor:pointer; }
.meta-inline { color:var(--mut); font-size:11px; }
.btn-x { margin-left:auto; background:none; border:1px solid var(--line); color:var(--accent); cursor:pointer; font-size:12px; border-radius:5px; padding:2px 8px; }
.htmx-indicator { display:none; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { display:inline; }
.source-add-form { display:flex; gap:8px; margin-bottom:16px; max-width:620px; }
.source-url-input { flex:1; background:var(--panel); border:1px solid var(--line); border-radius:6px; color:var(--txt); padding:7px; font:inherit; }
.source-list { list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:6px; }
.source-row { display:flex; align-items:center; gap:10px; background:var(--panel); border:1px solid var(--line); border-radius:7px; padding:8px 10px; }
.source-url { flex:1; font-size:13px; word-break:break-all; }
.source-disabled .source-url { color:var(--mut); text-decoration:line-through; }
.toggle-switch { position:relative; display:inline-flex; align-items:center; cursor:pointer; }
.toggle-switch input { opacity:0; width:0; height:0; position:absolute; }
.toggle-track { width:32px; height:18px; background:#444; border-radius:9px; transition:background 0.2s; display:inline-block; }
.toggle-switch input:checked + .toggle-track { background:var(--accent); }
.toggle-track::after { content:""; position:absolute; top:3px; left:3px; width:12px; height:12px; background:#fff; border-radius:50%; transition:transform 0.2s; }
.toggle-switch input:checked + .toggle-track::after { transform:translateX(14px); }
.source-test-ok { color:#22c55e; font-size:12px; }
.source-test-error { color:var(--accent); font-size:12px; }
.source-test-previews { margin:4px 0 0 0; padding-left:16px; font-size:11px; color:var(--mut); }
