/* ================================================================
   V2 AI Agent Mode — Styles
   ================================================================ */

/* API key / endpoint inputs */
.input-text {
  font-family: 'JetBrains Mono', monospace; font-size: .78rem;
  background: var(--bg-2); color: var(--fg-0); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 7px 10px; width: 100%; outline: none; transition: border-color .15s;
}
.input-text:focus { border-color: var(--accent); }

/* AI run button */
.btn-ai {
  background: linear-gradient(135deg, var(--purple), var(--accent));
}
.btn-ai:hover { filter: brightness(1.1); }

/* Progress indicator */
.ai-progress {
  font-size: .7rem; color: var(--fg-3); margin-top: 4px; min-height: 1em;
  font-family: 'JetBrains Mono', monospace;
}

/* Section card (admin) */
.section-card {
  padding: 8px; background: var(--bg-2); border-radius: var(--radius-sm);
  border: 1px solid var(--border); margin-bottom: 10px;
}
.section-card .form-row { margin-bottom: 4px; }

/* Inline key/endpoint inputs */
.input-key { margin-top: 4px; font-size: .72rem !important; padding: 5px 8px !important; }
.input-endpoint { margin-top: 2px; font-size: .72rem !important; padding: 5px 8px !important; opacity: .5; transition: opacity .15s; }
.input-endpoint:focus { opacity: 1; }

/* Agent roster — risk-group rows */
#agent-roster { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.roster-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px; align-items: center;
  padding: 8px; background: var(--bg-2); border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.roster-group-label {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 6px;
  font-size: .74rem; font-weight: 600; color: var(--fg-1); margin-bottom: 2px;
}
.roster-group-label .dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.roster-auto-count {
  margin-left: auto; width: 48px; height: 24px; padding: 2px 6px;
  font-family: 'JetBrains Mono', monospace; font-size: .68rem; font-weight: 500;
  color: var(--fg-2); background: var(--bg-1); border: 1px solid var(--border);
  border-radius: var(--radius-sm); text-align: center; cursor: default;
  opacity: .75;
}
.roster-row select {
  font-size: .74rem; padding: 4px 6px; height: 28px; min-width: 0;
}
.roster-row .input-key,
.roster-row .input-endpoint {
  grid-column: 1 / -1;
}

/* Orchestrator log entry */
.log-entries .log-orch {
  padding: 6px 10px; font-size: .72rem; margin-bottom: 4px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-2);
}

/* Paradigm button V2 active state */
.paradigm-btn[data-v="ai"].active {
  background: linear-gradient(135deg, var(--purple), var(--accent));
  color: #fff;
}

/* Navbar accent in AI mode */
body.mode-ai .navbar { border-bottom-color: var(--purple); }

/* Stats panel (V2 cross-model) */
.stats-panel { background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 16px; }
.stats-panel h4 { font-size: .78rem; font-weight: 600; color: var(--fg-1); margin-bottom: 8px; }
.stats-table-container { overflow-x: auto; }
.stats-table { width: 100%; border-collapse: collapse; font-size: .72rem; }
.stats-table th, .stats-table td { padding: 6px 10px; border-bottom: 1px solid var(--border); text-align: left; }
.stats-table th { font-weight: 600; color: var(--fg-2); text-transform: uppercase; letter-spacing: .04em; font-size: .62rem; }
.stats-table td { font-family: 'JetBrains Mono', monospace; }

/* ================================================================ Responsive overrides */
@media (max-width: 900px) {
  .sidebar .input-text { font-size: .74rem; padding: 5px 8px; }
}
