/* ── Design tokens: industrial ops console ── */
:root {
  --bg-0: #070b10;
  --bg-1: #0c1219;
  --bg-2: #121a24;
  --bg-3: #182230;
  --line: rgba(94, 234, 212, 0.14);
  --line-strong: rgba(94, 234, 212, 0.35);
  --text: #e8eef4;
  --muted: #7a8a9a;
  --teal: #0ea5a4;
  --cyan: #38bdf8;
  --amber: #f59e0b;
  --lime: #a3e635;
  --rose: #fb7185;
  --mint: #5eead4;
  --danger: #f43f5e;
  --ok: #34d399;
  --font-display: "Outfit", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --radius: 10px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-display);
  color: var(--text);
  background: radial-gradient(1200px 600px at 10% -10%, #0f2a2a 0%, transparent 55%),
    radial-gradient(900px 500px at 100% 0%, #1a1520 0%, transparent 50%),
    var(--bg-0);
  line-height: 1.45;
  padding: 0 1.25rem 2rem;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.04;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.grid-bg {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(94, 234, 212, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(94, 234, 212, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 20%, black 20%, transparent 75%);
}

body > *:not(.noise):not(.grid-bg) {
  position: relative;
  z-index: 1;
}

/* ── Top bar ── */
.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  padding: 1.1rem 0 0.75rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0.75rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 220px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background:
    linear-gradient(135deg, var(--mint), transparent 60%),
    linear-gradient(225deg, var(--amber), transparent 55%),
    var(--bg-3);
  border: 1px solid var(--line-strong);
  box-shadow: 0 0 24px rgba(14, 165, 164, 0.35);
  animation: markPulse 3.2s ease-in-out infinite;
}

@keyframes markPulse {
  0%, 100% { box-shadow: 0 0 16px rgba(14, 165, 164, 0.25); }
  50% { box-shadow: 0 0 28px rgba(245, 158, 11, 0.35); }
}

.brand h1 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-sub {
  margin: 0.1rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
  flex: 1;
  justify-content: center;
}

.metric {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.35rem 0.65rem;
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  min-width: 88px;
}

.metric-label {
  font-size: 0.65rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.metric-value {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--mint);
}

.metric-unit {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--muted);
}

.mode-badge {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(14, 165, 164, 0.12);
  font-size: 0.78rem;
  font-weight: 600;
}

.mode-badge.manual {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.45);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6);
  animation: pulse 1.6s infinite;
}

.mode-badge.manual .pulse-dot {
  background: var(--amber);
  box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.6);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(56, 189, 248, 0.1);
  color: var(--cyan);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}

.nav-link:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: var(--cyan);
}

.footer-link {
  color: var(--mint);
  text-decoration: none;
}

.footer-link:hover {
  text-decoration: underline;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

/* ── Steps ── */
.steps {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  padding: 0.5rem 0 0.85rem;
  scrollbar-width: thin;
}

.step {
  flex: 1;
  min-width: 96px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 8px;
  padding: 0.45rem 0.5rem;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s, background 0.2s, color 0.2s, transform 0.2s;
  font-family: inherit;
}

.step i {
  display: block;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  opacity: 0.7;
}

.step span {
  font-size: 0.72rem;
  font-weight: 600;
}

.step:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.step.active {
  color: var(--text);
  border-color: var(--mint);
  background: linear-gradient(180deg, rgba(14, 165, 164, 0.2), var(--bg-2));
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(14, 165, 164, 0.15);
}

.step.done {
  border-color: rgba(52, 211, 153, 0.35);
  color: var(--ok);
}

/* ── Panels ── */
.panel {
  background: linear-gradient(165deg, rgba(24, 34, 48, 0.92), rgba(12, 18, 25, 0.95));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem 1rem 1rem;
  margin-bottom: 0.85rem;
  box-shadow: var(--shadow);
}

.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.panel-head h2 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: var(--bg-1);
}

.subhead {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
}

.muted {
  color: var(--muted);
  font-weight: 400;
  font-size: 0.68rem;
}

/* ── Architecture SVG ── */
.arch-wrap {
  overflow-x: auto;
}

.arch-svg {
  width: 100%;
  min-width: 720px;
  height: auto;
  display: block;
}

.arch-label {
  fill: var(--text);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
}

.arch-desc {
  fill: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.arch-layer {
  transition: opacity 0.3s;
  opacity: 0.55;
}

.arch-layer.active {
  opacity: 1;
  filter: drop-shadow(0 0 8px rgba(94, 234, 212, 0.35));
}

.arch-layer.active rect {
  stroke-opacity: 0.9;
  animation: layerGlow 1.8s ease-in-out infinite;
}

@keyframes layerGlow {
  0%, 100% { stroke-opacity: 0.55; }
  50% { stroke-opacity: 1; }
}

.arch-flow {
  opacity: 0.4;
}

.arch-panel.active-flow .arch-flow {
  opacity: 1;
  stroke-dasharray: 4 4;
  animation: flowDash 0.8s linear infinite;
}

@keyframes flowDash {
  to { stroke-dashoffset: -16; }
}

/* ── Top split: console 4/6 + arch 2/6 ── */
.top-split {
  display: grid;
  grid-template-columns: 4fr 2fr;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
  align-items: stretch;
}

.top-split > .panel {
  margin-bottom: 0;
  min-width: 0;
}

.top-split .console-panel {
  display: flex;
  flex-direction: column;
}

.top-split .console-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  flex: 1;
}

.top-split .arch-panel {
  display: flex;
  flex-direction: column;
}

.top-split .arch-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.top-split .arch-svg {
  width: 100%;
  min-width: 0;
  height: auto;
  max-height: 280px;
}

.top-split .arch-desc {
  display: none;
}

.top-split .arch-label {
  font-size: 15px;
}

@media (max-width: 1100px) {
  .top-split {
    grid-template-columns: 1fr;
  }

  .top-split .arch-desc {
    display: initial;
  }

  .top-split .arch-svg {
    min-width: 560px;
    max-height: none;
  }
}

/* ── Console ── */
.console-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem 1rem;
}

.console-group label {
  display: block;
  font-size: 0.68rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.35rem;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.btn {
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.4rem 0.7rem;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--bg-3);
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.btn:hover {
  border-color: var(--line-strong);
  background: #1e2b3c;
}

.btn:active {
  transform: scale(0.97);
}

.btn.primary {
  background: rgba(14, 165, 164, 0.25);
  border-color: rgba(14, 165, 164, 0.55);
  color: var(--mint);
}

.btn.primary.active,
.btn.speed.active {
  background: rgba(14, 165, 164, 0.4);
  border-color: var(--mint);
  box-shadow: 0 0 12px rgba(14, 165, 164, 0.25);
}

.btn.accent {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.5);
  color: #fbbf24;
}

.btn.danger {
  background: rgba(244, 63, 94, 0.12);
  border-color: rgba(244, 63, 94, 0.4);
  color: #fda4af;
}

.btn.ghost {
  background: transparent;
  color: var(--muted);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.chk {
  display: inline-flex !important;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem !important;
  color: var(--muted) !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  margin: 0 !important;
  cursor: pointer;
}

.hint {
  margin: 0.75rem 0 0;
  font-size: 0.72rem;
  color: var(--muted);
  font-family: var(--font-mono);
}

/* ── Main grid ── */
.main-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 0.85rem;
}

@media (max-width: 1100px) {
  .main-grid {
    grid-template-columns: 1fr;
  }
}

.split {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 0.85rem;
}

@media (max-width: 800px) {
  .split {
    grid-template-columns: 1fr;
  }
}

/* ── GPU grid ── */
.gpu-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.4rem;
}

.gpu-slot {
  position: relative;
  aspect-ratio: 1.15;
  min-height: 64px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg-1);
  padding: 0.35rem;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.gpu-slot:hover {
  border-color: var(--line-strong);
}

.gpu-slot.idle.selected {
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25);
}

.gpu-slot.busy {
  border-color: rgba(245, 158, 11, 0.55);
  background: linear-gradient(160deg, rgba(245, 158, 11, 0.18), var(--bg-2));
  color: var(--text);
  cursor: pointer;
}

.gpu-slot.busy.selected {
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.4);
}

.gpu-slot .slot-id {
  opacity: 0.7;
}

.gpu-slot .slot-job {
  font-weight: 600;
  font-size: 0.68rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gpu-slot .slot-progress {
  height: 3px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 2px;
  overflow: hidden;
}

.gpu-slot .slot-progress > i {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--amber), var(--mint));
  transition: width 0.2s linear;
}

.gpu-slot.enter {
  animation: slotEnter 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes slotEnter {
  from { transform: scale(0.85); opacity: 0.3; }
  to { transform: scale(1); opacity: 1; }
}

/* ── Queue lists ── */
.queue-col {
  min-height: 180px;
  max-height: 340px;
  display: flex;
  flex-direction: column;
}

.queue-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-right: 0.2rem;
  min-height: 120px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 0.4rem;
  background: rgba(0, 0, 0, 0.2);
}

.queue-list.horizontal {
  flex-direction: row;
  flex-wrap: wrap;
  max-height: 120px;
  overflow-x: auto;
}

.queue-list:empty::after {
  content: "队列为空";
  color: var(--muted);
  font-size: 0.72rem;
  font-family: var(--font-mono);
  margin: auto;
  opacity: 0.6;
}

.job-card {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.5rem;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
  animation: cardIn 0.35s ease;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.job-card:hover {
  border-color: var(--line-strong);
}

.job-card.selected {
  border-color: var(--mint);
  box-shadow: 0 0 0 2px rgba(94, 234, 212, 0.2);
}

.job-card.priority {
  border-color: rgba(251, 113, 133, 0.55);
}

.job-stripe {
  width: 4px;
  align-self: stretch;
  border-radius: 2px;
  flex-shrink: 0;
}

.job-meta {
  flex: 1;
  min-width: 0;
}

.job-meta strong {
  display: block;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.job-meta span {
  font-size: 0.62rem;
  color: var(--muted);
}

.job-badge {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.15);
  color: var(--cyan);
  flex-shrink: 0;
}

.job-badge.hi {
  background: rgba(251, 113, 133, 0.18);
  color: var(--rose);
}

/* ── Ceph ── */
.ceph-channels {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ceph-ch {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg-1);
  transition: border-color 0.25s, box-shadow 0.25s;
}

.ceph-ch.active {
  border-color: rgba(163, 230, 53, 0.55);
  box-shadow: 0 0 20px rgba(163, 230, 53, 0.12);
  animation: cephFlash 0.6s ease;
}

@keyframes cephFlash {
  0% { background: rgba(163, 230, 53, 0.2); }
  100% { background: var(--bg-1); }
}

.ch-icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.72rem;
  background: rgba(163, 230, 53, 0.12);
  color: var(--lime);
  border: 1px solid rgba(163, 230, 53, 0.3);
}

.ch-body strong {
  display: block;
  font-size: 0.78rem;
}

.ch-body span {
  font-size: 0.65rem;
  color: var(--muted);
}

.ch-bar {
  margin-top: 0.3rem;
  height: 4px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 2px;
  overflow: hidden;
}

.ch-bar > i {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--lime), var(--mint));
  transition: width 0.35s ease;
}

.ch-stat {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--lime);
  white-space: nowrap;
}

.event-log {
  margin-top: 0.65rem;
  height: 160px;
  max-height: 160px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.5rem 0.55rem;
  background: rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(94, 234, 212, 0.35) transparent;
}

.event-log::-webkit-scrollbar {
  width: 6px;
}

.event-log::-webkit-scrollbar-thumb {
  background: rgba(94, 234, 212, 0.35);
  border-radius: 3px;
}

.event-log .ev {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.event-log .ev:first-child {
  animation: cardIn 0.3s ease;
}

.event-log .ev time {
  color: var(--cyan);
  flex-shrink: 0;
}

.event-log .ev.ckpt { color: var(--lime); }
.event-log .ev.ota { color: var(--rose); }
.event-log .ev.sched { color: var(--amber); }

/* ── Robots / OTA ── */
.ota-stage {
  position: relative;
  padding-top: 0.25rem;
}

.cloud-node {
  max-width: 420px;
  margin: 0 auto 0.25rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(251, 113, 133, 0.35);
  background: linear-gradient(180deg, rgba(251, 113, 133, 0.12), var(--bg-1));
  text-align: center;
}

.cloud-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--rose);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.model-ready-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  justify-content: center;
  margin-top: 0.4rem;
  min-height: 28px;
}

.model-chip {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: rgba(251, 113, 133, 0.15);
  border: 1px solid rgba(251, 113, 133, 0.35);
  color: #fecdd3;
  cursor: pointer;
  animation: cardIn 0.35s ease;
}

.model-chip.selected {
  border-color: var(--mint);
  box-shadow: 0 0 0 2px rgba(94, 234, 212, 0.2);
}

.ota-paths {
  width: 100%;
  height: 72px;
  display: block;
  margin: 0 auto;
}

.ota-paths .packet {
  fill: var(--rose);
  filter: drop-shadow(0 0 4px rgba(251, 113, 133, 0.8));
}

.robot-fleet {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.55rem;
}

@media (max-width: 700px) {
  .robot-fleet {
    grid-template-columns: repeat(2, 1fr);
  }
  .gpu-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.robot-card {
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-1);
  padding: 0.7rem 0.65rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
  min-height: 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.robot-card:hover {
  border-color: var(--line-strong);
}

.robot-card.selected {
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25);
}

.robot-card.busy {
  border-color: rgba(251, 113, 133, 0.5);
  background: linear-gradient(165deg, rgba(251, 113, 133, 0.15), var(--bg-2));
}

.robot-card.ota {
  animation: robotOta 1.2s ease-in-out infinite;
}

@keyframes robotOta {
  0%, 100% { box-shadow: 0 0 0 0 rgba(251, 113, 133, 0.3); }
  50% { box-shadow: 0 0 20px 2px rgba(251, 113, 133, 0.25); }
}

.robot-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  position: relative;
}

.bot-glyph {
  width: 18px;
  height: 14px;
  border: 2px solid var(--mint);
  border-radius: 4px;
  position: relative;
  display: block;
}

.bot-glyph::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 4px;
  background: var(--mint);
  border-radius: 1px;
}

.bot-glyph::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 2px;
  right: 2px;
  height: 3px;
  background: linear-gradient(90deg, var(--mint) 30%, transparent 30%, transparent 40%, var(--mint) 40%, var(--mint) 70%, transparent 70%, transparent 80%, var(--mint) 80%);
  border-radius: 1px;
}

.robot-icon::after {
  content: "";
  position: absolute;
  bottom: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px var(--ok);
}

.robot-card.busy .robot-icon::after {
  background: var(--amber);
  box-shadow: 0 0 8px var(--amber);
}

.robot-card.ota .robot-icon::after {
  background: var(--rose);
  box-shadow: 0 0 8px var(--rose);
  animation: pulse 1s infinite;
}

.robot-name {
  font-weight: 700;
  font-size: 0.82rem;
}

.robot-status {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--muted);
}

.robot-job {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--rose);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.robot-progress {
  width: 100%;
  height: 3px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 2px;
  overflow: hidden;
}

.robot-progress > i {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--rose), var(--amber));
  transition: width 0.2s linear;
}

.ota-bottom {
  margin-top: 0.75rem;
}

/* ── Footer / toasts ── */
.footer {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--muted);
  padding: 0.5rem 0 1rem;
  border-top: 1px solid var(--line);
  margin-top: 0.5rem;
}

.toast-stack {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-width: 320px;
}

.toast {
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  background: var(--bg-3);
  border: 1px solid var(--line-strong);
  font-size: 0.75rem;
  box-shadow: var(--shadow);
  animation: toastIn 0.35s ease;
}

.toast.warn {
  border-color: rgba(245, 158, 11, 0.5);
}

.toast.ok {
  border-color: rgba(52, 211, 153, 0.5);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Selection cursor hint */
.selectable {
  outline: none;
}
