/* AImation Admin — dark space theme to match aimationglobal.com */
:root {
  --bg: #06121a;
  --bg2: #0a1c28;
  --card: #0d2331;
  --card2: #122c3d;
  --border: #1e3a4d;
  --text: #e8ecf8;
  --muted: #9aa3c0;
  --gold: #f0b429;
  --gold-soft: #ffd9a0;
  --blue: #cfe8ff;
  --green: #34d399;
  --red: #f2603a;
  --amber: #fbbf24;
  --purple: #a78bfa;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
}
a { color: var(--gold-soft); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 24px 16px 64px; }
header.top {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 18px 0 8px;
}
header.top h1 { font-size: 1.6rem; margin: 0; letter-spacing: .02em; }
header.top h1 span { color: var(--gold); }
.live {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .8rem; font-weight: 700; color: var(--green);
  border: 1px solid var(--green); border-radius: 999px; padding: 2px 10px;
}
.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
nav { margin-left: auto; display: flex; gap: 10px; align-items: center; }
nav a, nav button { font-size: .9rem; }
button, .btn {
  background: var(--gold); color: #1a0b00; border: 0; border-radius: 8px;
  padding: 10px 16px; font-weight: 700; cursor: pointer; text-decoration: none;
  display: inline-block;
}
button.secondary, .btn.secondary { background: var(--card2); color: var(--text); border: 1px solid var(--border); }
button:disabled { opacity: .5; cursor: default; }
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 18px; margin: 16px 0;
}
.card h2 { margin: 0 0 12px; font-size: 1.1rem; }
.muted { color: var(--muted); font-size: .9rem; }
.error {
  background: #3a1410; border: 1px solid var(--red); color: #ffd9d0;
  border-radius: 8px; padding: 10px 12px; margin: 12px 0; display: none;
}
.error.show { display: block; }
.ok {
  background: #0d2b1d; border: 1px solid var(--green); color: #c8f5dd;
  border-radius: 8px; padding: 10px 12px; margin: 12px 0; display: none;
}
.ok.show { display: block; }
label { display: block; font-size: .9rem; margin: 12px 0 4px; }
input, select, textarea {
  width: 100%; background: var(--bg2); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px;
  font-size: 1rem;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.form-narrow { max-width: 420px; margin: 40px auto; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.plat { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 14px; }
.plat h3 { margin: 0 0 4px; font-size: 1rem; }
.pill {
  display: inline-block; font-size: .75rem; font-weight: 700;
  border-radius: 999px; padding: 2px 9px; margin-bottom: 8px;
}
.pill.ready { background: #0d2b1d; color: var(--green); }
.pill.attention { background: #33240a; color: var(--amber); }
.pill.blocked { background: #3a1410; color: var(--red); }
.pill.migration_pending { background: #241a3a; color: var(--purple); }
.pill.not_connected { background: #222; color: var(--muted); }
.stages { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.stage-chip {
  border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px;
  font-size: .85rem; background: var(--card);
}
.stage-chip b { color: var(--gold); }
.proj { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin: 12px 0; }
.proj h3 { margin: 0 0 2px; font-size: 1.05rem; }
.proj .meta { font-size: .85rem; color: var(--muted); }
.pipe { display: flex; gap: 4px; margin: 10px 0; flex-wrap: wrap; }
.pipe span {
  flex: 1 1 0; min-width: 64px; text-align: center; font-size: .7rem;
  padding: 5px 2px; border-radius: 6px; background: var(--bg2);
  color: var(--muted); border: 1px solid var(--border);
  text-transform: capitalize; white-space: nowrap; overflow: hidden;
}
.pipe span.done { background: var(--gold); color: #1a0b00; border-color: var(--gold); font-weight: 700; }
.pipe span.current { background: var(--card2); color: var(--gold-soft); border-color: var(--gold); font-weight: 700; }
.pipe span.blocked { background: #3a1410; color: var(--red); border-color: var(--red); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.chip {
  font-size: .75rem; border: 1px solid var(--border); border-radius: 999px;
  padding: 2px 9px; color: var(--muted);
}
.chip.on { background: #0d2b1d; color: var(--green); border-color: var(--green); }
.chip.off { opacity: .7; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: .92rem; }
.feed li:last-child { border-bottom: 0; }
.feed time { color: var(--muted); font-size: .8rem; display: block; }
select.inline { width: auto; display: inline-block; padding: 6px 8px; font-size: .9rem; }
@media (max-width: 640px) {
  .pipe span { min-width: 44px; font-size: .62rem; }
}
