:root{--series-1: #2a78d6;--bg: #f6f6f4;--card: #fff;--text: #1d1d1f;--muted: #6b6b70;--border: #e2e2e0;--accent: #e8590c;--ok: #2b8a3e;--bad: #c92a2a;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;color:var(--text);background:var(--bg)}@media (prefers-color-scheme: dark){:root{--series-1: #3987e5;--bg: #161618;--card: #1f1f22;--text: #ececec;--muted: #9a9aa0;--border: #333}}body{margin:0}input,select,button{font:inherit;padding:8px 10px;border-radius:8px;border:1px solid var(--border);background:var(--card);color:var(--text)}button{background:var(--accent);color:#fff;border:none;cursor:pointer}button:disabled{opacity:.6}button.link{background:none;color:var(--accent);padding:0}.auth{max-width:360px;margin:10vh auto;padding:0 16px}.auth form{display:flex;flex-direction:column;gap:10px}.card{background:var(--card);border:1px solid var(--border);border-radius:12px;padding:20px;margin-bottom:16px}.layout header{display:flex;gap:16px;align-items:center;padding:12px 24px;border-bottom:1px solid var(--border);background:var(--card);flex-wrap:wrap}.layout main{max-width:960px;margin:24px auto;padding:0 16px}h2{margin-top:0;font-size:18px}table{width:100%;border-collapse:collapse;margin-bottom:12px}td{padding:8px 4px;border-bottom:1px solid var(--border)}.row{display:flex;gap:8px;flex-wrap:wrap}.row input{flex:1;min-width:140px}.muted{color:var(--muted)}.error{color:var(--bad);margin-top:8px}.badge{font-size:12px;padding:2px 8px;border-radius:999px;border:1px solid currentColor}.badge.active{color:var(--ok)}.badge.disabled,.badge.token_expired,.badge.no_access{color:var(--bad)}code{word-break:break-all}.layout main{max-width:1280px}nav{display:flex;gap:4px}button.tab{background:none;color:var(--text);border-radius:8px}button.tab.active{background:var(--bg);color:var(--accent);font-weight:600}button.ghost{background:none;color:var(--accent);border:1px solid var(--accent)}.spacer{flex:1}.small{font-size:12px}.strong{font-weight:600}.right{text-align:right;white-space:nowrap}.row.center{align-items:center}label{display:inline-flex;align-items:center}.scroll{overflow-x:auto;margin:12px 0}table.grid{font-size:14px}table.grid th{text-align:left;font-weight:500;color:var(--muted);padding:6px 4px;border-bottom:1px solid var(--border);white-space:nowrap}table.grid td{vertical-align:top}.num{text-align:right;white-space:nowrap}input.markup{width:72px;padding:4px 6px;text-align:right}.bulk{margin-top:12px;padding:8px 12px;background:var(--bg);border-radius:8px}.pager{align-items:center}.up{color:var(--ok)}.down{color:var(--bad)}.ok{color:var(--ok)}.actions{display:flex;gap:10px;margin-top:4px;font-size:13px}.picker{display:flex;flex-direction:column;gap:4px;min-width:280px}button.pick{background:var(--bg);color:var(--text);text-align:left;font-size:13px}.badge.fresh-FRESH,.badge.run-ok,.badge.match-confirmed{color:var(--ok)}.badge.fresh-STALE,.badge.match-auto,.badge.run-running{color:#d9480f}.badge.fresh-CONFIRMATION_REQUIRED,.badge.fresh-UNKNOWN,.badge.run-error,.badge.error{color:var(--bad)}.badge.match-none,.badge.match-rejected{color:var(--muted)}.bad{color:var(--bad)}.kpis{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px;margin-top:8px}.kpi{padding:12px;border:1px solid var(--border);border-radius:10px}.kpi-value{font-size:22px;font-weight:600;margin:4px 0;font-variant-numeric:tabular-nums}.seg{display:inline-flex;border:1px solid var(--border);border-radius:8px;overflow:hidden}.seg button{background:none;color:var(--text);border-radius:0;padding:6px 10px}.seg button.on{background:var(--accent);color:#fff}.charts{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:16px}.chart{margin:0}.chart figcaption{display:flex;justify-content:space-between;margin-bottom:4px}.chart-wrap{position:relative}.chart svg{width:100%;height:auto;display:block}.chart .grid{stroke:var(--border);stroke-width:1}.chart .axis{fill:var(--muted);font-size:10px}.chart .line{fill:none;stroke:var(--series-1);stroke-width:2;stroke-linejoin:round}.chart .area{fill:var(--series-1);opacity:.08}.chart .cross{stroke:var(--muted);stroke-width:1;stroke-dasharray:3 3}.chart .dot{fill:var(--series-1);stroke:var(--card);stroke-width:2}.tip{position:absolute;top:0;transform:translate(-50%);background:var(--card);border:1px solid var(--border);border-radius:8px;padding:4px 8px;pointer-events:none;white-space:nowrap;font-size:13px}button.chip{background:var(--bg);color:var(--text);border:1px solid var(--border);border-radius:999px;font-size:13px}button.chip.on{border-color:var(--accent);color:var(--accent)}a.ghost-link{color:var(--accent);text-decoration:none;border:1px solid var(--accent);border-radius:8px;padding:7px 10px}th.sortable{cursor:pointer;-webkit-user-select:none;user-select:none}th.sortable:hover{color:var(--text)}button.danger{background:var(--bad)}.note{background:var(--bg);border-left:3px solid var(--accent);padding:8px 12px;border-radius:6px;margin:8px 0;font-size:14px}.note.bad{border-left-color:var(--bad)}.drawer{position:fixed;top:0;right:0;bottom:0;left:0;background:#00000059;display:flex;justify-content:flex-end;z-index:20}.drawer-body{width:min(760px,100%);height:100%;overflow-y:auto;background:var(--card);padding:20px 24px 0;box-shadow:-8px 0 24px #00000026}.field{display:flex;gap:8px;align-items:center;margin:12px 0}.field.col{flex-direction:column;align-items:stretch;gap:4px}.field>span:first-child{font-size:13px;color:var(--muted)}textarea{font:inherit;padding:8px 10px;border-radius:8px;border:1px solid var(--border);background:var(--card);color:var(--text);resize:vertical}.thumbs{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:8px}.thumb{width:112px;border:1px solid var(--border);border-radius:8px;overflow:hidden}.thumb:first-child{outline:2px solid var(--accent)}.thumb img{width:112px;height:84px;object-fit:cover;display:block}.thumb-actions{display:flex;justify-content:space-around;padding:2px 0}.picker-box{border:1px solid var(--border);border-radius:8px;padding:10px;margin-top:8px;display:flex;flex-direction:column;gap:8px}.media-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:10px;margin-top:10px}.media{margin:0;border:1px solid var(--border);border-radius:8px;overflow:hidden;cursor:pointer}.media.picked{outline:2px solid var(--accent)}.media img{width:100%;aspect-ratio:4/3;object-fit:cover;display:block}.media figcaption{padding:4px 6px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sticky-actions{position:sticky;bottom:0;background:var(--card);border-top:1px solid var(--border);padding:12px 0;display:flex;justify-content:space-between;align-items:center;margin-top:16px}.mini-thumbs img{width:36px;height:27px;object-fit:cover;border-radius:3px;margin-right:3px;vertical-align:middle}td.old{color:var(--muted);text-decoration:line-through;text-decoration-color:#c92a2a66}td.new{font-weight:500}tr.excluded td{opacity:.45}tr.clickable{cursor:pointer}tr.clickable:hover td,tr.sel td{background:var(--bg)}.badge.cs-draft{color:#d9480f}.badge.cs-applied{color:var(--ok)}.badge.cs-failed,.badge.cs-discarded,.badge.cs-rolled_back{color:var(--muted)}button.title-link{color:var(--text);text-align:left;font:inherit}button.title-link:hover{color:var(--accent)}.layout header{gap:10px;padding:10px 16px}nav{flex-wrap:wrap}button.tab{padding:6px 8px;font-size:14px}.agent{display:grid;grid-template-columns:240px 1fr;gap:16px;align-items:start}@media (max-width: 800px){.agent{grid-template-columns:1fr}}.agent-list{display:flex;flex-direction:column;gap:6px;max-height:75vh;overflow-y:auto}button.conv{background:none;color:var(--text);text-align:left;display:flex;flex-direction:column;gap:2px;border-radius:8px}button.conv span:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}button.conv.on,button.conv:hover{background:var(--bg)}.chat{min-height:50vh;max-height:65vh;overflow-y:auto;display:flex;flex-direction:column;gap:12px}.msg{display:flex;flex-direction:column;gap:4px;max-width:85%}.msg.user{align-self:flex-end;align-items:flex-end}.msg .bubble{white-space:pre-wrap;padding:10px 12px;border-radius:12px;background:var(--bg);line-height:1.45}.msg.user .bubble{background:var(--accent);color:#fff}.msg .tools{display:flex;flex-wrap:wrap;gap:6px}.msg .tools span{border:1px solid var(--border);border-radius:999px;padding:1px 8px}a.cs-card{display:inline-block;border:1px solid var(--accent);color:var(--accent);border-radius:10px;padding:8px 12px;text-decoration:none}.examples{display:flex;flex-direction:column;align-items:flex-start;gap:6px}.examples .chip{text-align:left}.composer{margin:12px 0;align-items:stretch}.composer textarea{flex:1}details.card summary{cursor:pointer}table.sheet td{padding:4px}table.sheet input.cell,table.sheet textarea.cell{width:100%;box-sizing:border-box;padding:4px 6px;border-radius:6px;border:1px solid transparent;background:transparent;color:var(--text);font-size:13px}table.sheet input.cell:hover,table.sheet textarea.cell:hover{border-color:var(--border)}table.sheet input.cell:focus,table.sheet textarea.cell:focus{border-color:var(--accent);background:var(--card);outline:none}table.sheet input.cell.num{width:90px;text-align:right}table.sheet input.wide-cell{min-width:280px}table.sheet textarea.desc{min-width:260px;height:34px;resize:vertical;font-family:inherit}table.sheet textarea.desc:focus{height:160px}table.sheet td.dirty{background:color-mix(in srgb,#f2c94c 22%,transparent)}button.thumbs{display:flex;align-items:center;gap:4px;background:none;color:var(--text);padding:0}button.thumbs img{width:44px;height:44px;object-fit:cover;border-radius:6px;border:1px solid var(--border)}.savebar{position:sticky;bottom:0;display:flex;gap:10px;align-items:center;padding:10px 12px;background:var(--card);border:1px solid var(--accent);border-radius:10px;box-shadow:0 -4px 16px #00000014}.photo-list{display:flex;flex-wrap:wrap;gap:10px;margin:8px 0 12px}.photo-list figure{margin:0;width:120px}.photo-list img{width:120px;height:120px;object-fit:cover;border-radius:8px;border:2px solid var(--border)}.photo-list figure.main img{border-color:var(--accent)}.sticky-actions{position:sticky;bottom:0;background:var(--card);padding:12px 0}
