/* ── Base ─────────────────────────────────────────────────────────────── */
body {
  background-color: #0d0f14;
  color: #c9d1d9;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
}

/* ── Brand ───────────────────────────────────────────────────────────── */
.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: #f0b429;
  color: #0d0f14;
  font-weight: 900;
  font-size: 16px;
  border-radius: 6px;
}

/* ── Cards ───────────────────────────────────────────────────────────── */
.card {
  background-color: #161b22;
  border-radius: 10px;
}

.entity-card {
  transition: border-color 0.15s, transform 0.15s;
  cursor: pointer;
}
.entity-card:hover {
  border-color: #f0b429 !important;
  transform: translateY(-2px);
}

/* ── Status pills ────────────────────────────────────────────────────── */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
  white-space: nowrap;
}
.status-pill.active {
  background: rgba(63, 185, 80, 0.15);
  color: #3fb950;
  border: 1px solid rgba(63, 185, 80, 0.3);
}
.status-pill.inactive {
  background: rgba(110, 118, 129, 0.1);
  color: #6e7681;
  border: 1px solid rgba(110, 118, 129, 0.2);
}
.status-pill.flag-danger {
  background: rgba(248, 81, 73, 0.15);
  color: #f85149;
  border: 1px solid rgba(248, 81, 73, 0.4);
}
.status-pill.flag-warn {
  background: rgba(210, 153, 34, 0.15);
  color: #d29922;
  border: 1px solid rgba(210, 153, 34, 0.35);
}

/* ── Terminal ────────────────────────────────────────────────────────── */
.terminal-output {
  background: #0d0f14;
  color: #c9d1d9;
  font-family: "SF Mono", "Fira Code", "Cascadia Code", Menlo, monospace;
  font-size: 12.5px;
  line-height: 1.6;
  min-height: 120px;
  max-height: 420px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
  border-radius: 0 0 10px 10px;
}

/* Color terminal lines */
.terminal-output .line-ok     { color: #3fb950; }
.terminal-output .line-err    { color: #f85149; }
.terminal-output .line-warn   { color: #f0b429; }
.terminal-output .line-dim    { color: #6e7681; }
.terminal-output .line-action { color: #ff9500; font-weight: bold; }

/* Action summary panel shown after pipeline completes */
#action-summary {
  background: #1c1a14;
  border: 1px solid #ff9500;
  border-radius: 6px;
  padding: 12px 16px;
  margin-top: 8px;
  font-family: "SF Mono", "Fira Code", Menlo, monospace;
  font-size: 12.5px;
}
#action-summary .action-header {
  color: #ff9500;
  font-weight: bold;
  margin-bottom: 6px;
}
#action-summary .action-context {
  color: #888;
  font-size: 11px;
  margin-top: 8px;
  margin-bottom: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#action-summary .action-item {
  color: #ffd580;
  line-height: 1.7;
  white-space: pre-wrap;
}
#action-summary .action-item::before { content: "▸ "; }

/* ── Tables ──────────────────────────────────────────────────────────── */
.table-dark {
  --bs-table-bg: transparent;
  --bs-table-striped-bg: rgba(255,255,255,0.02);
  font-size: 13px;
}
.table th {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #8b949e;
  border-bottom-color: #30363d !important;
  white-space: nowrap;
}
.table td {
  border-color: #21262d;
  vertical-align: middle;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sortable { cursor: pointer; user-select: none; }
.sortable:hover { color: #e6edf3; }

/* ── Tool sections ───────────────────────────────────────────────────── */
.tool-section {
  padding-bottom: 6px;
  border-bottom: 1px solid #21262d;
}

/* ── Empty states ────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
}

/* ── Network iframe ──────────────────────────────────────────────────── */
.network-frame {
  height: 620px;
  border-radius: 0 0 10px 10px;
  background: #0d0f14;
}

/* ── Nav tabs ────────────────────────────────────────────────────────── */
.nav-tabs .nav-link {
  color: #8b949e;
  border-color: transparent;
  font-size: 13px;
  padding: 0.6rem 1rem;
}
.nav-tabs .nav-link.active {
  background: #161b22;
  border-color: #30363d #30363d #161b22;
  color: #e6edf3;
}
.nav-tabs .nav-link:hover:not(.active) {
  color: #c9d1d9;
  border-color: transparent;
}

/* ── Upload inputs ───────────────────────────────────────────────────── */
input[type="file"].form-control {
  font-size: 12px;
  color: #8b949e;
}

/* ── Scrollbar ───────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #30363d; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #484f58; }
