@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600&family=IBM+Plex+Sans:wght@400;500;600&family=Unbounded:wght@400;600;700&display=swap");

:root {
  --bg: #0b0f13;
  --panel: #121824;
  --panel-strong: #161f2d;
  --panel-accent: #101b20;
  --ink: #e8edf4;
  --muted: #9aa7b5;
  --accent: #f2c94c;
  --accent-2: #5ad0ff;
  --accent-3: #8ee6b2;
  --danger: #ff6b6b;
  --border: rgba(232, 237, 244, 0.14);
  --shadow: 0 22px 55px rgba(6, 10, 18, 0.65);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --font-display: "Unbounded", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, monospace;
}

* {
  box-sizing: border-box;
}

code {
  font-family: var(--font-mono);
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 720px at 90% -10%, rgba(90, 208, 255, 0.18), transparent 60%),
    radial-gradient(900px 720px at -20% 10%, rgba(242, 201, 76, 0.16), transparent 55%),
    linear-gradient(180deg, #0b0f13 0%, #0b121a 45%, #0a0f16 100%);
  min-height: 100vh;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 0);
  background-size: 3px 3px;
  opacity: 0.2;
  mix-blend-mode: screen;
}

body::after {
  background-image: linear-gradient(transparent 97%, rgba(255, 255, 255, 0.04) 98%);
  background-size: 100% 24px;
  opacity: 0.25;
}

.app,
.shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

.shell.is-collapsed {
  grid-template-columns: 88px 1fr;
}

.shell.is-collapsed .sidebar {
  padding: 20px 12px;
  align-items: center;
}

.shell.is-collapsed .brand {
  flex-direction: column;
  gap: 8px;
}

.shell.is-collapsed .brand__name,
.shell.is-collapsed .brand__meta,
.shell.is-collapsed .env-card,
.shell.is-collapsed .sidebar__footer .muted {
  display: none;
}

.shell.is-collapsed .nav__item {
  font-size: 0;
  padding: 10px 12px;
  text-align: center;
}

.shell.is-collapsed .nav__item::before {
  left: 50%;
  transform: translate(-50%, -50%);
}

.shell.is-collapsed .nav__item::after {
  content: attr(data-short);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.shell.is-collapsed .nav__group-toggle {
  font-size: 0;
  padding: 10px 12px;
  text-align: center;
}

.shell.is-collapsed .nav__group-toggle::before {
  left: 50%;
  transform: translate(-50%, -50%);
}

.shell.is-collapsed .nav__group-toggle::after {
  content: attr(data-short);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.shell.is-collapsed .nav__sub,
.shell.is-collapsed .nav__chevron {
  display: none;
}

.sidebar {
  padding: 28px 24px;
  border-right: 1px solid rgba(242, 201, 76, 0.08);
  background: rgba(11, 15, 20, 0.96);
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
}

.brand__mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgba(242, 201, 76, 0.85), rgba(90, 208, 255, 0.5)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 60%);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #0b0f13;
  font-size: 18px;
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  box-shadow: 0 12px 30px rgba(6, 10, 18, 0.55);
}

.brand__name {
  margin: 0;
  font-weight: 600;
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 0.04em;
}

.brand__meta {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.env-card {
  padding: 16px;
  border-radius: var(--radius-md);
  background: linear-gradient(160deg, rgba(18, 24, 36, 0.95), rgba(12, 19, 28, 0.95));
  border: 1px solid rgba(242, 201, 76, 0.16);
  box-shadow: var(--shadow);
}

.env-card__label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 0 0 4px;
}

.env-card__value {
  font-family: var(--font-display);
  font-size: 16px;
  margin: 0 0 12px;
}

.env-card__row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  padding: 6px 0;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nav__group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav__sub {
  display: none;
  flex-direction: column;
  gap: 8px;
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.nav__group--open > .nav__sub {
  display: flex;
}

.nav__item {
  text-decoration: none;
  color: var(--muted);
  padding: 10px 14px 10px 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 600;
  position: relative;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.nav__item::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
}

.nav__sub .nav__item {
  font-size: 13px;
  padding-left: 28px;
}

.nav__sub .nav__item::before {
  left: 14px;
}

.nav__item:hover,
.nav__item--active {
  color: var(--ink);
  background: rgba(242, 201, 76, 0.12);
  border-color: rgba(242, 201, 76, 0.28);
  box-shadow: 0 10px 26px rgba(6, 10, 18, 0.45);
}

.nav__item:hover::before,
.nav__item--active::before {
  background: var(--accent);
}

.nav__group-toggle {
  text-decoration: none;
  color: var(--muted);
  padding: 10px 14px 10px 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 600;
  position: relative;
  background: none;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.nav__group-toggle::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
}

.nav__chevron {
  margin-left: auto;
  width: 8px;
  height: 8px;
  border-right: 2px solid rgba(255, 255, 255, 0.4);
  border-bottom: 2px solid rgba(255, 255, 255, 0.4);
  transform: rotate(45deg);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.nav__group--open > .nav__group-toggle .nav__chevron {
  transform: rotate(-135deg);
}

.nav__group-toggle:hover,
.nav__group--active > .nav__group-toggle {
  color: var(--ink);
  background: rgba(242, 201, 76, 0.12);
  border-color: rgba(242, 201, 76, 0.28);
  box-shadow: 0 10px 26px rgba(6, 10, 18, 0.45);
}

.nav__group-toggle:hover::before,
.nav__group--active > .nav__group-toggle::before {
  background: var(--accent);
}

.nav__group-toggle:hover .nav__chevron,
.nav__group--active > .nav__group-toggle .nav__chevron {
  border-color: var(--accent);
}

.sidebar__footer {
  margin-top: auto;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.signal {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.signal__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px rgba(242, 201, 76, 0.6);
}

.main {
  padding: 32px 40px 80px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: 11px;
  color: rgba(242, 201, 76, 0.75);
  font-weight: 600;
  margin: 0 0 8px;
}

h1 {
  font-family: var(--font-display);
  font-size: 34px;
  letter-spacing: 0.02em;
  margin: 0;
}

h2 {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.02em;
  margin: 4px 0 0;
}

h3 {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.02em;
  margin: 0;
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.search {
  position: relative;
}

.search input {
  padding: 12px 36px 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(242, 201, 76, 0.2);
  background: rgba(12, 17, 26, 0.85);
  color: var(--ink);
  min-width: 260px;
}

.search__hint {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 2px 6px;
  border-radius: 6px;
}

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

.section {
  margin-top: 32px;
}

@keyframes lift {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.kpi {
  padding: 18px;
  border-radius: var(--radius-md);
  background: linear-gradient(160deg, rgba(18, 24, 36, 0.95), rgba(10, 15, 22, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
  animation: lift 0.6s ease both;
}

.kpi__label {
  color: var(--muted);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.14em;
  margin: 0 0 8px;
}

.kpi__value {
  font-size: 26px;
  margin: 0;
}

.kpi__hint {
  color: var(--muted);
  margin: 6px 0 0;
  font-size: 12px;
}

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.brainia-split {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(260px, 1fr);
  gap: 20px;
  align-items: stretch;
}

 .agents-split {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(0, 2fr);
  gap: 20px;
  align-items: stretch;
 }

@media (max-width: 960px) {
  .brainia-split {
    grid-template-columns: 1fr;
  }

  .agents-split {
    grid-template-columns: 1fr;
  }
}

.panel {
  background: linear-gradient(160deg, rgba(18, 24, 36, 0.95), rgba(12, 19, 28, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
  animation: lift 0.6s ease both;
}

.panel--accent {
  background: linear-gradient(160deg, rgba(242, 201, 76, 0.16), rgba(90, 208, 255, 0.08));
  border-color: rgba(242, 201, 76, 0.3);
}

.panel--subtle {
  background: rgba(16, 22, 30, 0.7);
}

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

.models-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.models-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.models-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.models-toolbar input {
  min-width: 220px;
  max-width: 320px;
}

.models-tabs .btn.is-active {
  background: rgba(90, 208, 255, 0.18);
  border-color: rgba(90, 208, 255, 0.4);
  color: #5ad0ff;
}

.models-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.model-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: rgba(8, 12, 18, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.model-row--empty {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: rgba(8, 12, 18, 0.4);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  color: var(--muted);
}

.model-row__title {
  font-weight: 600;
}

.model-row__meta {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.model-row__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel__head--stack {
  align-items: flex-start;
  flex-direction: column;
}

.panel--chat {
  display: flex;
  flex-direction: column;
  min-height: 620px;
}

.panel--side {
  display: flex;
  flex-direction: column;
  min-height: 620px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.service-card {
  padding: 14px;
  border-radius: var(--radius-md);
  background: rgba(16, 22, 32, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 32px rgba(6, 10, 18, 0.45);
  animation: lift 0.6s ease both;
}

.service-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.service-card__link {
  color: var(--muted);
  text-decoration: none;
  display: inline-block;
}

.service-card__link:hover {
  color: var(--accent-2);
  text-decoration: underline;
}

.status {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.status--ok {
  background: rgba(90, 208, 255, 0.2);
  color: var(--accent-2);
}

.status--warn {
  background: rgba(255, 107, 107, 0.2);
  color: var(--danger);
}

.status--neutral {
  background: rgba(231, 238, 246, 0.12);
  color: var(--muted);
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  box-shadow: 0 0 0 2px rgba(6, 10, 18, 0.5);
}

.status-dot--ok {
  background: #4ade80;
}

.status-dot--warn {
  background: #f59e0b;
}

.status-dot--off {
  background: #ef4444;
}

.tag {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(242, 201, 76, 0.2);
  color: var(--accent);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
}

.tag-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag--ok {
  background: rgba(90, 208, 255, 0.2);
  color: var(--accent-2);
}

.tag--warn {
  background: rgba(255, 107, 107, 0.2);
  color: var(--danger);
}

.tag--neutral {
  background: rgba(231, 238, 246, 0.18);
  color: var(--muted);
}

.tag--cloud {
  background: rgba(91, 124, 255, 0.2);
  color: #b6c7ff;
}

.tag--local {
  background: rgba(74, 222, 128, 0.2);
  color: #9ef0c3;
}

.tag--paid {
  background: rgba(255, 175, 56, 0.2);
  color: #ffcc7a;
}

.tag--free {
  background: rgba(125, 211, 252, 0.2);
  color: #bfe8ff;
}

.alerts {
  display: grid;
  gap: 12px;
}

.alert {
  padding: 12px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}

.alert__title {
  font-weight: 700;
  margin: 0 0 6px;
}

.jobs-layout {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(280px, 1.2fr);
  gap: 16px;
}

.jobs-stack {
  display: grid;
  gap: 10px;
}

.jobs-list {
  display: grid;
  gap: 12px;
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
}

.job-card {
  border-radius: var(--radius-md);
  background: rgba(18, 24, 36, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 14px;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  animation: lift 0.6s ease both;
}

.job-card:hover {
  transform: translateY(-2px);
  border-color: rgba(242, 201, 76, 0.4);
  box-shadow: 0 14px 30px rgba(6, 10, 18, 0.45);
}

.job-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.job-card__actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.job-card__title {
  font-weight: 700;
  margin: 0;
}

.job-card__meta {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.job-detail {
  border-radius: var(--radius-md);
  background: rgba(18, 24, 36, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px;
  min-height: 320px;
}

.job-detail__empty {
  color: var(--muted);
  font-size: 13px;
}

.job-detail__title {
  font-weight: 700;
  margin: 0 0 8px;
}

.job-steps {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.job-editor {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.6fr);
  gap: 16px;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.job-editor.is-single {
  grid-template-columns: 1fr;
}

.job-editor__panel.is-hidden {
  display: none;
}

.job-editor__tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.job-editor--graph {
  grid-template-columns: minmax(320px, 0.75fr) minmax(520px, 2.25fr);
}

.job-editor--readonly .job-editor__tabs,
.job-editor--readonly .job-editor__panel[data-editor-panel="info"],
.job-editor--readonly .job-editor__steps-actions {
  display: none;
}

.job-editor--readonly .graph-palette,
.job-editor--readonly .graph-toolbar .graph-actions,
.job-editor--readonly .graph-toolbar .graph-style,
.job-editor--readonly [data-graph-config-modal] {
  display: none;
}

.job-editor--readonly .graph-handle,
.job-editor--readonly .graph-node__delete,
.job-editor--readonly .graph-node__nav,
.job-editor--readonly .graph-node__panel {
  display: none;
}

.job-editor--readonly .graph-node__panel--info {
  display: grid;
}

.job-editor--readonly .graph-layout {
  grid-template-columns: 1fr;
}

.job-editor--readonly .graph-canvas {
  width: 100%;
}

.job-editor--readonly .graph-node {
  pointer-events: auto;
  cursor: grab;
}

.job-editor--readonly .graph-node.is-dragging {
  cursor: grabbing;
}

.job-editor--readonly .graph-edges,
.job-editor--readonly .graph-context {
  pointer-events: none;
}

.job-graph-page {
  display: grid;
  gap: 18px;
  min-height: calc(100vh - 220px);
}

.graph-fullscreen .sidebar,
.graph-fullscreen .topbar,
.graph-fullscreen #strategy-studio,
.graph-fullscreen .job-graph-library {
  display: none;
}

.graph-fullscreen .shell {
  grid-template-columns: 1fr;
}

.graph-fullscreen .main {
  padding: 0;
  grid-column: 1 / -1;
}

.graph-fullscreen .section {
  padding: 0;
}

.graph-fullscreen .job-graph-page {
  min-height: 100vh;
  border-radius: 0;
  margin: 0;
  box-shadow: none;
}

.graph-fullscreen .job-graph-page.panel--graph {
  border-radius: 0;
  border-left: 0;
  border-right: 0;
}

.graph-fullscreen .job-graph-head {
  padding: 14px 18px 0;
}

.graph-fullscreen .graph-canvas {
  height: 100%;
  min-height: 520px;
}

.graph-fullscreen .job-editor {
  height: calc(100vh - 180px);
  overflow: hidden;
}

.graph-fullscreen .job-editor__steps {
  height: 100%;
}

.graph-fullscreen .steps-graph {
  height: 100%;
}

.graph-fullscreen .graph-layout {
  height: 100%;
}

.job-graph-library__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.jobs-mini {
  display: grid;
  gap: 12px;
  margin-top: 10px;
}

.jobs-mini .job-card {
  padding: 10px 12px;
}

.jobs-mini .job-card__meta {
  font-size: 11px;
}

.panel--graph {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: radial-gradient(circle at top, rgba(40, 90, 120, 0.2), rgba(15, 20, 32, 0.92));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.job-graph-head {
  align-items: flex-start;
}

.job-graph-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.job-graph-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 4px;
}

.job-editor__form--info {
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  padding-right: 14px;
}

.job-editor__steps--details {
  padding-left: 8px;
}

.job-editor__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.job-editor__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.job-editor__grid label {
  font-size: 12px;
  color: var(--muted);
  display: grid;
  gap: 6px;
}

.job-editor__grid input,
.job-editor__grid textarea,
.job-editor__grid select {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 17, 26, 0.85);
  color: var(--ink);
  font-size: 12px;
}

.job-editor__full {
  grid-column: 1 / -1;
}

.job-editor__steps {
  display: grid;
  gap: 12px;
}

.job-editor__steps-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.job-editor__steps-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.steps-list {
  display: grid;
  gap: 12px;
}

.step-editor {
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(18, 24, 36, 0.92);
  display: grid;
  gap: 10px;
}

.step-editor.is-collapsed .step-editor__grid {
  display: none;
}

.step-editor__toggle {
  font-size: 11px;
}

.step-editor__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.step-editor__drag {
  cursor: grab;
  padding: 4px 8px;
  border-radius: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  color: var(--muted);
  font-size: 12px;
}

.step-editor__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.step-editor__grid label {
  font-size: 11px;
  color: var(--muted);
  display: grid;
  gap: 6px;
}

.step-editor__grid input,
.step-editor__grid textarea,
.step-editor__grid select {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 17, 26, 0.85);
  color: var(--ink);
  font-size: 12px;
}

.step-editor__full {
  grid-column: 1 / -1;
}

.steps-graph {
  display: grid;
  gap: 12px;
  position: relative;
  --edge-parent-color: rgba(244, 164, 96, 0.75);
  --edge-parent-dash: 0;
  --edge-dependency-color: rgba(90, 208, 255, 0.7);
  --edge-dependency-dash: 0;
  --edge-job-color: rgba(120, 214, 169, 0.65);
  --edge-job-dash: 6 4;
}

.job-graph-page .steps-graph {
  min-height: 520px;
}

.steps-graph.is-hidden {
  display: none;
}

.steps-list.is-hidden {
  display: none;
}

.steps-mermaid {
  display: grid;
  gap: 12px;
}

.steps-mermaid.is-hidden {
  display: none;
}

.mermaid-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.mermaid-diagram {
  min-height: 320px;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 17, 26, 0.7);
  overflow: auto;
}

.mermaid-diagram svg {
  max-width: 100%;
  height: auto;
}

.mermaid-source {
  width: 100%;
  min-height: 140px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 14, 20, 0.9);
  color: var(--ink);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New",
    monospace;
  font-size: 12px;
}

.graph-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.graph-hint {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.graph-actions {
  display: flex;
  gap: 8px;
}

.graph-style {
  display: grid;
  gap: 6px;
  font-size: 11px;
  color: var(--muted);
  margin-left: auto;
}

.graph-style__row {
  display: grid;
  grid-template-columns: auto auto auto;
  gap: 6px;
  align-items: center;
}

.graph-style__row input[type="color"],
.graph-style__row select {
  height: 26px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 17, 26, 0.85);
  color: var(--ink);
  font-size: 11px;
  padding: 2px 6px;
}

.graph-layout {
  display: grid;
  grid-template-columns: minmax(240px, 300px) 1fr;
  gap: 14px;
  align-items: stretch;
}

.graph-palette {
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 17, 26, 0.75);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 360px;
}

.graph-palette__head {
  display: grid;
  gap: 10px;
}

.graph-palette__tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.graph-palette__search {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 14, 20, 0.9);
  color: var(--ink);
  font-size: 12px;
}

.graph-palette__list {
  display: grid;
  gap: 10px;
  overflow: auto;
  padding-right: 4px;
  max-height: 62vh;
}

.graph-palette__pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: auto;
}

.graph-palette__section {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(18, 24, 36, 0.6);
}

.graph-palette__label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.graph-palette__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--ink);
}

.graph-palette__buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.graph-palette__buttons .btn.is-active {
  border-color: rgba(90, 208, 255, 0.6);
  box-shadow: 0 0 0 1px rgba(90, 208, 255, 0.2);
}

.graph-palette__item {
  text-align: left;
  border-radius: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(18, 24, 36, 0.9);
  color: var(--ink);
  display: grid;
  gap: 6px;
  cursor: grab;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.graph-palette__item:hover {
  border-color: rgba(90, 208, 255, 0.6);
  transform: translateY(-1px);
}

.graph-palette__item:active {
  cursor: grabbing;
}

.graph-palette__title {
  font-weight: 600;
  font-size: 13px;
}

.graph-palette__meta {
  font-size: 11px;
  color: var(--muted);
}

.graph-palette__empty {
  font-size: 12px;
  color: var(--muted);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 12px;
}

.graph-canvas.is-drop {
  border-color: rgba(90, 208, 255, 0.6);
  box-shadow: 0 0 0 2px rgba(90, 208, 255, 0.2);
}

.graph-empty {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  background: rgba(12, 17, 26, 0.7);
  color: var(--muted);
  font-size: 12px;
  pointer-events: none;
}

.graph-empty.is-hidden {
  display: none;
}

.graph-canvas {
  position: relative;
  min-height: 320px;
  height: min(60vh, var(--graph-content-height, 60vh));
  border-radius: var(--radius-md);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  background-color: rgba(12, 17, 26, 0.6);
  background-image: linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 24px 24px;
  overflow: auto;
}

.graph-edges {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.graph-nodes {
  position: relative;
  min-width: 1000px;
  min-height: 640px;
  z-index: 2;
}

.graph-node {
  position: absolute;
  width: 360px;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(18, 24, 36, 0.95);
  display: grid;
  gap: 8px;
  cursor: grab;
  box-shadow: 0 18px 40px rgba(7, 10, 18, 0.45);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.graph-node--job {
  width: 360px;
  background: rgba(30, 42, 68, 0.95);
  border-color: rgba(120, 214, 169, 0.35);
  cursor: default;
}

.graph-node--job .graph-node__badge {
  text-transform: uppercase;
}

.graph-node.is-dragging {
  cursor: grabbing;
  border-color: rgba(90, 208, 255, 0.6);
  box-shadow: 0 22px 60px rgba(10, 16, 28, 0.6);
}

.graph-node__header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.graph-node__status {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.graph-node__title {
  font-weight: 600;
  flex: 1;
  min-width: 0;
}

.graph-node__badge {
  font-size: 10px;
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 2px 6px;
  border-radius: 999px;
  flex-shrink: 0;
}

.graph-node__delete {
  margin-left: auto;
}

.graph-node__delete:hover {
  color: rgba(255, 140, 140, 0.95);
}

.graph-node__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.graph-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.02em;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(12, 17, 26, 0.6);
  color: var(--ink);
}

.graph-tag--auto {
  opacity: 0.7;
}

.graph-tag--agent {
  border-color: rgba(120, 214, 169, 0.6);
  color: rgba(157, 242, 197, 0.95);
}

.graph-tag--skill {
  border-color: rgba(90, 208, 255, 0.6);
  color: rgba(132, 226, 255, 0.95);
}

.graph-tag--tool {
  border-color: rgba(244, 164, 96, 0.6);
  color: rgba(255, 198, 148, 0.95);
}

.graph-tag--rule {
  border-color: rgba(175, 150, 255, 0.6);
  color: rgba(202, 184, 255, 0.95);
}

.graph-node__meta {
  font-size: 11px;
  color: var(--muted);
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.graph-node__nav {
  display: flex;
  gap: 6px;
  align-items: center;
}

.graph-node__tab {
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 14, 20, 0.85);
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.graph-node__tab.is-active {
  color: var(--ink);
  border-color: rgba(90, 208, 255, 0.5);
}

.graph-node__panel {
  display: none;
}

.graph-node__panel.is-active {
  display: grid;
  gap: 6px;
}

.graph-node__section {
  display: grid;
  gap: 6px;
}

.graph-node__section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.graph-node__summary {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.64);
  margin-top: 6px;
}

.graph-node__toggle {
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(10, 14, 20, 0.85);
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.graph-node__label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.graph-node__dropdown {
  display: none;
  gap: 6px;
}

.graph-node__dropdown.is-open {
  display: grid;
}

.graph-node__filter {
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 17, 26, 0.85);
  color: var(--ink);
  font-size: 11px;
}

.graph-node__checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  max-height: 120px;
  overflow: auto;
  padding: 6px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 14, 20, 0.7);
}

.graph-node__option {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 6px;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
}

.graph-node__empty {
  font-size: 11px;
  color: var(--muted);
}

.graph-handle {
  position: absolute;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-2);
  transform: translateY(-50%);
  box-shadow: 0 0 0 3px rgba(90, 208, 255, 0.15);
  z-index: 3;
}

.graph-handle--in {
  left: -6px;
}

.graph-handle--out {
  right: -6px;
}

.graph-edge {
  fill: none;
  stroke: rgba(90, 208, 255, 0.6);
  stroke-width: 2;
  cursor: pointer;
  pointer-events: stroke;
}

.graph-edge--dependency {
  stroke: var(--edge-dependency-color);
  stroke-dasharray: var(--edge-dependency-dash);
}

.graph-edge--parent {
  stroke: var(--edge-parent-color);
  stroke-dasharray: var(--edge-parent-dash);
}

.graph-edge--job {
  stroke: var(--edge-job-color);
  stroke-dasharray: var(--edge-job-dash);
}

.graph-edge__label {
  fill: rgba(255, 255, 255, 0.8);
  font-size: 10px;
  pointer-events: none;
}

.graph-edge__label--parent {
  fill: var(--edge-parent-color);
}

.graph-edge__label--job {
  fill: var(--edge-job-color);
}

.graph-edge--preview {
  stroke-dasharray: 6 6;
  stroke: rgba(254, 193, 95, 0.7);
  opacity: 0;
  pointer-events: none;
}

.graph-context {
  position: absolute;
  top: 0;
  left: 0;
  transform: translate(-9999px, -9999px);
  background: rgba(12, 17, 26, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  padding: 10px;
  display: grid;
  gap: 8px;
  min-width: 200px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  z-index: 5;
  opacity: 0;
  pointer-events: none;
}

.graph-context.is-open {
  opacity: 1;
  pointer-events: auto;
}

.graph-context__title {
  font-size: 12px;
  font-weight: 600;
}

.graph-context__group {
  display: grid;
  gap: 6px;
}

.graph-context__group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.graph-context__toggle {
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 14, 20, 0.85);
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.graph-context__summary {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.68);
}

.graph-context__dropdown {
  display: none;
  max-height: 180px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 6px;
  background: rgba(10, 14, 20, 0.85);
}

.graph-context__dropdown.is-open {
  display: grid;
  gap: 6px;
}

.graph-context label {
  font-size: 11px;
  color: var(--muted);
  display: grid;
  gap: 4px;
}

.graph-context select {
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 17, 26, 0.92);
  color: var(--ink);
  font-size: 11px;
}

.graph-config-modal {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 10, 16, 0.7);
  z-index: 6;
  padding: 20px;
}

.graph-config-modal.is-hidden {
  display: none;
}

.graph-config-modal__dialog {
  width: min(980px, 94vw);
  max-height: 88vh;
  background: rgba(16, 22, 34, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  padding: 16px;
  display: grid;
  gap: 12px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.graph-config-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.graph-config-modal__nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.graph-config-modal__tab {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 14, 20, 0.9);
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.graph-config-modal__tab.is-active {
  color: var(--ink);
  border-color: rgba(90, 208, 255, 0.5);
}

.graph-config-modal__body {
  overflow: auto;
  padding-right: 4px;
}

.graph-config-modal__section {
  display: none;
}

.graph-config-modal__section.is-active {
  display: block;
}

.graph-config-modal__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.graph-config-modal__grid label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.graph-config-modal__grid input,
.graph-config-modal__grid textarea,
.graph-config-modal__grid select {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 17, 26, 0.85);
  color: var(--ink);
  font-size: 12px;
}

.graph-config-modal__full {
  grid-column: 1 / -1;
}

.modal__card--tall {
  width: min(1100px, 96vw);
  max-height: 88vh;
  overflow: hidden;
  height: auto;
}

.step {
  padding: 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.step__meta {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.step__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.step__name {
  font-weight: 600;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filters select {
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 17, 26, 0.85);
  color: var(--ink);
  font-weight: 600;
  font-size: 12px;
}

.filters input {
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 17, 26, 0.85);
  color: var(--ink);
  font-weight: 600;
  font-size: 12px;
}

.pagination {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 10px;
}

.pagination select {
  padding: 6px 8px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 17, 26, 0.85);
  color: var(--ink);
  font-size: 12px;
}

.strategy-form {
  display: grid;
  gap: 12px;
}

.strategy-form textarea {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 17, 26, 0.85);
  color: var(--ink);
  font-size: 13px;
  min-height: 120px;
}

.strategy-form__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
}

.strategy-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
}

.strategy-toggle input {
  appearance: none;
  width: 34px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(90, 208, 255, 0.35);
  background: rgba(12, 18, 28, 0.8);
  position: relative;
  margin: 0;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.strategy-toggle input::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: rgba(196, 210, 224, 0.75);
  box-shadow: 0 0 6px rgba(90, 208, 255, 0.4);
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.strategy-toggle input:checked {
  border-color: rgba(242, 201, 76, 0.6);
  background: rgba(242, 201, 76, 0.2);
  box-shadow: inset 0 0 6px rgba(242, 201, 76, 0.2);
}

.strategy-toggle input:checked::after {
  transform: translateX(16px);
  background: #f6d777;
  box-shadow: 0 0 10px rgba(242, 201, 76, 0.5);
}

.btn.is-active {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 1px rgba(90, 208, 255, 0.25);
}

.tab-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.tab-btn {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(15, 22, 33, 0.85);
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
  transition: 0.2s ease;
}

.tab-btn.is-active {
  color: var(--ink);
  border-color: var(--accent-2);
  background: rgba(24, 36, 52, 0.95);
  box-shadow: 0 0 0 1px rgba(90, 208, 255, 0.25);
}

@media (max-width: 960px) {
  .job-editor {
    grid-template-columns: 1fr;
  }

  .job-editor--graph {
    grid-template-columns: 1fr;
  }

  .job-graph-footer {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

.registry-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.registry-tabs .btn.is-active {
  color: var(--ink);
  border-color: var(--accent-2);
  background: rgba(24, 36, 52, 0.95);
  box-shadow: 0 0 0 1px rgba(90, 208, 255, 0.25);
}

.registry-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.registry-actions input[type="file"] {
  display: none;
}

.registry-actions input[type="search"] {
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 17, 26, 0.85);
  color: var(--ink);
  font-weight: 600;
  font-size: 12px;
}

.registry-list {
  display: grid;
  gap: 12px;
}

.registry-card {
  padding: 14px;
  border-radius: var(--radius-md);
  background: rgba(18, 24, 36, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 8px;
  animation: lift 0.6s ease both;
}

.registry-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.registry-card__meta {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skills-form {
  display: grid;
  gap: 10px;
}

.skills-form label {
  font-size: 12px;
  color: var(--muted);
  display: grid;
  gap: 6px;
}

.skills-form input,
.skills-form select {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 17, 26, 0.85);
  color: var(--ink);
}

.skills-output {
  margin-top: 12px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 12px;
  white-space: pre-wrap;
  min-height: 120px;
}

.skills-output--cards {
  font-family: var(--font-body);
  font-size: 13px;
  white-space: normal;
  display: grid;
  gap: 12px;
}

.market-card {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 17, 26, 0.85);
  padding: 12px 14px;
  display: grid;
  gap: 8px;
}

.market-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.market-card__head h4 {
  margin: 0 0 6px 0;
  font-size: 14px;
}

.market-card__link {
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
}

.market-card__link:hover {
  text-decoration: underline;
}

.form-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 12, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: auto;
  z-index: 20;
}

.modal__card {
  background: var(--panel-strong);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 20px;
  min-width: 280px;
  max-width: 560px;
  max-height: 88vh;
  margin-top: 0;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal__card--wide {
  max-width: 720px;
}

.modal__card--xl {
  width: min(1520px, 95vw);
  max-width: 95vw;
}

.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.modal__tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.edit-view.is-hidden {
  display: none;
}

.edit-form {
  display: grid;
  gap: 10px;
}

.edit-view,
.edit-form,
#edit-json,
#edit-markdown-view {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.edit-form__steps {
  display: grid;
  gap: 10px;
}

.edit-form label {
  font-size: 12px;
  color: var(--muted);
  display: grid;
  gap: 6px;
}

.edit-form input,
.edit-form textarea {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 17, 26, 0.85);
  color: var(--ink);
  font-size: 12px;
}

.edit-markdown {
  display: grid;
  gap: 10px;
}

#edit-markdown-input {
  width: 100%;
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
}

.markdown-preview {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  padding: 12px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 12px;
  color: var(--muted);
  white-space: pre-wrap;
}

#edit-json {
  width: 100%;
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
}

.agent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.agent-card {
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(18, 24, 36, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 8px;
  animation: lift 0.6s ease both;
}

.agent-card__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}

.agent-card__meta {
  display: inline-flex;
  align-items: center;
  gap: 0;
}

.agent-card__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.agent-card--active {
  border-color: rgba(242, 201, 76, 0.6);
  box-shadow: 0 12px 30px rgba(6, 10, 18, 0.5);
}

.tab-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tab-group .is-active {
  background: rgba(242, 201, 76, 0.22);
  border-color: rgba(242, 201, 76, 0.45);
  color: #0b0f13;
}

.agent-console__meta {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
}

.agent-console__body {
  display: grid;
  gap: 16px;
}

.agent-form {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.agent-form label {
  font-size: 12px;
  color: var(--muted);
  display: grid;
  gap: 6px;
}

.agent-form input,
.agent-form textarea {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 17, 26, 0.85);
  color: var(--ink);
}

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

.form-label {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--muted);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.skills-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 17, 26, 0.85);
  font-size: 12px;
  color: var(--ink);
}

.skills-grid small {
  color: var(--muted);
}

.span-2 {
  grid-column: 1 / -1;
}

.checkbox {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}

.checkbox--inline {
  grid-column: 1 / -1;
}

.terminal-panel {
  display: grid;
  gap: 12px;
}

.agent-auth-hint {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  background: rgba(12, 17, 26, 0.6);
  font-size: 12px;
  color: var(--muted);
  display: grid;
  gap: 8px;
}

.agent-auth-hint__row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.agent-auth-hint__cmd {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #d7e6ee;
  background: rgba(5, 8, 12, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px 8px;
  border-radius: 8px;
  overflow-wrap: anywhere;
}

.agent-auth-hint__device {
  display: grid;
  gap: 8px;
}

.agent-auth-hint__device-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
}

.agent-auth-hint__value {
  font-family: var(--font-mono);
  color: #f4f8fb;
  word-break: break-all;
}

.terminal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.terminal-actions {
  display: flex;
  gap: 8px;
}

.terminal-log {
  min-height: 180px;
  max-height: 260px;
  overflow: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(5, 8, 12, 0.7);
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #d7e6ee;
  display: grid;
  gap: 6px;
}

.terminal-line {
  white-space: pre-wrap;
}

.terminal-line--meta {
  color: var(--muted);
  font-size: 11px;
}

.terminal-line--prompt {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #b7c8d6;
}

.terminal-prompt {
  color: var(--accent-2);
}

.terminal-input {
  outline: none;
  min-width: 20px;
  flex: 1;
  color: #d7e6ee;
  white-space: pre;
}

.terminal-input[contenteditable="false"] {
  opacity: 0.6;
}

.chat {
  min-height: 220px;
  max-height: 320px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 4px;
}

.chat--tall {
  flex: 1;
  max-height: none;
  min-height: 420px;
}

.chat-modes,
.chat-brainia-modes {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.chat-brainia-modes {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

.chat-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.chat-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.chat-selector-card {
  display: grid;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 24px;
  border: 1px solid rgba(242, 201, 76, 0.2);
  background:
    radial-gradient(220px 140px at 92% 12%, rgba(90, 208, 255, 0.18), transparent 62%),
    linear-gradient(140deg, rgba(18, 24, 36, 0.96), rgba(12, 16, 24, 0.92));
  box-shadow: 0 18px 45px rgba(6, 10, 18, 0.45);
  position: relative;
  overflow: hidden;
}

.chat-selector-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(242, 201, 76, 0.12), transparent 45%);
  opacity: 0.7;
  pointer-events: none;
}

.chat-selector-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.05) 0,
    rgba(255, 255, 255, 0.05) 1px,
    transparent 1px,
    transparent 6px
  );
  opacity: 0.08;
  pointer-events: none;
}

.chat-selector-card > * {
  position: relative;
  z-index: 1;
}

.chat-selector__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.chat-modes__label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-right: 4px;
}

.mode-toggle {
  border-radius: 999px;
  border: 1px solid rgba(90, 208, 255, 0.2);
  background: rgba(10, 15, 22, 0.7);
  color: var(--ink);
  transition:
    border-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.mode-toggle.is-active {
  border-color: rgba(242, 201, 76, 0.8);
  color: #f6d777;
  box-shadow: 0 10px 30px rgba(242, 201, 76, 0.18);
  transform: translateY(-1px);
}

.chat-selector__grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 1.4fr);
  gap: 16px;
}

.chat-selector__primary {
  display: grid;
  gap: 12px;
}

.chat-session {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  margin-top: 8px;
}

.chat-selector {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.chat-agent-multi {
  display: grid;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px dashed rgba(90, 208, 255, 0.28);
  background: rgba(6, 10, 16, 0.55);
}

.chat-agent-multi__label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.chat-agent-multi__label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.chat-agent-multi__badge {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(142, 230, 178, 0.35);
  color: rgba(142, 230, 178, 0.9);
  background: rgba(142, 230, 178, 0.1);
}

.chat-agent-multi__list {
  display: grid;
  gap: 10px;
}

.chat-agent-multi__hint {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.chat-agent-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 220px);
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(90, 208, 255, 0.18);
  background: rgba(8, 12, 18, 0.7);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.chat-agent-card.is-active {
  border-color: rgba(242, 201, 76, 0.5);
  box-shadow: 0 12px 26px rgba(242, 201, 76, 0.12);
}

.chat-agent-card__toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 6px 8px;
  border-radius: 12px;
  border: 1px solid rgba(90, 208, 255, 0.2);
  background: linear-gradient(120deg, rgba(10, 15, 22, 0.9), rgba(12, 18, 28, 0.85));
  font-size: 13px;
  font-family: var(--font-mono);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  appearance: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.chat-agent-card__toggle:hover {
  border-color: rgba(90, 208, 255, 0.45);
  box-shadow: 0 8px 18px rgba(90, 208, 255, 0.1);
  transform: translateY(-1px);
}

.chat-agent-card__toggle:focus-visible {
  outline: 2px solid rgba(90, 208, 255, 0.6);
  outline-offset: 2px;
}

.chat-agent-card__toggle-indicator {
  position: relative;
  width: 34px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(90, 208, 255, 0.35);
  background: rgba(90, 208, 255, 0.15);
  box-shadow: inset 0 0 8px rgba(6, 10, 16, 0.8);
  flex: 0 0 auto;
}

.chat-agent-card__toggle-indicator::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: rgba(196, 210, 224, 0.75);
  box-shadow: 0 0 6px rgba(90, 208, 255, 0.4);
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.chat-agent-card.is-active .chat-agent-card__toggle-indicator {
  border-color: rgba(242, 201, 76, 0.6);
  background: rgba(242, 201, 76, 0.25);
}

.chat-agent-card.is-active .chat-agent-card__toggle-indicator::after {
  transform: translateX(16px);
  background: #f6d777;
  box-shadow: 0 0 10px rgba(242, 201, 76, 0.5);
}

.chat-agent-card__id {
  letter-spacing: 0.02em;
}

.chat-agent-card__state {
  margin-left: auto;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(90, 208, 255, 0.22);
  color: rgba(154, 167, 181, 0.85);
  background: rgba(6, 10, 16, 0.8);
}

.chat-agent-card.is-active .chat-agent-card__state {
  border-color: rgba(242, 201, 76, 0.45);
  color: rgba(246, 215, 119, 0.95);
  background: rgba(36, 28, 10, 0.55);
}

.chat-agent-model {
  display: grid;
  gap: 6px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(154, 167, 181, 0.75);
}

.chat-agent-model__label {
  font-size: 10px;
}

.chat-agent-model-select,
.chat-agent-model-input {
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid rgba(90, 208, 255, 0.22);
  background: rgba(6, 10, 16, 0.85);
  color: var(--ink);
  font-size: 12px;
  text-transform: none;
  letter-spacing: normal;
}

.chat-agent-model-select:disabled,
.chat-agent-model-input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.chat-agent-model--static {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(154, 167, 181, 0.6);
}

.chat-agent-model__value {
  font-size: 12px;
  color: var(--ink);
  text-transform: none;
  letter-spacing: normal;
}

.chat-agent-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(90, 208, 255, 0.22);
  background: linear-gradient(120deg, rgba(12, 18, 28, 0.85), rgba(9, 13, 20, 0.9));
  font-size: 12px;
  color: var(--ink);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.chat-agent-chip input {
  width: 14px;
  height: 14px;
  accent-color: var(--accent-2);
}

.chat-agent-chip input:checked + span {
  color: #f6d777;
  text-shadow: 0 0 12px rgba(242, 201, 76, 0.25);
}

.chat-select {
  display: grid;
  gap: 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(154, 167, 181, 0.8);
}

.chat-select select {
  min-width: 160px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(90, 208, 255, 0.22);
  background: rgba(8, 12, 18, 0.85);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(10, 15, 22, 0.6);
}

.chat-select input {
  min-width: 180px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(90, 208, 255, 0.22);
  background: rgba(8, 12, 18, 0.85);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(10, 15, 22, 0.6);
}

#chat-model-input {
  display: none;
}

.chat-select--wide input {
  min-width: 240px;
}

@media (max-width: 900px) {
  .chat-selector__grid {
    grid-template-columns: 1fr;
  }
  .chat-agent-card {
    grid-template-columns: 1fr;
  }
}

.chat-bubble {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  font-size: 13px;
  line-height: 1.4;
  position: relative;
}

.chat-bubble__tokens {
  font-size: 10px;
  color: var(--muted);
  position: absolute;
  top: 6px;
  right: 8px;
}

.chat-bubble--self {
  background: rgba(199, 240, 0, 0.12);
  border-color: rgba(199, 240, 0, 0.3);
}

.chat-typing {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.chat-typing.is-hidden {
  display: none;
}

.chat-typing__bubble {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
}

.chat-typing__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  animation: chatTypingPulse 1.2s infinite ease-in-out;
}

.chat-typing__dot:nth-child(2) {
  animation-delay: 0.2s;
}

.chat-typing__dot:nth-child(3) {
  animation-delay: 0.4s;
}

.chat-typing__label {
  font-size: 12px;
  color: var(--muted);
}

@keyframes chatTypingPulse {
  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.35;
  }
  40% {
    transform: translateY(-4px);
    opacity: 0.9;
  }
}

.chat-form {
  margin-top: 12px;
  display: flex;
  gap: 10px;
}

.chat-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.chat-form input {
  flex: 1;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 17, 26, 0.85);
  color: var(--ink);
}

.strategy-split {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(220px, 1fr);
  gap: 20px;
  align-items: stretch;
}

.strategy-main {
  display: grid;
  gap: 12px;
}

.strategy-main textarea {
  width: 100%;
  min-height: 320px;
  resize: vertical;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 15, 22, 0.9);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
}

.strategy-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.strategy-side {
  display: grid;
  gap: 12px;
}

@media (max-width: 960px) {
  .strategy-split {
    grid-template-columns: 1fr;
  }
}

.side-tabs {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(10, 14, 20, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 12px;
}

.side-tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.side-tab.is-active {
  color: var(--ink);
  background: linear-gradient(120deg, rgba(90, 208, 255, 0.32), rgba(199, 240, 0, 0.22));
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

.side-pane {
  display: grid;
  gap: 12px;
  flex: 1;
}

.side-pane.is-hidden {
  display: none;
}

.side-pane__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.side-footer {
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
}

.job-feed {
  display: grid;
  gap: 10px;
  overflow: auto;
  max-height: 420px;
  padding-right: 4px;
}

.job-feed__item {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(16, 22, 32, 0.75);
  display: grid;
  gap: 8px;
}

.job-feed__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.job-feed__title {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
}

.job-feed__meta {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
}

.job-feed__actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.job-star {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.25);
}

.job-star--active {
  color: #f7d154;
  text-shadow: 0 0 12px rgba(247, 209, 84, 0.6);
}

.report-card {
  max-width: 860px;
}

.report-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.report-body {
  display: grid;
  gap: 16px;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.report-section {
  padding: 12px;
  border-radius: 12px;
  background: rgba(16, 22, 32, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.report-section h4 {
  margin: 0 0 6px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.report-section p {
  margin: 0;
  font-size: 13px;
}

.report-steps {
  display: grid;
  gap: 10px;
}

.report-step {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(12, 18, 28, 0.85);
}

.report-step__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.report-step__meta {
  font-size: 12px;
  color: var(--muted);
  display: grid;
  gap: 4px;
}

.workbench {
  display: grid;
  gap: 14px;
}

.workbench__item {
  padding: 12px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
}

.evidence-grid {
  margin-top: 12px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.evidence-shot {
  margin: 0;
  display: grid;
  gap: 6px;
}

.evidence-shot img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 17, 26, 0.85);
}

.accounts {
  display: grid;
  grid-template-columns: minmax(240px, 320px) 1fr;
  gap: 20px;
}

.admin-meta-grid {
  margin-top: 16px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.admin-grid {
  margin-top: 20px;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.admin-card {
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(16, 22, 32, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 12px;
}

.admin-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-list {
  display: grid;
  gap: 10px;
}

.admin-item {
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(7, 10, 16, 0.6);
  display: grid;
  gap: 6px;
}

.admin-item__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.admin-item__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.auth-body {
  background:
    radial-gradient(circle at top, rgba(242, 201, 76, 0.16), transparent 45%),
    radial-gradient(circle at 20% 20%, rgba(90, 208, 255, 0.12), transparent 50%),
    linear-gradient(180deg, rgba(10, 15, 22, 0.95), rgba(7, 10, 14, 0.98));
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-shell {
  width: min(520px, 100%);
}

.auth-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(160deg, rgba(18, 24, 36, 0.95), rgba(12, 19, 28, 0.95));
  box-shadow: var(--shadow);
  padding: 28px;
  display: grid;
  gap: 18px;
}

.auth-brand h1 {
  font-size: 32px;
}

.login {
  display: grid;
  gap: 10px;
}

.login label {
  font-size: 12px;
  color: var(--muted);
  display: grid;
  gap: 6px;
}

.login input {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 17, 26, 0.85);
  color: var(--ink);
}

.login select {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 17, 26, 0.85);
  color: var(--ink);
}

.accounts__list {
  display: grid;
  gap: 12px;
}

.account-card {
  padding: 14px;
  border-radius: var(--radius-md);
  background: rgba(18, 24, 36, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  animation: lift 0.6s ease both;
}

.mcp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.infra-grid {
  margin-top: 12px;
}

.infra-columns {
  margin-top: 16px;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(280px, 1.2fr) minmax(260px, 1fr);
}

.infra-card {
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(18, 24, 36, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 12px;
}

.infra-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mvp-grid {
  margin-top: 16px;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.mvp-grid--wide {
  grid-template-columns: minmax(320px, 1fr) minmax(320px, 1.2fr);
}

.mvp-card {
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(16, 22, 32, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 12px;
}

.mvp-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mvp-form__row {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.mvp-list {
  display: grid;
  gap: 12px;
}

.mvp-mission {
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(7, 10, 16, 0.6);
  display: grid;
  gap: 10px;
}

.mvp-mission.is-active {
  border-color: rgba(242, 201, 76, 0.35);
  box-shadow: 0 12px 28px rgba(6, 10, 18, 0.35);
}

.mvp-mission__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.mvp-mission__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mvp-mission__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mvp-artifact {
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 12, 18, 0.75);
  display: grid;
  gap: 10px;
}

.mvp-artifact__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mvp-meta {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
}

.mvp-code {
  margin: 0;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(4, 7, 12, 0.7);
  color: #d7e6ee;
  font-family: var(--font-mono);
  font-size: 12px;
  white-space: pre-wrap;
}

.mvp-scroll {
  max-height: 320px;
  overflow: auto;
}

.records-table {
  display: grid;
  gap: 8px;
  font-size: 12px;
}

.records-row {
  display: grid;
  grid-template-columns: 64px minmax(80px, 1fr) minmax(160px, 2fr) 64px 64px;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(12, 17, 26, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.records-row--head {
  color: var(--accent);
  background: rgba(242, 201, 76, 0.08);
  font-weight: 600;
}

.records-row--empty {
  padding: 12px;
  border-radius: 10px;
  background: rgba(12, 17, 26, 0.7);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  color: var(--muted);
}

.infra-kv {
  display: grid;
  gap: 10px;
}

.infra-kv__row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 10px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}

.infra-kv__row strong {
  color: var(--ink);
  font-weight: 600;
}

.mcp-card {
  padding: 14px;
  border-radius: var(--radius-md);
  background: rgba(18, 24, 36, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  animation: lift 0.6s ease both;
}

.mcp-card code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-2);
}

.footer {
  margin-top: 40px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.btn {
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 17, 26, 0.5);
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  border-color: rgba(242, 201, 76, 0.4);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn--primary {
  background: var(--accent);
  color: #0b0f13;
  border-color: rgba(242, 201, 76, 0.6);
  box-shadow: 0 12px 28px rgba(242, 201, 76, 0.35);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.04);
}

.btn--tiny {
  padding: 6px 10px;
  font-size: 12px;
}

.pill {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(242, 201, 76, 0.4);
  color: var(--accent);
  font-size: 12px;
}

.pill--neon {
  background: rgba(242, 201, 76, 0.15);
}

.pill--ok {
  border-color: rgba(120, 214, 169, 0.6);
  color: #78d6a9;
  background: rgba(120, 214, 169, 0.16);
}

.pill--muted {
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.muted {
  color: var(--muted);
}

.token-drawer {
  position: fixed;
  inset: auto 32px 32px auto;
  background: var(--panel-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow);
  display: none;
  max-width: 320px;
}

.token-drawer__body {
  display: grid;
  gap: 12px;
}

.token-drawer input {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 17, 26, 0.85);
  color: var(--ink);
}

.terminal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.termix-native {
  margin-top: 18px;
  display: grid;
  gap: 16px;
}

.termix-assist {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(22, 30, 44, 0.92);
}

.termix-assist[hidden] {
  display: none;
}

.termix-assist__copy {
  display: grid;
  gap: 6px;
}

.termix-assist__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.termix-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.termix-launchers,
.termix-sessions {
  display: grid;
  gap: 12px;
}

.termix-workspace {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(18, 30, 46, 0.94), rgba(11, 18, 28, 0.9));
  border: 1px solid rgba(90, 208, 255, 0.2);
}

.termix-workspace--managed {
  border-color: rgba(120, 214, 169, 0.32);
  box-shadow: inset 0 0 0 1px rgba(120, 214, 169, 0.08);
}

.termix-workspace__head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.termix-workspace__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.termix-workspace__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.termix-session {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(12, 18, 28, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.termix-session__meta {
  display: grid;
  gap: 4px;
}

.terminal-card {
  background: rgba(15, 24, 36, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 18px;
  display: grid;
  gap: 12px;
}

.terminal-card--accent {
  background: linear-gradient(135deg, rgba(90, 208, 255, 0.18), rgba(120, 214, 169, 0.15));
  border-color: rgba(90, 208, 255, 0.35);
}

.terminal-status {
  display: flex;
  align-items: center;
  gap: 12px;
}

.terminal-targets {
  display: grid;
  gap: 12px;
}

.terminal-target {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(12, 18, 28, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.terminal-target__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.terminal-target code {
  background: rgba(0, 0, 0, 0.35);
  color: var(--ink);
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 12px;
  display: inline-flex;
}

.terminal-target--host {
  background: rgba(25, 35, 50, 0.8);
  border-color: rgba(120, 214, 169, 0.35);
}

.terminal-target--empty {
  text-align: center;
  color: var(--muted);
}

@media (max-width: 1100px) {
  .app {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
  }

  .main {
    padding: 24px 22px 60px;
  }

  .accounts {
    grid-template-columns: 1fr;
  }

  .infra-columns {
    grid-template-columns: 1fr;
  }

  .jobs-layout {
    grid-template-columns: 1fr;
  }

  .graph-layout {
    grid-template-columns: 1fr;
  }

  .graph-palette {
    order: 2;
  }

  .mvp-grid--wide {
    grid-template-columns: 1fr;
  }

  .terminal-grid {
    grid-template-columns: 1fr;
  }

  .termix-summary {
    grid-template-columns: 1fr;
  }

  .termix-assist {
    align-items: flex-start;
  }
}

@media (max-width: 720px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .search input {
    min-width: 100%;
  }

  .records-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
