/* ── Fonts ───────────────────────────────────────────────────────────────── */
.font-mono { font-family: "Consolas", "Courier New", monospace !important; }

/* ── Navbar ──────────────────────────────────────────────────────────────── */
.navbar .btn { transition: none; }

/* ── Tags pills ──────────────────────────────────────────────────────────── */
#tags-pills .badge,
#team-tags-pills .badge { font-size: .82rem; cursor: default; }

/* ── Accordion ───────────────────────────────────────────────────────────── */
.accordion-button:not(.collapsed) { box-shadow: none; }

/* ── Client panel ────────────────────────────────────────────────────────── */
.client-panel { background: rgba(0,0,0,.07); }
[data-bs-theme="light"] .client-panel { background: rgba(0,0,0,.03); }

/* ── Terminal ────────────────────────────────────────────────────────────── */
.terminal {
  background:   #0d1117;
  color:        #c9d1d9;
  font-family:  "Consolas", "Courier New", monospace;
  font-size:    .78rem;
  line-height:  1.5;
  padding:      .6rem .85rem;
  min-height:   110px;
  max-height:   400px;
  overflow-y:   auto;
  white-space:  pre;
  word-break:   normal;
  overflow-x:   auto;
  cursor:       text;
  /* Terminal stays dark in both themes */
}
.terminal::-webkit-scrollbar      { width: 5px; }
.terminal::-webkit-scrollbar-track { background: transparent; }
.terminal::-webkit-scrollbar-thumb { background: #30363d; border-radius: 3px; }

/* ── xterm.js dock container ─────────────────────────────────────────────── */
.xterm-dock-wrap {
  height: 320px;
  background: #0d1117;
  overflow: hidden;
}
.xterm-dock-wrap .xterm {
  height: 100% !important;
  padding: .35rem .5rem;
}
.xterm-dock-wrap .xterm-viewport { background: transparent !important; }

/* ── Consoles actives (fixées en haut de la liste jobs) ──────────────────── */
#active-console-dock {
  position: sticky;
  top: 0.35rem;
  z-index: 1020;
  display: flex;
  gap: 0.5rem;
}
.active-console-panel {
  flex: 1 1 400px;
  min-width: 0;
  border-width: 2px !important;
}

/* ── Job card ────────────────────────────────────────────────────────────── */
.job-card .card-header {
  padding: .35rem .7rem;
  font-size: .82rem;
}
.job-card:not(:has(.job-console-body:not(.d-none))) .card-header {
  border-bottom: 0;
}
.job-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Input row (stdin) ───────────────────────────────────────────────────── */
.input-row .input-group-text { background: #161b22; border-color: #30363d; color: #8b949e; }
.job-stdin { font-family: "Consolas", monospace; font-size: .82rem; }

/* ── History table ───────────────────────────────────────────────────────── */
#hist-table td { vertical-align: middle; }

/* ── Stats cards ─────────────────────────────────────────────────────────── */
#cards-row .card { border-radius: .5rem; }
#cards-row .fs-3 { font-size: 1.4rem !important; }

/* ── Sankey chart ────────────────────────────────────────────────────────── */
#sankey-chart canvas { border-radius: 0 0 .375rem .375rem; }

/* ── Light mode adjustments ──────────────────────────────────────────────── */
[data-bs-theme="light"] .input-row .input-group-text {
  background: #f0f0f0;
  border-color: #ccc;
  color: #555;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 576px) {
  .terminal { max-height: 280px; font-size: .72rem; }
  .navbar-brand span { display: none; }
  #cards-row .fs-3 { font-size: 1.1rem !important; }
}

@media (max-width: 768px) {
  .table-responsive { font-size: .8rem; }
  #sankey-chart { height: 300px !important; }
}

/* ── Misc ────────────────────────────────────────────────────────────────── */
.btn-xs { padding: .1rem .3rem; font-size: .7rem; }
.text-nowrap { white-space: nowrap; }
