/* Agent Bridge v1 -- Unweave page. Dashboard palette plus the Prompt Spider's pink silk and mint threads. */
:root { --bg:#0b0f14; --panel:#121820; --line:#263040; --fg:#e6edf3; --muted:#8b949e; --accent:#58a6ff;
        --pink:#ff3ea5; --mint:#39ff88; --err:#f85149; --ok:#3fb950; --warn:#d29922; }
* { box-sizing:border-box; }
body.unweave { margin:0; background:var(--bg); color:var(--fg); font:14px/1.45 system-ui, sans-serif; }
.unweave header { display:flex; align-items:center; gap:14px; padding:10px 18px; border-bottom:1px solid var(--line);
                  background:linear-gradient(90deg, #0b0f14, #121820 60%, #0b0f14); position:sticky; top:0; z-index:5; }
.unweave header img { width:36px; height:36px; }
.unweave header h1 { font-size:20px; margin:0; letter-spacing:.02em; }
.unweave header h1 small { color:var(--muted); font-weight:400; font-size:12px; margin-left:8px; }
.unweave header a { color:var(--accent); text-decoration:none; }
.unweave header .links { display:flex; gap:12px; margin-left:auto; align-items:center; }
#uw-status { color:var(--muted); font-size:12px; }
#uw-status.bad { color:var(--err); }
.unweave nav.tabs { display:flex; gap:4px; padding:8px 18px 0; border-bottom:1px solid var(--line); }
.unweave nav.tabs button { background:none; border:1px solid transparent; border-bottom:none; color:var(--muted);
                           padding:6px 14px; border-radius:8px 8px 0 0; cursor:pointer; font-size:13px; }
.unweave nav.tabs button.on { color:var(--fg); border-color:var(--line); background:var(--panel); }
.unweave main { padding:12px 18px; }
.uw-grid { display:grid; grid-template-columns:minmax(300px, 1.1fr) minmax(0, 2fr); gap:14px; }
.unweave section { background:var(--panel); border:1px solid var(--line); border-radius:10px; padding:12px 14px; min-width:0; }
.unweave h2 { font-size:12px; margin:0 0 8px; text-transform:uppercase; letter-spacing:.08em; color:var(--muted); }
.unweave h3 { font-size:14px; margin:12px 0 6px; color:var(--mint); }
.unweave button { background:#1b2430; color:var(--fg); border:1px solid var(--line); border-radius:6px; padding:5px 10px; cursor:pointer; }
.unweave button:disabled { opacity:.45; cursor:default; }
.unweave button.primary { border-color:var(--pink); color:#fff; background:linear-gradient(90deg, #4a1535, #2a1020); }
.unweave button.mint { border-color:var(--mint); color:var(--mint); }
.unweave select, .unweave input { background:var(--bg); color:var(--fg); border:1px solid var(--line); border-radius:6px; padding:4px 8px; }
.unweave .row { display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin:6px 0; }
.unweave .muted { color:var(--muted); }
.unweave .pink { color:var(--pink); }
.unweave .mint-t { color:var(--mint); }
/* creator strip */
.uw-stats { display:grid; grid-template-columns:repeat(auto-fill, minmax(120px, 1fr)); gap:8px; }
.uw-stat { background:var(--bg); border:1px solid var(--line); border-radius:8px; padding:8px 10px; }
.uw-stat b { display:block; font-size:18px; color:var(--fg); }
.uw-stat span { font-size:11px; color:var(--muted); text-transform:uppercase; letter-spacing:.06em; }
/* video cards */
.uw-cards { display:grid; grid-template-columns:repeat(auto-fill, minmax(150px, 1fr)); gap:10px; margin-top:8px; }
.uw-empty { grid-column:1 / -1; background:var(--bg); border:1px dashed var(--line); border-radius:8px; padding:14px; color:var(--muted); }
.uw-empty b { color:var(--fg); }
.uw-empty p { margin:6px 0 10px; }
.uw-empty code { color:var(--mint); white-space:normal; overflow-wrap:anywhere; }
.uw-card { background:var(--bg); border:1px solid var(--line); border-radius:8px; overflow:hidden; cursor:pointer;
           transition:border-color .15s; }
.uw-card:hover, .uw-card.on { border-color:var(--pink); }
.uw-card .thumb { width:100%; aspect-ratio:1 / 1; object-fit:cover; object-position:left top; background:#000; display:block; }
.uw-card .body { padding:6px 8px; }
.uw-card .t { font-size:12px; line-height:1.3; max-height:2.6em; overflow:hidden; }
.uw-card .m { font-size:11px; color:var(--muted); margin-top:4px; display:flex; gap:6px; flex-wrap:wrap; }
.uw-badge { font-size:10px; border:1px solid var(--line); border-radius:10px; padding:0 6px; color:var(--muted); }
.uw-badge.done { border-color:var(--mint); color:var(--mint); }
.uw-badge.running { border-color:var(--warn); color:var(--warn); }
.uw-badge.failed { border-color:var(--err); color:var(--err); }
/* detail */
.uw-sheets { display:flex; gap:8px; overflow-x:auto; padding-bottom:6px; }
.uw-sheets img { height:220px; border:1px solid var(--line); border-radius:6px; cursor:zoom-in; background:#000; }
.uw-sheets img.zoom { height:auto; width:100%; cursor:zoom-out; }
.unweave dl { display:grid; grid-template-columns:max-content 1fr; gap:2px 12px; margin:0 0 8px; }
.unweave dt { color:var(--muted); }
.unweave dd { margin:0; overflow-wrap:anywhere; }
.uw-comments li { padding:4px 0; border-bottom:1px dashed var(--line); font-size:13px; }
.uw-comments li .a { color:var(--accent); margin-right:6px; }
.uw-comments li .l { color:var(--pink); font-size:11px; margin-left:6px; }
.uw-comments li.reply { padding-left:16px; color:var(--muted); }
.uw-pills { display:flex; gap:6px; flex-wrap:wrap; }
.uw-pill { background:var(--bg); border:1px solid var(--line); border-radius:12px; padding:1px 8px; font-size:12px; }
.uw-teardown p, .uw-teardown li { margin:3px 0; }
.uw-teardown .k { color:var(--muted); }
.uw-teardown .step { border-left:3px solid var(--mint); padding-left:8px; margin:6px 0; }
.uw-teardown .step .e { font-size:11px; color:var(--pink); margin-right:6px; }
.uw-progress { font-size:12px; color:var(--warn); }
.uw-playbook { white-space:pre-wrap; font:13px/1.5 ui-monospace, Consolas, monospace; background:var(--bg);
               border:1px solid var(--line); border-radius:8px; padding:12px; max-height:70vh; overflow:auto; }
.uw-timeline { display:flex; align-items:flex-end; gap:3px; height:90px; border-bottom:1px solid var(--line); margin:8px 0; }
.uw-timeline div { flex:1; background:linear-gradient(180deg, var(--pink), #4a1535); min-width:4px; border-radius:2px 2px 0 0; }
.uw-timeline div:hover { background:var(--mint); }
#uw-signin { display:flex; gap:6px; align-items:center; }
#uw-signin input { width:90px; }
@media (max-width:1000px) { .uw-grid { grid-template-columns:1fr; } }
@media (prefers-reduced-motion: reduce) { .unweave * { transition:none !important; animation:none !important; } }
