:root {
  --bg0: #0b0d11;
  --bg1: #12151c;
  --line: rgba(210, 218, 230, 0.12);
  --text: #eef2f7;
  --muted: #94a0b3;
  --metal: #c9d2df;
  --good: #6fcaa8;
  --warn: #e0b05a;
  --active: #8eb7e8;
  --radius: 18px;
  --font-display: "Syne", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 50% at 80% -10%, rgba(170, 190, 215, 0.14), transparent 55%),
    linear-gradient(165deg, var(--bg0), var(--bg1) 50%, #0f131a);
  background-attachment: fixed;
}
.wrap { width: min(980px, 100%); margin: 0 auto; padding: 24px 18px 56px; }
.top { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 52px; }
.brand h1 {
  margin: 0; font-family: var(--font-display); font-size: clamp(1.3rem, 4vw, 1.75rem);
  letter-spacing: -0.03em;
  background: linear-gradient(180deg,#fff,var(--metal));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand p { margin: 4px 0 0; color: var(--muted); font-size: 0.85rem; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; padding: 10px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255,255,255,.05); color: var(--text);
  text-decoration: none; font-size: 0.86rem; font-weight: 600; cursor: pointer; font-family: inherit;
}
.btn:hover { background: rgba(255,255,255,.1); }
.btn.primary { background: linear-gradient(180deg,#e8eef6,#b7c2d1); color: #12151c; border: 0; }
.panel {
  border: 1px solid var(--line); border-radius: 20px;
  background: rgba(255,255,255,.03); padding: 16px; margin-bottom: 14px;
}
.panel h2 { margin: 0 0 12px; font-family: var(--font-display); font-size: 1.1rem; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; }
.toolbar input {
  flex: 1; min-width: 160px; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(0,0,0,.28); color: var(--text); padding: 11px 12px; font: inherit;
}
.flow {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px;
}
.flow .chip {
  padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line);
  font-size: 0.72rem; color: var(--muted);
}
.flow .chip.done { color: var(--good); border-color: rgba(111,202,168,.35); }
.flow .chip.active { color: var(--active); border-color: rgba(142,183,232,.45); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  display: grid; grid-template-columns: 18px 1fr; gap: 12px;
  padding: 0 0 18px; position: relative; cursor: pointer;
}
.timeline li:last-child { padding-bottom: 0; }
.timeline .dot {
  width: 14px; height: 14px; border-radius: 50%; margin-top: 6px;
  border: 2px solid var(--line); background: #1a1f2a;
}
.timeline li.completed .dot { background: var(--good); border-color: var(--good); }
.timeline li.active .dot { background: var(--active); border-color: var(--active); box-shadow: 0 0 0 4px rgba(142,183,232,.2); }
.timeline li::before {
  content: ""; position: absolute; left: 6px; top: 22px; bottom: 0; width: 2px; background: var(--line);
}
.timeline li:last-child::before { display: none; }
.card {
  border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px;
  background: linear-gradient(165deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  transition: border-color .2s ease, transform .2s ease;
}
.timeline li:hover .card, .timeline li.selected .card {
  border-color: rgba(220,228,240,.35); transform: translateY(-1px);
}
.card .row { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.card strong { font-family: var(--font-display); }
.meta { color: var(--muted); font-size: 0.82rem; margin-top: 6px; display: grid; gap: 2px; }
.badge {
  display: inline-block; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line);
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
}
.badge.completed { color: var(--good); }
.badge.active { color: var(--active); }
.badge.pending { color: var(--muted); }
.detail {
  margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line);
  font-size: 0.88rem; color: var(--muted);
}
.detail a { color: var(--active); }
.hint, .empty { color: var(--muted); }
.error { color: #e07a7a; padding: 12px; border-radius: 12px; border: 1px solid rgba(224,122,122,.35); background: rgba(224,122,122,.08); }
@media (max-width: 640px) {
  .timeline li { grid-template-columns: 14px 1fr; }
}
