:root { color-scheme: dark; --bg:#070b18; --card:#10172b; --line:#1f2a48; --text:#f1f5ff; --muted:#93a0c0; --ok:#22c55e; --bad:#ef4444; --warn:#f59e0b; --brand:#7c5cff; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-text-size-adjust: 100%; }
body { padding-bottom: env(safe-area-inset-bottom); }
.hidden { display: none !important; }
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: rgba(7,11,24,.94); border-bottom: 1px solid var(--line); backdrop-filter: blur(8px); }
.top h1 { font-size: 17px; margin: 0; }
.tag { font-size: 11px; padding: 2px 8px; border-radius: 99px; background: #1b1450; color: #c7bbff; }
main { max-width: 640px; margin: 0 auto; padding: 14px; display: grid; gap: 12px; }
#view-dashboard { display: grid; gap: 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
h2 { font-size: 15px; margin: 0 0 8px; }
.muted { color: var(--muted); margin: 4px 0 0; }
.small { font-size: 12px; }
.row { display: flex; gap: 12px; align-items: center; }
.grow { flex: 1; min-width: 0; }
.dot { width: 14px; height: 14px; border-radius: 50%; background: #64748b; flex: none; box-shadow: 0 0 0 4px rgba(100,116,139,.2); }
.dot.on { background: var(--ok); box-shadow: 0 0 0 4px rgba(34,197,94,.2); }
.dot.off { background: var(--bad); box-shadow: 0 0 0 4px rgba(239,68,68,.2); }
.banner { margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; font-weight: 600; }
.banner.warn { background: rgba(245,158,11,.12); color: #fcd34d; border: 1px solid rgba(245,158,11,.35); }
input, select { width: 100%; min-height: 46px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: #0b1226; color: var(--text); font-size: 16px; }
form { display: grid; gap: 10px; }
.btn { min-height: 46px; padding: 10px 14px; border: 0; border-radius: 12px; font-size: 15px; font-weight: 700; cursor: pointer; color: #fff; background: #26324f; }
.btn.primary { background: var(--brand); }
.btn.danger { background: #7f1d1d; }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.pending { opacity: .8; cursor: progress; }
.btn.success { background: #15803d; }
.btn.error { background: #b91c1c; }
.error { color: #fca5a5; margin: 8px 0 0; }
.row-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 10px; font-size: 12px; color: var(--muted); }
.row-opts select { min-height: 40px; font-size: 14px; }
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.item { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #0b1226; }
.item .title { font-weight: 700; word-break: break-word; }
.item .meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.item .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.status { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 99px; background: #26324f; }
.status.completed { background: rgba(34,197,94,.18); color: #86efac; }
.status.failed, .status.error { background: rgba(239,68,68,.18); color: #fca5a5; }
.status.running, .status.claimed, .status.processing { background: rgba(124,92,255,.22); color: #c7bbff; }
.bar { height: 12px; border-radius: 99px; background: #0b1226; border: 1px solid var(--line); overflow: hidden; margin-top: 10px; }
.bar > div { height: 100%; width: 0; background: linear-gradient(90deg, #7c5cff, #22d3ee); transition: width .4s ease; }
.pct { margin: 6px 0 0; font-weight: 800; }
.job-title { margin: 0; font-weight: 700; word-break: break-word; }
.clips .item { display: grid; grid-template-columns: 64px 1fr; gap: 10px; align-items: center; }
.clips img, .clips .thumb { width: 64px; height: 88px; border-radius: 8px; object-fit: cover; background: #1b2442; }
.foot { text-align: center; display: grid; gap: 8px; padding: 6px 0 24px; }
