/* Spec 030 v2 — Ligbox Agent Squad (mission console, scoped dark) */
#agentic-ops-content .ao-console {
  min-height: 520px;
  --ao-bg: #0a0e17;
  --ao-surface: #111827;
  --ao-surface-2: #1a2234;
  --ao-border: rgba(99, 102, 241, 0.22);
  --ao-border-strong: rgba(139, 92, 246, 0.45);
  --ao-text: #eef2ff;
  --ao-muted: #94a3b8;
  --ao-indigo: #6366f1;
  --ao-violet: #8b5cf6;
  --ao-cyan: #22d3ee;
  --ao-green: #34d399;
  --ao-amber: #fbbf24;
  --ao-red: #f87171;
  --ao-orange: #fb923c;
  font-family: 'DM Sans', system-ui, sans-serif;
  color: var(--ao-text);
  background:
    radial-gradient(ellipse 100% 60% at 50% -10%, rgba(99, 102, 241, 0.18), transparent 50%),
    radial-gradient(ellipse 80% 50% at 100% 0%, rgba(139, 92, 246, 0.12), transparent 45%),
    linear-gradient(180deg, #0d1220 0%, var(--ao-bg) 100%);
  border: 1px solid var(--ao-border);
  border-radius: 16px;
  padding: 1.1rem 1.25rem 1.35rem;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

#agentic-ops-content .ao-mission-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--ao-border);
}

#agentic-ops-content .ao-mission-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

#agentic-ops-content .ao-mission-title h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #e0e7ff 0%, #a5b4fc 50%, #c4b5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

#agentic-ops-content .ao-live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ao-green);
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.7);
  animation: ao-live-pulse 2s ease-in-out infinite;
}

#agentic-ops-content .ao-live-dot--warn { background: var(--ao-amber); box-shadow: 0 0 12px rgba(251, 191, 36, 0.6); }
#agentic-ops-content .ao-live-dot--alert { background: var(--ao-red); box-shadow: 0 0 14px rgba(248, 113, 113, 0.65); }

@keyframes ao-live-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.85; }
}

#agentic-ops-content .ao-stat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.5rem;
}

#agentic-ops-content .ao-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid var(--ao-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ao-muted);
}

#agentic-ops-content .ao-chip--tier { border-color: rgba(34, 211, 238, 0.35); color: #67e8f9; }
#agentic-ops-content .ao-chip--ok { border-color: rgba(52, 211, 153, 0.35); color: #6ee7b7; }
#agentic-ops-content .ao-chip--warn { border-color: rgba(251, 191, 36, 0.4); color: #fcd34d; }

#agentic-ops-content .ao-btn-mission {
  padding: 0.45rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--ao-border-strong);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.35), rgba(139, 92, 246, 0.25));
  color: #e0e7ff;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

#agentic-ops-content .ao-btn-mission:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
}

#agentic-ops-content .ao-section-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ao-muted);
  margin: 0 0 0.65rem;
}

#agentic-ops-content .ao-squad-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 0.65rem;
  margin-bottom: 1.35rem;
}

#agentic-ops-content .ao-squad-card {
  position: relative;
  padding: 0.85rem 0.65rem 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--ao-border);
  background: var(--ao-surface);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  overflow: hidden;
}

#agentic-ops-content .ao-squad-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.06) 0%, transparent 40%);
  pointer-events: none;
}

#agentic-ops-content .ao-squad-card:hover {
  transform: translateY(-2px);
  border-color: var(--ao-border-strong);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

#agentic-ops-content .ao-squad-card--selected {
  border-color: var(--ao-violet);
  box-shadow: 0 0 0 1px var(--ao-violet), 0 8px 28px rgba(139, 92, 246, 0.25);
}

#agentic-ops-content .ao-squad-card--alert {
  border-color: rgba(248, 113, 113, 0.45);
  animation: ao-card-glow 2.5s ease-in-out infinite;
}

@keyframes ao-card-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(248, 113, 113, 0.2); }
  50% { box-shadow: 0 0 20px rgba(248, 113, 113, 0.15); }
}

#agentic-ops-content .ao-avatar {
  width: 44px;
  height: 44px;
  margin: 0 auto 0.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  border: 2px solid rgba(255, 255, 255, 0.12);
  background: var(--ao-surface-2);
  position: relative;
}

#agentic-ops-content .ao-avatar-ring {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid transparent;
}

#agentic-ops-content .ao-squad-card--alert .ao-avatar-ring {
  border-color: var(--ao-red);
  animation: ao-ring-spin 4s linear infinite;
}

@keyframes ao-ring-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

#agentic-ops-content .ao-squad-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ao-text);
  line-height: 1.2;
}

#agentic-ops-content .ao-squad-id {
  font-size: 0.65rem;
  color: var(--ao-muted);
  margin-top: 0.15rem;
}

#agentic-ops-content .ao-squad-status {
  display: inline-block;
  margin-top: 0.45rem;
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

#agentic-ops-content .ao-squad-status--standby { background: rgba(52, 211, 153, 0.15); color: #6ee7b7; }
#agentic-ops-content .ao-squad-status--active { background: rgba(251, 191, 36, 0.18); color: #fcd34d; }
#agentic-ops-content .ao-squad-status--alert { background: rgba(248, 113, 113, 0.2); color: #fca5a5; }

#agentic-ops-content .ao-squad-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--ao-red);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

#agentic-ops-content .ao-main {
  display: grid;
  grid-template-columns: 1fr minmax(300px, 340px);
  gap: 1rem;
  align-items: start;
}

#agentic-ops-content .ao-kanban {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
  min-height: 220px;
}

#agentic-ops-content .ao-kanban-col {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  border: 1px solid var(--ao-border);
  padding: 0.55rem;
  min-height: 180px;
}

#agentic-ops-content .ao-kanban-col h4 {
  margin: 0 0 0.55rem;
  padding: 0.35rem 0.5rem;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: 6px;
  text-align: center;
}

#agentic-ops-content .ao-kanban-col--critical h4 { background: rgba(248, 113, 113, 0.2); color: #fca5a5; }
#agentic-ops-content .ao-kanban-col--high h4 { background: rgba(251, 146, 60, 0.2); color: #fdba74; }
#agentic-ops-content .ao-kanban-col--warn h4 { background: rgba(251, 191, 36, 0.15); color: #fde047; }
#agentic-ops-content .ao-kanban-col--info h4 { background: rgba(148, 163, 184, 0.12); color: #cbd5e1; }

#agentic-ops-content .ao-mission-card {
  padding: 0.65rem 0.7rem 0.65rem 0.85rem;
  margin-bottom: 0.45rem;
  border-radius: 8px;
  background: var(--ao-surface);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-left: 3px solid var(--ao-indigo);
  cursor: pointer;
  transition: all 0.15s;
}

#agentic-ops-content .ao-mission-card--critical { border-left-color: var(--ao-red); }
#agentic-ops-content .ao-mission-card--high { border-left-color: var(--ao-orange); }
#agentic-ops-content .ao-mission-card--warn { border-left-color: var(--ao-amber); }

#agentic-ops-content .ao-mission-card:hover,
#agentic-ops-content .ao-mission-card--active {
  border-color: var(--ao-violet);
  background: rgba(139, 92, 246, 0.08);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

#agentic-ops-content .ao-mission-card-title {
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.3rem;
}

#agentic-ops-content .ao-mission-card-meta {
  font-size: 0.68rem;
  color: var(--ao-muted);
  margin-bottom: 0.35rem;
}

#agentic-ops-content .ao-mission-card-action {
  font-size: 0.72rem;
  color: #c7d2fe;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.45rem;
}

#agentic-ops-content .ao-mission-card-btns {
  display: flex;
  gap: 0.3rem;
}

#agentic-ops-content .ao-mission-card-btns button {
  padding: 0.2rem 0.5rem;
  font-size: 0.65rem;
  border-radius: 5px;
  border: 1px solid var(--ao-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ao-text);
  cursor: pointer;
}

#agentic-ops-content .ao-mission-card-btns button:hover {
  background: rgba(99, 102, 241, 0.25);
  border-color: var(--ao-indigo);
}

#agentic-ops-content .ao-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--ao-muted);
}

#agentic-ops-content .ao-empty-state .ao-empty-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  opacity: 0.7;
}

#agentic-ops-content .ao-comms {
  background: var(--ao-surface);
  border: 1px solid var(--ao-border);
  border-radius: 12px;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 420px;
  position: sticky;
  top: 0.5rem;
}

#agentic-ops-content .ao-comms-header {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ao-cyan);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--ao-border);
}

#agentic-ops-content .ao-comms-feed {
  flex: 1;
  overflow-y: auto;
  max-height: 240px;
  padding: 0.45rem;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  font-size: 0.8rem;
}

#agentic-ops-content .ao-bubble {
  margin: 0.35rem 0;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  line-height: 1.4;
}

#agentic-ops-content .ao-bubble-agent {
  background: rgba(99, 102, 241, 0.15);
  border-left: 3px solid var(--ao-indigo);
}

#agentic-ops-content .ao-bubble-human {
  background: rgba(52, 211, 153, 0.1);
  border-left: 3px solid var(--ao-green);
}

#agentic-ops-content .ao-bubble-meta {
  font-size: 0.65rem;
  color: var(--ao-muted);
  margin-bottom: 0.2rem;
}

#agentic-ops-content .ao-comms textarea {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--ao-border);
  background: rgba(0, 0, 0, 0.3);
  color: var(--ao-text);
  font-size: 0.8rem;
  resize: vertical;
  font-family: inherit;
}

#agentic-ops-content .ao-comms textarea:focus {
  outline: none;
  border-color: var(--ao-violet);
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

#agentic-ops-content .ao-timeline-strip {
  margin-top: 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--ao-border);
}

#agentic-ops-content .ao-timeline-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  padding: 0.3rem 0;
  color: var(--ao-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

#agentic-ops-content .ao-timeline-row:last-child { border-bottom: none; }

#agentic-ops-content .ao-mobile-tabs {
  display: none;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

#agentic-ops-content .ao-mobile-tabs button {
  flex: 1;
  padding: 0.4rem;
  border-radius: 8px;
  border: 1px solid var(--ao-border);
  background: var(--ao-surface);
  color: var(--ao-muted);
  font-size: 0.75rem;
  cursor: pointer;
}

#agentic-ops-content .ao-mobile-tabs button.active {
  border-color: var(--ao-violet);
  color: var(--ao-text);
  background: rgba(139, 92, 246, 0.15);
}

#agentic-ops-content .ao-pane { display: block; }
#agentic-ops-content .ao-loading {
  text-align: center;
  padding: 3rem;
  color: var(--ao-muted);
}

@media (max-width: 1100px) {
  #agentic-ops-content .ao-main { grid-template-columns: 1fr; }
  #agentic-ops-content .ao-kanban { grid-template-columns: 1fr 1fr; }
  #agentic-ops-content .ao-comms { position: static; }
  #agentic-ops-content .ao-mobile-tabs { display: flex; }
  #agentic-ops-content .ao-pane:not(.ao-pane--active) { display: none; }
  #agentic-ops-content .ao-squad-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
}

@media (max-width: 600px) {
  #agentic-ops-content .ao-kanban { grid-template-columns: 1fr; }
  #agentic-ops-content .ao-task-board { grid-template-columns: 1fr; }
}

/* ── Content tabs (Mission Board / Task Board) ── */
#agentic-ops-content .ao-content-tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}

#agentic-ops-content .ao-content-tabs button {
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--ao-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ao-muted);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

#agentic-ops-content .ao-content-tabs button.active {
  border-color: var(--ao-violet);
  color: var(--ao-text);
  background: rgba(139, 92, 246, 0.18);
}

#agentic-ops-content .ao-content-pane { display: none; }
#agentic-ops-content .ao-content-pane--active { display: block; }

/* ── Task Board ── */
#agentic-ops-content .ao-task-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  min-height: 200px;
}

#agentic-ops-content .ao-task-col {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  border: 1px solid var(--ao-border);
  padding: 0.55rem;
  min-height: 160px;
}

#agentic-ops-content .ao-task-col h4 {
  margin: 0 0 0.55rem;
  padding: 0.35rem 0.5rem;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: 6px;
  text-align: center;
}

#agentic-ops-content .ao-task-col--wait h4 { background: rgba(251, 191, 36, 0.18); color: #fde047; }
#agentic-ops-content .ao-task-col--open h4 { background: rgba(99, 102, 241, 0.2); color: #c7d2fe; }
#agentic-ops-content .ao-task-col--new h4 { background: rgba(52, 211, 153, 0.15); color: #6ee7b7; }

#agentic-ops-content .ao-task-card {
  padding: 0.65rem 0.7rem;
  margin-bottom: 0.45rem;
  border-radius: 8px;
  background: var(--ao-surface);
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: all 0.15s;
}

#agentic-ops-content .ao-task-card:hover,
#agentic-ops-content .ao-task-card--active {
  border-color: var(--ao-violet);
  background: rgba(139, 92, 246, 0.08);
}

#agentic-ops-content .ao-task-card-head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.35rem;
}

#agentic-ops-content .ao-task-card-icon {
  font-size: 1.2rem;
  width: 28px;
  text-align: center;
}

#agentic-ops-content .ao-task-card-title {
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.25;
  flex: 1;
}

#agentic-ops-content .ao-task-card-meta {
  font-size: 0.66rem;
  color: var(--ao-muted);
}

#agentic-ops-content .ao-task-badge {
  display: inline-block;
  margin-top: 0.35rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(251, 191, 36, 0.2);
  color: #fcd34d;
}

#agentic-ops-content .ao-new-chat-box {
  padding: 0.65rem;
  border-radius: 8px;
  background: rgba(52, 211, 153, 0.08);
  border: 1px dashed rgba(52, 211, 153, 0.35);
}

#agentic-ops-content .ao-new-chat-box p {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  color: var(--ao-muted);
  line-height: 1.4;
}

#agentic-ops-content .ao-agent-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

#agentic-ops-content .ao-agent-pick {
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--ao-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ao-text);
  font-size: 0.68rem;
  cursor: pointer;
}

#agentic-ops-content .ao-agent-pick:hover,
#agentic-ops-content .ao-agent-pick--active {
  border-color: var(--ao-violet);
  background: rgba(139, 92, 246, 0.2);
}

#agentic-ops-content .ao-comms-hint {
  font-size: 0.72rem;
  color: var(--ao-muted);
  line-height: 1.45;
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid var(--ao-border);
  margin-bottom: 0.5rem;
}

#agentic-ops-content .ao-comms-hint strong { color: #c7d2fe; }

#agentic-ops-content .ao-composer {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid var(--ao-border);
}

#agentic-ops-content .ao-composer label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ao-cyan);
}

#agentic-ops-content .ao-composer-row {
  display: flex;
  gap: 0.4rem;
}

#agentic-ops-content .ao-composer-row textarea {
  flex: 1;
}

#agentic-ops-content .ao-btn-send {
  align-self: flex-end;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: none;
  background: linear-gradient(135deg, var(--ao-indigo), var(--ao-violet));
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

#agentic-ops-content .ao-btn-send:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

#agentic-ops-content .ao-squad-card[data-agent-id]:not([data-agent-id="ALL"])::after {
  content: '2× chat';
  position: absolute;
  bottom: 4px;
  left: 0;
  right: 0;
  font-size: 0.55rem;
  color: var(--ao-muted);
  opacity: 0;
  transition: opacity 0.2s;
}

#agentic-ops-content .ao-squad-card:hover::after { opacity: 0.7; }

/* ── Subnav (Agentic Ops screens) ── */
#agentic-ops-content .ao-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--ao-border);
}

#agentic-ops-content .ao-subnav-btn {
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--ao-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ao-muted);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

#agentic-ops-content .ao-subnav-btn.active {
  border-color: var(--ao-violet);
  color: var(--ao-text);
  background: rgba(139, 92, 246, 0.22);
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.15);
}

#agentic-ops-content .ao-subview { display: none; }
#agentic-ops-content .ao-subview--active { display: block; }

#agentic-ops-content .ao-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

#agentic-ops-content .ao-main--full {
  grid-template-columns: 1fr;
}

#agentic-ops-content .ao-comms-compact {
  margin-top: 0.85rem;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  border: 1px dashed var(--ao-border);
  background: rgba(99, 102, 241, 0.08);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  font-size: 0.78rem;
  color: var(--ao-muted);
}

#agentic-ops-content .ao-task-board--full {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#agentic-ops-content .ao-screen-head {
  margin-bottom: 1rem;
}

#agentic-ops-content .ao-screen-head h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

/* ── Agent Management ── */
#agentic-ops-content .ao-agent-mgmt-grid-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 0.85rem;
}

#agentic-ops-content .ao-agent-mgmt-card {
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid var(--ao-border);
  background: var(--ao-surface);
}

#agentic-ops-content .ao-agent-mgmt-head {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

#agentic-ops-content .ao-agent-mgmt-head h3 {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
}

#agentic-ops-content .ao-agent-mgmt-role {
  margin: 0;
  font-size: 0.78rem;
  color: var(--ao-cyan);
}

#agentic-ops-content .ao-avatar--lg {
  width: 52px;
  height: 52px;
  font-size: 1.5rem;
}

#agentic-ops-content .ao-agent-mgmt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
  font-size: 0.72rem;
}

#agentic-ops-content .ao-agent-mgmt-list {
  margin: 0.25rem 0 0;
  padding-left: 1rem;
  color: var(--ao-muted);
}

#agentic-ops-content .ao-agent-mgmt-scenarios {
  margin-bottom: 0.75rem;
  font-size: 0.72rem;
}

#agentic-ops-content .ao-btn-chat-agent {
  width: 100%;
}

#agentic-ops-content .ao-squad-chat-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--ao-border);
  background: rgba(139, 92, 246, 0.25);
  cursor: pointer;
  font-size: 0.75rem;
  opacity: 0;
  transition: opacity 0.15s;
}

#agentic-ops-content .ao-squad-card:hover .ao-squad-chat-btn,
#agentic-ops-content .ao-squad-card--selected .ao-squad-chat-btn {
  opacity: 1;
}

/* ── Knowledge Graph ── */
#agentic-ops-content .ao-kg-search {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

#agentic-ops-content .ao-kg-search input {
  flex: 1;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--ao-border);
  background: rgba(0, 0, 0, 0.3);
  color: var(--ao-text);
  font-size: 0.85rem;
}

#agentic-ops-content .ao-kg-layout {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 2fr;
  gap: 1rem;
}

#agentic-ops-content .ao-kg-graph {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-height: 480px;
  overflow-y: auto;
}

#agentic-ops-content .ao-kg-node {
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--ao-border);
  background: rgba(99, 102, 241, 0.08);
  font-size: 0.75rem;
}

#agentic-ops-content .ao-kg-node-title {
  font-weight: 700;
  margin-bottom: 0.2rem;
}

#agentic-ops-content .ao-kg-node-meta {
  color: var(--ao-muted);
  font-size: 0.68rem;
}

#agentic-ops-content .ao-kg-hit {
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.5rem;
  border-radius: 8px;
  border-left: 3px solid var(--ao-violet);
  background: rgba(0, 0, 0, 0.25);
  font-size: 0.78rem;
}

#agentic-ops-content .ao-kg-hit-src {
  font-size: 0.65rem;
  color: var(--ao-cyan);
  margin-bottom: 0.35rem;
}

#agentic-ops-content .ao-kg-hit-snippet {
  color: var(--ao-muted);
  line-height: 1.45;
}

/* ── Recurring Tasks ── */
#agentic-ops-content .ao-recurring-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

#agentic-ops-content .ao-recurring-card {
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--ao-border);
  background: var(--ao-surface);
}

#agentic-ops-content .ao-recurring-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

#agentic-ops-content .ao-recurring-head h4 {
  margin: 0;
  font-size: 0.88rem;
}

#agentic-ops-content .ao-recurring-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}

/* ── Activity Feed ── */
#agentic-ops-content .ao-activity-feed {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 620px;
  overflow-y: auto;
}

#agentic-ops-content .ao-activity-row {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 0.65rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(0, 0, 0, 0.2);
  font-size: 0.76rem;
}

#agentic-ops-content .ao-activity-time {
  color: var(--ao-muted);
  font-size: 0.68rem;
}

#agentic-ops-content .ao-activity-type {
  font-weight: 700;
  margin-bottom: 0.15rem;
}

#agentic-ops-content .ao-activity-msg {
  color: var(--ao-muted);
}

/* ── Chat Modal ── */
#agentic-ops-content .ao-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

#agentic-ops-content .ao-modal.ao-modal--open {
  display: flex;
}

body.ao-modal-open {
  overflow: hidden;
}

#agentic-ops-content .ao-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(4px);
}

#agentic-ops-content .ao-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(920px, 96vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  border: 1px solid var(--ao-border-strong);
  background: linear-gradient(180deg, #121a2e 0%, #0a0e17 100%);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

#agentic-ops-content .ao-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--ao-border);
  background: rgba(99, 102, 241, 0.1);
}

#agentic-ops-content .ao-modal-agent {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

#agentic-ops-content .ao-modal-icon {
  font-size: 2rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(139, 92, 246, 0.2);
}

#agentic-ops-content .ao-modal-name {
  font-size: 1rem;
  font-weight: 800;
}

#agentic-ops-content .ao-modal-sub {
  font-size: 0.72rem;
  color: var(--ao-muted);
}

#agentic-ops-content .ao-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--ao-border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ao-text);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

#agentic-ops-content .ao-modal-context {
  padding: 0.65rem 1.15rem;
  font-size: 0.78rem;
  color: var(--ao-muted);
  border-bottom: 1px solid var(--ao-border);
  min-height: 2rem;
}

#agentic-ops-content .ao-modal-feed {
  flex: 1;
  min-height: 320px;
  max-height: 52vh;
  overflow-y: auto;
  padding: 1rem 1.15rem;
  background: rgba(0, 0, 0, 0.25);
}

#agentic-ops-content .ao-modal-composer {
  padding: 1rem 1.15rem 1.15rem;
  border-top: 1px solid var(--ao-border);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

#agentic-ops-content .ao-modal-composer label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ao-cyan);
}

#agentic-ops-content .ao-modal-composer textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--ao-border);
  background: rgba(0, 0, 0, 0.35);
  color: var(--ao-text);
  font-size: 0.88rem;
  resize: vertical;
  min-height: 88px;
  font-family: inherit;
}

#agentic-ops-content .ao-modal-actions {
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 900px) {
  #agentic-ops-content .ao-kg-layout { grid-template-columns: 1fr; }
  #agentic-ops-content .ao-agent-mgmt-grid { grid-template-columns: 1fr; }
  #agentic-ops-content .ao-subnav-btn { font-size: 0.68rem; padding: 0.35rem 0.6rem; }
}

@media (max-width: 600px) {
  #agentic-ops-content .ao-modal-dialog { width: 100%; max-height: 96vh; }
  #agentic-ops-content .ao-modal-feed { max-height: 45vh; min-height: 240px; }
}

/* ── Chat markdown + streaming ── */
#agentic-ops-content .ao-bubble-body {
  line-height: 1.55;
}

#agentic-ops-content .ao-md-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0 0.75rem;
  font-size: 0.76rem;
}

#agentic-ops-content .ao-md-table th,
#agentic-ops-content .ao-md-table td {
  border: 1px solid var(--ao-border);
  padding: 0.35rem 0.5rem;
  text-align: left;
  vertical-align: top;
}

#agentic-ops-content .ao-md-table th {
  background: rgba(99, 102, 241, 0.15);
  color: #c7d2fe;
  font-weight: 700;
}

#agentic-ops-content .ao-md-hr {
  border: none;
  border-top: 1px solid var(--ao-border);
  margin: 0.75rem 0;
}

#agentic-ops-content .ao-bubble-agent .ao-md-h {
  color: #e0e7ff;
  border-left: 3px solid var(--ao-violet);
  padding-left: 0.5rem;
}


#agentic-ops-content .ao-md-p {
  margin: 0 0 0.45rem;
}

#agentic-ops-content .ao-md-h {
  margin: 0.5rem 0 0.35rem;
  font-size: 0.92rem;
}

#agentic-ops-content .ao-md-ul {
  margin: 0.25rem 0 0.55rem 1.1rem;
  padding: 0;
}

#agentic-ops-content .ao-md-ul li {
  margin-bottom: 0.25rem;
}

#agentic-ops-content .ao-md-code {
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.35);
  font-family: ui-monospace, monospace;
  font-size: 0.85em;
}

#agentic-ops-content .ao-bubble--typing .ao-stream-body {
  min-height: 1.2rem;
}

#agentic-ops-content .ao-typing-dots span {
  animation: ao-dot 1.2s infinite;
  opacity: 0.3;
}

#agentic-ops-content .ao-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
#agentic-ops-content .ao-typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes ao-dot {
  0%, 80%, 100% { opacity: 0.25; }
  40% { opacity: 1; }
}

#agentic-ops-content .ao-modal-feed {
  scroll-behavior: smooth;
}

#agentic-ops-content .ao-action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin-top: 0.65rem;
  padding-top: 0.55rem;
  border-top: 1px dashed var(--ao-border);
}

#agentic-ops-content .ao-action-bar-label {
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ao-cyan);
  width: 100%;
  margin-bottom: 0.15rem;
}

#agentic-ops-content .ao-action-btn {
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--ao-border);
  background: rgba(99, 102, 241, 0.12);
  color: var(--ao-text);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

#agentic-ops-content .ao-action-btn:hover:not(:disabled) {
  border-color: var(--ao-violet);
  background: rgba(139, 92, 246, 0.22);
}

#agentic-ops-content .ao-action-btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

#agentic-ops-content .ao-action-btn--run.ao-action-btn--critical,
#agentic-ops-content .ao-action-btn--run.ao-action-btn--high {
  border-color: rgba(248, 113, 113, 0.45);
  background: rgba(248, 113, 113, 0.12);
}

#agentic-ops-content .ao-action-btn--run.ao-action-btn--warn {
  border-color: rgba(251, 191, 36, 0.45);
  background: rgba(251, 191, 36, 0.1);
}

#agentic-ops-content .ao-action-btn--ack {
  border-color: rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.08);
}

#agentic-ops-content .ao-bubble-system {
  background: rgba(34, 211, 238, 0.08);
  border-left: 3px solid var(--ao-cyan);
  font-size: 0.78rem;
}
