/* ==========================================================================
   pgvector Research UI — Light Theme
   ========================================================================== */

:root {
  --bg:      #f8f9fa;
  --s1:      #ffffff;
  --s2:      #f0f2f5;
  --bd:      #d8dde6;
  --blue:    #2563eb;
  --cyan:    #0891b2;
  --green:   #059669;
  --orange:  #d97706;
  --purple:  #7c3aed;
  --red:     #dc2626;
  --dim:     #94a3b8;
  --text:    #1a1a2e;
  --text-dim:#4b5563;
  --sidebar-width: 220px;
  --border-radius: 8px;
  --transition: 0.18s ease;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

code, pre, .mono, .log-line, .latex-source, td.num {
  font-family: "JetBrains Mono", "Fira Code", "Cascadia Code", Consolas, monospace;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ── */
.app-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: var(--s1);
  border-right: 1px solid var(--bd);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 100;
}

.sidebar-brand {
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--bd);
}

.sidebar-brand .brand-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sidebar-brand .brand-sub {
  font-size: 11px;
  color: var(--dim);
  margin-top: 2px;
}

.sidebar-nav {
  flex: 1;
  padding: 8px 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  cursor: pointer;
  color: var(--text-dim);
  font-size: 13px;
  border-left: 3px solid transparent;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  text-decoration: none;
}

.nav-item:hover {
  background: var(--s2);
  color: var(--text);
  text-decoration: none;
}

.nav-item.active {
  background: rgba(37, 99, 235, 0.08);
  color: var(--blue);
  border-left-color: var(--blue);
  font-weight: 600;
}

.nav-icon { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }

.nav-label { flex: 1; }

/* ── GPU Bar ── */
.gpu-bar {
  padding: 12px 14px;
  border-top: 1px solid var(--bd);
  background: var(--bg);
}

.gpu-bar-title {
  font-size: 10px;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.gpu-gauges {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.gpu-gauge {
  background: var(--s2);
  border: 1px solid var(--bd);
  border-radius: 6px;
  padding: 6px 8px;
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.gpu-gauge-label {
  font-size: 10px;
  color: var(--dim);
  display: flex;
  justify-content: space-between;
  transition: color 0.3s ease;
}

.gpu-gauge-bar {
  height: 5px;
  background: var(--bd);
  border-radius: 3px;
  margin-top: 4px;
  overflow: hidden;
}

.gpu-gauge-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease, background 0.5s ease, box-shadow 0.5s ease;
}

/* ── Main Content ── */
.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 4px;
}

.page-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.page-subtitle {
  font-size: 13px;
  color: var(--dim);
  margin-top: 2px;
}

/* ── Card ── */
.card {
  background: var(--s1);
  border: 1px solid var(--bd);
  border-radius: var(--border-radius);
  padding: 18px 20px;
  position: relative;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.card:hover {
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.card-glow-blue  { box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.2), 0 4px 16px rgba(37, 99, 235, 0.06); }
.card-glow-green { box-shadow: 0 0 0 1px rgba(5, 150, 105, 0.2), 0 4px 16px rgba(5, 150, 105, 0.06); }
.card-glow-cyan  { box-shadow: 0 0 0 1px rgba(8, 145, 178, 0.2), 0 4px 16px rgba(8, 145, 178, 0.06); }
.card-glow-orange{ box-shadow: 0 0 0 1px rgba(217, 119, 6, 0.2), 0 4px 16px rgba(217, 119, 6, 0.06); }

.card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title .icon { font-size: 16px; }

/* ── Pipeline 4-card layout ── */
.pipeline-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.pipeline-card {
  background: var(--s1);
  border: 1px solid var(--bd);
  border-radius: var(--border-radius);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition);
}

.pipeline-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--card-gradient-a, var(--blue)), var(--card-gradient-b, var(--cyan)));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.pipeline-card-1 { --card-gradient-a: var(--blue);   --card-gradient-b: var(--cyan); }
.pipeline-card-2 { --card-gradient-a: var(--green);  --card-gradient-b: var(--cyan); }
.pipeline-card-3 { --card-gradient-a: var(--purple);  --card-gradient-b: var(--blue); }
.pipeline-card-4 { --card-gradient-a: var(--orange); --card-gradient-b: var(--red); }

.pipeline-card-icon {
  font-size: 28px;
  margin-bottom: 10px;
}

.pipeline-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.pipeline-card-sub {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.pipeline-card-count {
  font-size: 28px;
  font-weight: 800;
  color: var(--blue);
  font-family: "JetBrains Mono", monospace;
}

.pipeline-card-count-label {
  font-size: 11px;
  color: var(--dim);
}

/* ── Status Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.badge-confirmed  { color: #047857;  background: #d1fae5; }
.badge-rejected   { color: #b91c1c;  background: #fee2e2; }
.badge-partial    { color: #92400e;  background: #fef3c7; }
.badge-pending    { color: #78700f;  background: #fef9c3; border: 1px solid #fde68a; }
.badge-running    { color: var(--blue);   background: #dbeafe; animation: pulse 1.4s ease infinite; }
.badge-completed  { color: #047857;  background: #d1fae5; }
.badge-failed     { color: #991b1b;  background: #fee2e2;  border: 1px solid #fca5a5; font-weight: 700; }
.badge-error      { color: #991b1b;  background: #fee2e2;  border: 1px solid #fca5a5; font-weight: 700; }
.badge-stopped    { color: #92400e;  background: #fef3c7; border: 1px solid #fde68a; }
.badge-idle       { color: var(--dim);    background: #e2e8f0; }
.badge-info       { color: #155e75;  background: #cffafe; }
.badge-not_applicable { color: #6b7280; background: #f3f4f6; border: 1px dashed #d1d5db; font-style: italic; }
.badge-na         { color: #6b7280; background: #f3f4f6; border: 1px dashed #d1d5db; font-style: italic; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

/* Status dot standalone */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot-green  { background: var(--green); box-shadow: 0 0 6px var(--green); }
.status-dot-blue   { background: var(--blue);  box-shadow: 0 0 6px var(--blue); animation: pulse 1.4s ease infinite; }
.status-dot-red    { background: var(--red);   box-shadow: 0 0 6px var(--red); }
.status-dot-gray   { background: var(--dim); }
.status-dot-orange { background: var(--orange); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}
.btn-primary:hover { background: #2563eb; border-color: #2563eb; }

.btn-success {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}
.btn-success:hover { background: #059669; }

.btn-danger {
  background: #fee2e2;
  color: var(--red);
  border-color: #fca5a5;
}
.btn-danger:hover { background: var(--red); color: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--text-dim);
  border-color: var(--bd);
}
.btn-ghost:hover { background: var(--s2); color: var(--text); border-color: var(--dim); }

.btn-cyan {
  background: #ecfeff;
  color: var(--cyan);
  border-color: #a5f3fc;
}
.btn-cyan:hover { background: #cffafe; }

.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-lg { padding: 10px 22px; font-size: 15px; font-weight: 600; }

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

/* ── Tables ── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--border-radius);
  border: 1px solid var(--bd);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead {
  background: var(--s2);
}

thead th {
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  color: var(--text-dim);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--bd);
  white-space: nowrap;
}

thead th.sortable {
  cursor: pointer;
  user-select: none;
  transition: color 0.2s ease, background 0.2s ease;
}

thead th.sortable:hover {
  color: var(--primary, #3b82f6);
  background: rgba(59, 130, 246, 0.06);
}

thead th.sortable .sort-arrow {
  font-size: 10px;
  opacity: 0.7;
}

tbody tr {
  border-bottom: 1px solid var(--bd);
  transition: background var(--transition);
}

tbody tr:hover { background: var(--s2); }
tbody tr:last-child { border-bottom: none; }

tbody td {
  padding: 9px 14px;
  color: var(--text);
  vertical-align: middle;
}

td.num {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: var(--blue);
}

td.dim { color: var(--text-dim); }

/* ── Terminal / Log Viewer ── */
.terminal {
  background: #02050d;
  border: 1px solid var(--bd);
  border-radius: var(--border-radius);
  padding: 14px 16px;
  font-family: "JetBrains Mono", monospace;
  font-size: 12.5px;
  line-height: 1.55;
  overflow-y: auto;
  color: #c8d8e8;
  max-height: 480px;
  white-space: pre-wrap;
  word-break: break-word;
}

.terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: #080c16;
  border: 1px solid var(--bd);
  border-bottom: none;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.terminal-header .dots {
  display: flex;
  gap: 6px;
}

.terminal-header .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red    { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green  { background: #28c840; }

.terminal-title {
  font-size: 12px;
  color: var(--dim);
}

.terminal.has-header {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.log-line { display: block; }
.log-line.log-err  { color: var(--red); }
.log-line.log-warn { color: var(--orange); }
.log-line.log-info { color: var(--cyan); }
.log-line.log-ok   { color: var(--green); }

/* ── Progress Bar ── */
.progress-wrap {
  background: var(--s2);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
  border: 1px solid var(--bd);
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  transition: width 0.5s ease;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--dim);
  margin-bottom: 5px;
}

/* ── Grid Layouts ── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }

.hypothesis-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

/* ── Hypothesis Card ── */
.hyp-card {
  background: var(--s1);
  border: 1px solid var(--bd);
  border-radius: var(--border-radius);
  padding: 14px 16px;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hyp-card:hover {
  border-color: rgba(37,99,235,0.3);
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.hyp-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hyp-id {
  font-size: 12px;
  font-weight: 700;
  color: var(--blue);
  font-family: "JetBrains Mono", monospace;
  background: #dbeafe;
  padding: 2px 7px;
  border-radius: 4px;
}

.hyp-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.hyp-expected {
  font-size: 11px;
  color: var(--text-dim);
  font-family: "JetBrains Mono", monospace;
}

.hyp-exp-link {
  font-size: 11px;
  color: var(--dim);
}

/* ── Agent Card ── */
.agent-card {
  background: var(--s1);
  border: 1px solid var(--bd);
  border-radius: var(--border-radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color var(--transition);
}

.agent-card:hover { border-color: rgba(37,99,235,0.25); }

.agent-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.agent-icon {
  font-size: 22px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--s2);
  border-radius: 8px;
  flex-shrink: 0;
}

.agent-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.agent-task {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.4;
}

/* ── Toast ── */
#toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9999;
  pointer-events: none;
}

.toast {
  background: var(--s1);
  border: 1px solid var(--bd);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text);
  max-width: 360px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.1);
  pointer-events: all;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slide-in 0.25s ease;
}

.toast-success { border-left: 3px solid var(--green); }
.toast-error   { border-left: 3px solid var(--red); }
.toast-info    { border-left: 3px solid var(--cyan); }
.toast-warn    { border-left: 3px solid var(--orange); }

@keyframes slide-in {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);   opacity: 1; }
}

@keyframes fade-out {
  from { opacity: 1; }
  to   { opacity: 0; transform: translateX(20px); }
}

.toast.fade-out { animation: fade-out 0.3s ease forwards; }

/* ── Forms ── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 14px;
}

.form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-control {
  background: var(--bg);
  border: 1px solid var(--bd);
  border-radius: 6px;
  color: var(--text);
  padding: 8px 12px;
  font-size: 13px;
  width: 100%;
  transition: border-color var(--transition);
  font-family: inherit;
}

.form-control:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
}

.form-control::placeholder { color: var(--dim); }

select.form-control { cursor: pointer; }

textarea.form-control {
  resize: vertical;
  min-height: 120px;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.form-check input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--blue);
  cursor: pointer;
}

/* ── Tabs ── */
.tab-nav {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--bd);
  margin-bottom: 16px;
  overflow-x: auto;
}

.tab-btn {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--dim);
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: all var(--transition);
}

.tab-btn:hover { color: var(--text); }

.tab-btn.active {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── Filter Buttons ── */
.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-btn {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid var(--bd);
  background: transparent;
  color: var(--dim);
  transition: all var(--transition);
}

.filter-btn:hover { background: var(--s2); color: var(--text); }
.filter-btn.active { background: var(--blue); color: #fff; border-color: var(--blue); }

/* ── LaTeX Source Viewer ── */
.latex-source {
  background: #020408;
  border: 1px solid var(--bd);
  border-radius: var(--border-radius);
  padding: 16px;
  font-size: 12px;
  line-height: 1.6;
  overflow: auto;
  max-height: 600px;
  color: #c8d8e8;
  tab-size: 2;
}

.latex-kw    { color: var(--blue); font-weight: 600; }
.latex-cmd   { color: var(--cyan); }
.latex-arg   { color: var(--orange); }
.latex-comment { color: var(--dim); font-style: italic; }
.latex-math  { color: var(--purple); }

/* ── Activity Log ── */
.activity-log {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: 360px;
  overflow-y: auto;
}

.activity-entry {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--bd);
  font-size: 12px;
}

.activity-entry:last-child { border-bottom: none; }

.activity-time {
  color: var(--dim);
  font-family: "JetBrains Mono", monospace;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 80px;
}

.activity-icon { font-size: 14px; flex-shrink: 0; }

.activity-text { color: var(--text); }
.activity-text .highlight { color: var(--cyan); }

/* ── Section viewer ── */
.markdown-body {
  color: var(--text);
  line-height: 1.7;
  font-size: 14px;
}

.markdown-body h1, .markdown-body h2, .markdown-body h3 {
  color: var(--text);
  margin: 1em 0 0.5em;
  font-weight: 700;
}

.markdown-body h1 { font-size: 20px; color: var(--blue); }
.markdown-body h2 { font-size: 17px; }
.markdown-body h3 { font-size: 15px; color: var(--text-dim); }

.markdown-body p { margin: 0.5em 0; }
.markdown-body ul, .markdown-body ol { padding-left: 1.5em; margin: 0.5em 0; }
.markdown-body li { margin: 0.25em 0; }

.markdown-body code {
  background: var(--s2);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 12px;
  color: var(--blue);
}

.markdown-body pre {
  background: var(--s2);
  border: 1px solid var(--bd);
  border-radius: 6px;
  padding: 12px;
  overflow-x: auto;
  margin: 0.75em 0;
}

.markdown-body pre code {
  background: none;
  padding: 0;
  color: var(--text);
}

.markdown-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.75em 0;
}

.markdown-body th, .markdown-body td {
  border: 1px solid var(--bd);
  padding: 6px 10px;
  text-align: left;
}

.markdown-body th { background: var(--s2); font-weight: 600; }

/* ── Figure Gallery ── */
.figure-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.figure-item {
  background: var(--s2);
  border: 1px solid var(--bd);
  border-radius: 6px;
  overflow: hidden;
  transition: border-color var(--transition);
}

.figure-item:hover { border-color: var(--blue); }

.figure-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  background: var(--bg);
}

.figure-caption {
  padding: 8px 10px;
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
}

/* ── Dependency DAG ── */
.dag-wrap {
  background: #02050d;
  border: 1px solid var(--bd);
  border-radius: 6px;
  padding: 14px 16px;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: var(--text-dim);
  overflow-x: auto;
  white-space: pre;
  line-height: 1.7;
}

.dag-node { color: var(--cyan); font-weight: 700; }
.dag-arrow { color: var(--dim); }
.dag-phase { color: var(--orange); font-weight: 600; }

/* ── Divider ── */
.divider {
  border: none;
  border-top: 1px solid var(--bd);
  margin: 4px 0;
}

/* ── Scrollbars ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--s2); }
::-webkit-scrollbar-thumb { background: #c1c9d4; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #a0aab8; }

/* ── Responsive ── */
@media (max-width: 1200px) {
  .pipeline-grid { grid-template-columns: repeat(2, 1fr); }
  .hypothesis-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .sidebar { width: 60px; min-width: 60px; }
  .nav-label, .sidebar-brand .brand-sub, .sidebar-brand .brand-title { display: none; }
  .gpu-bar { display: none; }
  .main-content { padding: 16px; }
  .hypothesis-grid { grid-template-columns: repeat(2, 1fr); }
  .pipeline-grid { grid-template-columns: 1fr; }
  .grid-5 { grid-template-columns: repeat(2, 1fr); }
}

/* ── Misc utilities ── */
.flex   { display: flex; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-2  { margin-top: 8px; }
.mt-3  { margin-top: 12px; }
.mt-4  { margin-top: 16px; }
.mb-2  { margin-bottom: 8px; }
.mb-3  { margin-bottom: 12px; }
.text-dim   { color: var(--dim); }
.text-cyan  { color: var(--cyan); }
.text-green { color: var(--green); }
.text-red   { color: var(--red); }
.text-orange{ color: var(--orange); }
.text-blue  { color: var(--blue); }
.text-sm    { font-size: 12px; }
.text-xs    { font-size: 11px; }
.font-mono  { font-family: "JetBrains Mono", monospace; }
.font-bold  { font-weight: 700; }
.truncate   { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden     { display: none !important; }
.w-full     { width: 100%; }
