/* Event Media Platform — live pipeline console */
:root {
  --bg: #0b0f14; --panel: #121821; --panel2: #0e141c;
  --border: #1e2836; --text: #e8edf4; --muted: #8b98ab;
  --accent: #4da3ff; --accent2: #2b7fd4;
  --ok: #34d399; --bad: #f87171; --warn: #fbbf24;
  --mono: "SF Mono", "Cascadia Code", Consolas, monospace;
}
* { box-sizing: border-box; margin: 0; }
body { background: var(--bg); color: var(--text);
  font: 15px/1.5 -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
a { color: var(--accent); text-decoration: none; }
code, .mono { font-family: var(--mono); font-size: 13px; }

header { display: flex; justify-content: space-between; align-items: center;
  padding: 18px 28px; border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #0d1320, var(--bg)); }
.brand { display: flex; gap: 14px; align-items: center; }
.logo { width: 44px; height: 44px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: grid; place-items: center; font-weight: 800; font-size: 15px; color: #04101f; }
h1 { font-size: 19px; letter-spacing: -0.02em; }
.sub { color: var(--muted); font-size: 13px; }
.api-health { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 7px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--warn); display: inline-block; }
.dot.ok { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.dot.bad { background: var(--bad); }

/* metrics */
.metrics { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px;
  padding: 18px 28px; max-width: 1200px; margin: 0 auto; }
@media (max-width: 900px) { .metrics { grid-template-columns: repeat(3, 1fr); } }
.tile { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.tl { font-size: 11px; letter-spacing: .09em; color: var(--muted); }
.tv { font-size: 26px; font-weight: 700; margin-top: 4px; font-family: var(--mono); }
.tv.accent { color: var(--accent); } .tv.ok { color: var(--ok); } .tv.bad { color: var(--bad); }

.panel { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 20px 22px; }
h2 { font-size: 14px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 14px; }
.hint { float: right; text-transform: none; letter-spacing: 0; font-size: 12px; color: var(--accent); font-family: var(--mono); }

/* pipeline flow */
.flow-panel { max-width: 1200px; margin: 0 auto; }
.flow { position: relative; display: flex; align-items: center; gap: 0;
  overflow-x: auto; padding: 18px 6px 26px; }
.node { flex: 0 0 auto; border: 1px solid var(--border); border-radius: 9px;
  padding: 9px 13px; font-size: 12px; font-family: var(--mono); color: var(--muted);
  background: var(--panel2); transition: all .3s; white-space: nowrap; }
.node.on { color: var(--accent); border-color: var(--accent);
  box-shadow: 0 0 14px rgba(77,163,255,.25); }
.node.worker.on { color: var(--warn); border-color: var(--warn); box-shadow: 0 0 14px rgba(251,191,36,.25); }
.node.final.on { color: var(--ok); border-color: var(--ok); box-shadow: 0 0 14px rgba(52,211,153,.25); }
.depth { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 6px;
  border-radius: 50%; background: var(--accent); color: #04101f; font-weight: 700; font-size: 11px; }
.link { flex: 1 0 34px; min-width: 34px; height: 2px; background: var(--border); position: relative; overflow: hidden; }
.link.on { background: linear-gradient(90deg, transparent, rgba(77,163,255,.55), transparent);
  background-size: 200% 100%; animation: flowline 1.4s linear infinite; }
@keyframes flowline { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.dots { position: absolute; inset: 0; pointer-events: none; }
.dot-fly { position: absolute; left: 0; width: 8px; height: 8px; border-radius: 50%;
  background: var(--warn); box-shadow: 0 0 10px var(--warn);
  animation-name: travel; animation-iteration-count: infinite; animation-timing-function: linear; }
@keyframes travel { from { left: -1%; } to { left: 101%; } }
.legend { display: flex; gap: 22px; color: var(--muted); font-size: 12px; padding-top: 4px; flex-wrap: wrap; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.sw.queued { background: var(--accent); } .sw.processing { background: var(--warn); } .sw.bad { background: var(--bad); }

/* layout */
main { display: grid; grid-template-columns: 340px 1fr; gap: 18px;
  padding: 18px 28px; max-width: 1200px; margin: 0 auto; }
@media (max-width: 900px) { main { grid-template-columns: 1fr; } }

label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 6px; }
input[type=text], input:not([type=range]), select {
  width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--panel2); color: var(--text); font-size: 14px; outline: none; }
input:focus, select:focus { border-color: var(--accent); }
input[type=range] { width: 100%; accent-color: var(--accent); }
.check-hint { font-size: 12px; }
.btn { margin-top: 16px; width: 100%; padding: 11px; border: none; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #04101f; font-weight: 700; font-size: 14px; cursor: pointer; }
.btn:disabled { opacity: .6; cursor: wait; }
.btn.ghost { margin-top: 0; background: none; border: 1px solid var(--accent); color: var(--accent); }
.btn.ghost:hover { background: rgba(77,163,255,.1); }
.burst-row { display: grid; grid-template-columns: 1fr 70px 130px; gap: 8px; align-items: end; margin-top: 14px;
  padding-top: 14px; border-top: 1px solid var(--border); }
.burst-row label { margin: 0; }
.error { margin-top: 10px; color: var(--bad); font-size: 13px; }
.hidden { display: none !important; }

/* jobs */
.empty { color: var(--muted); text-align: center; padding: 40px 20px;
  border: 1px dashed var(--border); border-radius: 10px; font-size: 14px; }
.job { background: var(--panel2); border: 1px solid var(--border); border-radius: 11px;
  padding: 15px 17px; margin-bottom: 11px; transition: border-color .3s; }
.job:not(.settled) { border-color: rgba(77,163,255,.45); }
.job-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.job h3 { color: var(--text); font-size: 15px; font-weight: 600; }
.job-sub { color: var(--muted); font-size: 12px; margin-top: 3px; }
.head-right { display: flex; gap: 8px; align-items: center; }
.badge { font-size: 11px; font-weight: 700; letter-spacing: .05em; padding: 4px 10px;
  border-radius: 999px; font-family: var(--mono); white-space: nowrap; }
.badge.queued { color: var(--accent); background: rgba(77,163,255,.12); }
.badge.processing { color: var(--warn); background: rgba(251,191,36,.12); animation: pulse 1.2s infinite; }
.badge.completed { color: var(--ok); background: rgba(52,211,153,.12); }
.badge.failed { color: var(--bad); background: rgba(248,113,113,.12); }
.dlq { font-size: 10px; font-weight: 800; padding: 3px 7px; border-radius: 5px;
  color: var(--bad); border: 1px solid var(--bad); font-family: var(--mono); }
@keyframes pulse { 50% { opacity: .55; } }
.bar { height: 6px; background: #1a2331; border-radius: 4px; margin: 13px 0 6px; overflow: hidden; }
.fill { height: 100%; border-radius: 4px; background: var(--accent); transition: width .5s ease; }
.fill.processing { background: var(--warn); } .fill.completed { background: var(--ok); } .fill.failed { background: var(--bad); }
.bar-row { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); }
.objkey { font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 62%; }
.job-error { margin-top: 9px; font-size: 12.5px; color: var(--bad); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 11px; }
.chip { font-size: 10.5px; font-family: var(--mono); padding: 3px 8px; border-radius: 6px;
  border: 1px solid var(--border); color: var(--muted); white-space: nowrap; }
.chip em { font-style: normal; margin-left: 4px; color: var(--warn); }
.chip.done { color: var(--ok); border-color: rgba(52,211,153,.4); }
.chip.active { color: var(--warn); border-color: var(--warn); animation: pulse 1.1s infinite; }
.chip.retrying { color: var(--bad); border-color: var(--bad); animation: pulse .8s infinite; }
.chip.failed { color: #fff; background: var(--bad); border-color: var(--bad); }

/* terminal */
.log-panel { max-width: 1200px; margin: 0 auto 18px; }
.term { background: #070b10; border: 1px solid var(--border); border-radius: 10px;
  height: 220px; overflow-y: auto; padding: 12px 16px; font-family: var(--mono); font-size: 12.5px; }
.ln { padding: 1.5px 0; color: var(--text); }
.ln .t { color: #516279; margin-right: 10px; }
.ln.info { color: #9fc6ff; } .ln.ok { color: var(--ok); }
.ln.warn { color: var(--warn); } .ln.bad { color: var(--bad); }
.ln.dim { color: var(--muted); }

footer { text-align: center; color: var(--muted); font-size: 12.5px;
  padding: 18px; border-top: 1px solid var(--border); }

/* integrate panel */
.docs { max-width: 1200px; margin: 0 auto 18px; }
.docs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 900px) { .docs-grid { grid-template-columns: 1fr; } }
.docs h3 { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.docs pre { background: var(--panel2); border: 1px solid var(--border); border-radius: 9px;
  padding: 13px 15px; overflow-x: auto; color: #a9c5e8; font-size: 12px; white-space: pre; }
.sm-note { color: var(--muted); font-size: 12px; margin-top: 14px; line-height: 1.6; }
.sm-note code { color: var(--accent); }
.dlq.ok { color: var(--ok); border-color: var(--ok); }

/* job radar */
.pulsar { color: var(--warn); animation: pulse 1.2s infinite; }
.btn.small { width: auto; margin: 0; padding: 9px 16px; }
.radar-controls { display: grid; grid-template-columns: 1fr 130px; gap: 10px; margin-bottom: 14px; }
.radar-list { display: flex; flex-direction: column; gap: 9px; max-height: 460px; overflow-y: auto; }
.rjob { display: flex; justify-content: space-between; align-items: center; gap: 14px;
  background: var(--panel2); border: 1px solid var(--border); border-radius: 10px; padding: 13px 16px; }
.rjob-main { min-width: 0; }
.rtitle { font-size: 14px; font-weight: 600; }
.rmeta { color: var(--muted); font-size: 12px; margin-top: 3px; }
.remote { color: var(--ok); font-size: 11px; font-family: var(--mono); }
.rtags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 5px; }
.rtags span { font-size: 10px; font-family: var(--mono); color: var(--accent);
  border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; }
.rjob-actions { display: flex; gap: 7px; flex-shrink: 0; align-items: center; }
.mini.bad { color: var(--bad); }
a.mini { display: inline-block; text-decoration: none; }
.kanban { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 900px) { .kanban { grid-template-columns: repeat(2, 1fr); } }
.kcol { background: var(--panel2); border: 1px solid var(--border); border-radius: 10px; padding: 10px; min-height: 130px; }
.khead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.kcount { color: var(--muted); font-family: var(--mono); font-size: 12px; }
.kcard { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; }
.kacts { display: flex; gap: 6px; margin-top: 9px; }
.kempty { color: var(--muted); font-size: 12px; text-align: center; padding: 12px 0; }
