:root {
  color-scheme: dark;
  font-family: Inter, Segoe UI, system-ui, sans-serif;
  background: #0b0f14;
  color: #e6edf3;
}

* {
  box-sizing: border-box;
}

html,
body,
#root {
  width: 100%;
  height: 100%;
  margin: 0;
}

.app-loading {
  display: grid;
  place-items: center;
  height: 100%;
  color: #8b949e;
}

.workspace-shell {
  display: grid;
  grid-template-columns: 340px 1fr;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  background: #0b0f14;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
  border-right: 1px solid #21262d;
  background: #0d1117;
  overflow-y: auto;
  overflow-x: hidden;
}

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

.sidebar__logo,
.vigthoria-logo {
  flex-shrink: 0;
  object-fit: contain;
}

.sidebar__error {
  color: #ff7b72;
  font-size: 12px;
  margin: 0;
}

.sidebar__section--highlight {
  padding: 10px;
  border: 1px solid #30363d;
  border-radius: 8px;
  background: #161b22;
}

.sidebar__cta--secondary {
  background: #21262d;
  color: #e6edf3;
}

.sidebar__cta--secondary:hover {
  background: #30363d;
}

.workspace-empty--blocked {
  padding: 32px;
  max-width: 520px;
}

.workspace-empty--blocked code {
  color: #79c0ff;
}

.sidebar__title {
  font-weight: 700;
}

.sidebar__subtitle {
  color: #8b949e;
  font-size: 12px;
}

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

.sidebar__section--grow {
  flex: 1;
}

.sidebar__section-title {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8b949e;
}

.sidebar__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar__item {
  width: 100%;
  text-align: left;
  border: 1px solid #21262d;
  background: #161b22;
  color: inherit;
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
}

.sidebar__workspace-row {
  position: relative;
}

.sidebar__workspace-delete {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 1;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #8b949e;
  cursor: pointer;
}

.sidebar__workspace-delete:hover,
.sidebar__workspace-delete:focus-visible {
  border-color: #f85149;
  background: rgba(248, 81, 73, 0.12);
  color: #ff7b72;
}

.sidebar__workspace-row .sidebar__item {
  padding-right: 40px;
}

.sidebar__item.is-active {
  border-color: #58a6ff;
  box-shadow: inset 0 0 0 1px rgba(88, 166, 255, 0.25);
}

.sidebar__item-name {
  display: block;
  font-weight: 600;
}

.sidebar__item-path {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: #8b949e;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: #8b949e;
}

.sidebar__field input {
  border: 1px solid #30363d;
  background: #0d1117;
  color: #e6edf3;
  border-radius: 8px;
  padding: 8px 10px;
}

.sidebar__cta {
  margin-top: 4px;
  border: none;
  border-radius: 8px;
  padding: 10px 12px;
  background: #238636;
  color: white;
  font-weight: 600;
  cursor: pointer;
}

.sidebar__meta {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid #21262d;
  font-size: 12px;
}

.sidebar__meta-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  color: #8b949e;
  min-width: 0;
}

.sidebar__meta-row .ok {
  color: #3fb950;
}

.sidebar__meta-row .warn {
  color: #d29922;
}

.workspace-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.workspace-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid #21262d;
  background: #0d1117;
}

.workspace-header h1 {
  margin: 0;
  font-size: 20px;
}

.workspace-header p {
  margin: 4px 0 0;
  color: #8b949e;
  font-size: 13px;
}

.workspace-header__warn {
  color: #ff7b72;
}

.workspace-header__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
}

.chip {
  border: 1px solid #30363d;
  background: #161b22;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
}

.chip--main {
  border-color: #58a6ff;
}

.chip--live {
  box-shadow: 0 0 0 1px rgba(63, 185, 80, 0.35);
}

.workspace-stage {
  flex: 1 1 0;
  min-height: 0;
  height: 0;
  padding: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.workspace-content {
  flex: 1 1 0;
  min-height: 0;
  height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  gap: 0;
}

.workspace-panes {
  flex: 1 1 0;
  min-height: 0;
  height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.workspace-content--with-tools .workspace-panes {
  flex: 1 1 0;
  min-height: 0;
  height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 32%);
  grid-template-rows: minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}

.workspace-content--with-tools .workspace-panes > * {
  min-height: 0;
  min-width: 0;
}

.pane-grid-host {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pane-grid {
  flex: 1 1 0;
  min-height: 0;
}

.pane-grid-host > .main-agent-pane,
.pane-grid-host > .xterm-pane {
  flex: 1 1 0;
  min-height: 0;
  height: 100%;
}

.workspace-content--with-tools .pane-grid-host {
  height: 100%;
}

.pane-grid,
.pane-grid.split-view,
.pane-grid .split-view-container,
.pane-grid .split-view-view,
.pane-grid .sash-container {
  height: 100%;
  min-height: 0;
}

.pane-grid .split-view-view {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pane-grid .split-view-view > * {
  flex: 1 1 0;
  min-height: 0;
  height: 100%;
}

.workspace-content--with-tools .services-panel {
  height: 100%;
}

.sidebar__settings {
  margin-left: auto;
  border: 1px solid #30363d;
  background: #161b22;
  color: #e6edf3;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  cursor: pointer;
}

.sidebar__empty,
.sidebar__hint {
  margin: 0;
  font-size: 12px;
  color: #8b949e;
}

.sidebar__field select,
.sidebar__field input {
  border: 1px solid #30363d;
  background: #0d1117;
  color: #e6edf3;
  border-radius: 8px;
  padding: 8px 10px;
}

.sidebar__path-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
}

.sidebar__path-row input {
  min-width: 0;
}

.sidebar__path-row button,
.settings-btn,
.sidebar__link {
  border: 1px solid #30363d;
  background: #21262d;
  color: #e6edf3;
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  font-size: 12px;
  white-space: nowrap;
}

.sidebar__link {
  background: transparent;
  text-align: left;
  padding-left: 0;
  border: none;
  color: #58a6ff;
}

.sidebar__item-preset {
  display: inline-block;
  margin-top: 6px;
  font-size: 10px;
  color: #58a6ff;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.sidebar__meta-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 180px;
  min-width: 0;
}

.agent-status {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding: 10px 20px;
  border-bottom: 1px solid #21262d;
  background: #101622;
  font-size: 12px;
}

.agent-status--running {
  box-shadow: inset 0 1px 0 rgba(88, 166, 255, 0.25);
}

.agent-status--complete {
  box-shadow: inset 0 1px 0 rgba(63, 185, 80, 0.25);
}

.agent-status--failed {
  box-shadow: inset 0 1px 0 rgba(248, 81, 73, 0.25);
}

.agent-status__group {
  display: flex;
  gap: 8px;
  align-items: center;
}

.agent-status__group--grow {
  flex: 1;
  min-width: 0;
}

.agent-status__label {
  color: #8b949e;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 10px;
}

.agent-status__value.ok { color: #3fb950; }
.agent-status__value.warn { color: #d29922; }
.agent-status__mono {
  font-family: Consolas, monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-panel {
  flex: 0 1 45%;
  min-height: 160px;
  max-height: 42vh;
  border: 1px solid #30363d;
  border-radius: 12px;
  background: #0d1117;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.report-panel__header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #21262d;
  background: #161b22;
}

.report-panel__header h2 {
  margin: 0;
  font-size: 16px;
}

.report-panel__header p {
  margin: 4px 0 0;
  color: #8b949e;
  font-size: 12px;
}

.report-panel__badge {
  align-self: flex-start;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #58a6ff;
  border: 1px solid rgba(88, 166, 255, 0.35);
  border-radius: 999px;
  padding: 4px 8px;
}

.report-panel__body {
  overflow: auto;
  padding: 16px 20px;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3 {
  color: #58a6ff;
  margin-top: 1.2em;
}

.markdown-body h1 { font-size: 1.4rem; border-bottom: 1px solid #21262d; padding-bottom: 0.3em; }
.markdown-body h2 { font-size: 1.15rem; }
.markdown-body strong { color: #f0f6fc; }
.markdown-body code {
  background: #161b22;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  font-family: Consolas, monospace;
}
.markdown-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 13px;
}
.markdown-body th,
.markdown-body td {
  border: 1px solid #30363d;
  padding: 8px 10px;
  text-align: left;
}
.markdown-body th {
  background: #161b22;
  color: #58a6ff;
}

.file-tree {
  border-top: 1px solid #21262d;
  padding-top: 12px;
}

.file-tree__header {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8b949e;
  margin-bottom: 6px;
}

.file-tree__path {
  font-size: 11px;
  color: #6e7681;
  margin-bottom: 8px;
  word-break: break-all;
}

.file-tree__list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 180px;
  overflow: auto;
  font-size: 12px;
}

.file-tree__list li {
  display: flex;
  gap: 6px;
  padding: 4px 0;
  color: #c9d1d9;
}

.file-tree__list .is-dir .file-tree__name { color: #58a6ff; }
.file-tree__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-tree__hint,
.file-tree__error {
  font-size: 12px;
  color: #8b949e;
}
.file-tree__error { color: #f85149; }

.workspace-empty__list {
  text-align: left;
  margin: 16px auto 0;
  max-width: 420px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(1, 4, 9, 0.72);
  display: grid;
  place-items: center;
  z-index: 100;
}

.modal {
  width: min(680px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

.modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid #21262d;
}

.modal__header h2 { margin: 0; }
.modal__close {
  border: none;
  background: transparent;
  color: #8b949e;
  font-size: 24px;
  cursor: pointer;
}

.modal__body { padding: 16px 18px 20px; }

.settings-section + .settings-section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #21262d;
}

.settings-section h3 {
  margin: 0 0 12px;
  font-size: 14px;
}

.settings-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
  font-size: 13px;
}

.settings-row input[type='text'],
.settings-row input:not([type='checkbox']) {
  width: 100%;
  border: 1px solid #30363d;
  background: #161b22;
  color: #e6edf3;
  border-radius: 8px;
  padding: 8px 10px;
}

.settings-log {
  margin-top: 10px;
  padding: 10px;
  background: #161b22;
  border-radius: 8px;
  font-size: 11px;
  white-space: pre-wrap;
  max-height: 160px;
  overflow: auto;
}

.workspace-empty {
  display: grid;
  place-items: center;
  height: 100%;
  color: #8b949e;
  text-align: center;
  gap: 12px;
}

.workspace-empty__logo {
  margin-bottom: 4px;
}

.workspace-footer {
  display: flex;
  justify-content: space-between;
  flex: 0 0 auto;
  padding: 10px 20px;
  border-top: 1px solid #21262d;
  color: #8b949e;
  font-size: 12px;
}

.workspace-footer__version {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.workspace-footer__update {
  border: 1px solid rgba(210, 153, 34, 0.6);
  background: rgba(210, 153, 34, 0.12);
  color: #d29922;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 11px;
  cursor: pointer;
}

.workspace-footer__update:hover {
  background: rgba(210, 153, 34, 0.22);
}

.pane-grid-host > .main-agent-pane {
  height: 100%;
  min-height: 0;
}

.xterm-pane {
  display: grid;
  grid-template-rows: auto 1fr;
  height: 100%;
  border: 1px solid #21262d;
  border-radius: 12px;
  overflow: hidden;
  background: #0d1117;
}

.xterm-pane--main {
  border-color: #388bfd;
  box-shadow: inset 0 0 0 1px rgba(56, 139, 253, 0.15);
}

.xterm-pane__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid #21262d;
  background: #161b22;
  font-size: 12px;
}

.xterm-pane__title {
  font-weight: 600;
}

.xterm-pane__badge {
  color: #8b949e;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 10px;
}

.xterm-pane__terminal {
  min-height: 0;
  height: 100%;
  padding: 4px;
}

.xterm-pane__terminal .xterm {
  height: 100%;
}

.main-agent-pane {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.main-agent-pane .xterm-pane {
  flex: 1;
  min-height: 0;
  height: 100%;
}

.auth-gate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 12px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  border: 1px solid #30363d;
  background: #161b22;
}

.auth-gate--info {
  border-color: #388bfd44;
  background: #0d1929;
}

.auth-gate--warn {
  border-color: #d2992244;
  background: #1c1608;
}

.auth-gate--error {
  border-color: #f8514944;
  background: #1c0f0f;
}

.auth-gate__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.auth-gate__text span {
  color: #8b949e;
}

.auth-gate__refresh {
  border: 1px solid #30363d;
  background: #21262d;
  color: #e6edf3;
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
  white-space: nowrap;
}

.auth-gate__actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.auth-gate__primary {
  border: 1px solid #238636;
  background: #238636;
  color: #fff;
  border-radius: 8px;
  padding: 6px 14px;
  cursor: pointer;
  font-weight: 700;
  white-space: nowrap;
}

.auth-gate__primary:disabled,
.settings-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.agent-status__group--auth {
  margin-left: auto;
}

.agent-status__auth {
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  padding: 0;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}

.agent-status__auth.ok { color: #3fb950; }
.agent-status__auth.warn { color: #d29922; }
.agent-status__auth.error { color: #ff7b72; }

.sidebar__auth {
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  padding: 0;
  text-align: right;
  text-decoration: underline dotted;
}

.workspace-comfort-row {
  flex: 0 0 auto;
  min-height: 148px;
  padding: 0 12px 8px;
  z-index: 2;
}

.agent-prompt {
  border: 1px solid #388bfd55;
  border-radius: 12px;
  padding: 12px 14px;
  background: #0d1117;
  box-shadow: inset 0 1px 0 rgba(56, 139, 253, 0.12);
  min-height: 132px;
}

.agent-prompt__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}

.agent-prompt__title {
  font-size: 12px;
  font-weight: 600;
}

.agent-prompt__hint {
  font-size: 11px;
  color: #8b949e;
}

.agent-prompt__input {
  width: 100%;
  resize: vertical;
  min-height: 54px;
  max-height: 140px;
  border: 1px solid #30363d;
  background: #161b22;
  color: #e6edf3;
  border-radius: 8px;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 13px;
}

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

.agent-prompt__send {
  border: none;
  background: #238636;
  color: #fff;
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 600;
}

.agent-prompt__send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.agent-prompt__history {
  flex: 1;
  border: 1px solid #30363d;
  background: #161b22;
  color: #e6edf3;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 12px;
}

.services-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border: 1px solid #21262d;
  border-radius: 12px;
  background: #0d1117;
  overflow: hidden;
}

.services-panel__tabs {
  flex-wrap: wrap;
  display: flex;
  border-bottom: 1px solid #21262d;
  background: #161b22;
}

.services-panel__tab {
  flex: 1;
  border: none;
  background: transparent;
  color: #8b949e;
  padding: 10px 8px;
  font-size: 12px;
  cursor: pointer;
}

.services-panel__tab.is-active {
  color: #e6edf3;
  box-shadow: inset 0 -2px 0 #388bfd;
}

.services-panel__body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.services-panel__intro {
  margin: 0;
  font-size: 12px;
  color: #8b949e;
  line-height: 1.45;
}

.services-panel__input {
  width: 100%;
  resize: vertical;
  border: 1px solid #30363d;
  background: #161b22;
  color: #e6edf3;
  border-radius: 8px;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 13px;
}

.services-panel__actions {
  display: flex;
  gap: 8px;
}

.services-panel__actions--wrap {
  flex-wrap: wrap;
}

.services-panel__field {
  display: grid;
  gap: 6px;
  color: #8b949e;
  font-size: 12px;
}

.services-panel__field input,
.services-panel__field select {
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 8px 10px;
  background: #0d1117;
  color: #e6edf3;
}

.services-panel__terminal {
  max-height: 360px;
  overflow: auto;
  white-space: pre-wrap;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 12px;
  background: #070a0e;
  color: #c9d1d9;
  font-size: 11px;
}

.service-health {
  display: grid;
  gap: 8px;
}

.service-health__row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 10px;
}

.service-health__row > div {
  display: grid;
  gap: 3px;
}

.service-health__row span {
  color: #8b949e;
  font-size: 11px;
}

.service-health__result {
  text-align: right;
}

.service-health__row.is-healthy .service-health__result strong {
  color: #3fb950;
}

.service-health__row.is-protected .service-health__result strong {
  color: #d29922;
}

.service-health__row.is-unhealthy .service-health__result strong {
  color: #ff7b72;
}

.services-panel__actions button {
  border: 1px solid #30363d;
  background: #21262d;
  color: #e6edf3;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 12px;
}

.services-panel__actions button.is-primary {
  background: #238636;
  border-color: #238636;
  color: #fff;
}

.services-panel__actions button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.services-panel__error {
  color: #ff7b72;
  font-size: 12px;
  margin: 0;
}

.services-panel__result {
  font-size: 12px;
  line-height: 1.5;
  padding: 10px;
  background: #161b22;
  border-radius: 8px;
  border: 1px solid #21262d;
  max-height: 320px;
  overflow: auto;
}

.services-panel .report-panel {
  border: none;
  border-radius: 0;
  flex: 1;
  min-height: 0;
}

.settings-row--stack {
  grid-template-columns: 1fr;
  gap: 6px;
}

.settings-row--stack select,
.settings-row--stack input {
  width: 100%;
}

.settings-note,
.settings-hint {
  font-size: 12px;
  color: #8b949e;
  margin: 0 0 10px;
  line-height: 1.45;
}

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

.settings-login-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid #30363d;
  border-radius: 8px;
  background: #161b22;
}

.settings-link {
  background: none;
  border: none;
  color: #58a6ff;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
  margin: 2px 0 10px;
  text-decoration: underline;
}

.settings-btn {
  border: 1px solid #30363d;
  background: #21262d;
  color: #e6edf3;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 13px;
}

.settings-btn--primary {
  background: #238636;
  border-color: #238636;
  color: #fff;
  font-weight: 700;
}

.settings-btn--danger {
  background: #3d1518;
  border-color: #d1414a;
  color: #ffb3b8;
}

.settings-btn--danger:hover:not(:disabled) {
  background: #5a1d21;
}

.settings-inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.settings-inline input {
  min-width: 0;
}

.settings-account {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid #30363d;
  border-radius: 10px;
  background: #161b22;
  margin-bottom: 10px;
  font-size: 13px;
}

.settings-account span,
.settings-status {
  color: #8b949e;
  font-size: 12px;
  line-height: 1.45;
}

.settings-account.is-ok {
  border-color: rgba(63, 185, 80, 0.35);
}

.settings-account.is-warn {
  border-color: rgba(210, 153, 34, 0.35);
}

.settings-status.ok { color: #3fb950; }
.settings-status.warn { color: #d29922; }

.goa-panel__label {
  font-size: 0.75rem;
  color: #8b949e;
  margin: 0.5rem 0 0.25rem;
}

.goa-panel__json {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.72rem;
}

.goa-panel__catalog {
  margin-top: 0.75rem;
  font-size: 0.78rem;
  color: #8b949e;
}

.goa-panel__catalog ul {
  margin: 0.25rem 0 0.5rem 1rem;
  padding: 0;
}

.goa-panel__log {
  margin-top: 0.75rem;
  padding: 0.65rem;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  font-size: 0.72rem;
  white-space: pre-wrap;
  max-height: 240px;
  overflow: auto;
}


.chip--v4 {
  border-color: rgba(72, 187, 120, 0.55);
  color: #baf5d0;
}

.chip--spawned { border-color: rgba(88, 166, 255, 0.55); }
.chip--running { border-color: rgba(72, 187, 120, 0.55); }
.chip--finished { border-color: rgba(120, 230, 180, 0.65); }
.chip--error,
.chip--timeout { border-color: rgba(255, 123, 114, 0.7); }
.chip--cancelled { border-color: rgba(210, 153, 34, 0.7); }


.v4-subagents-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
  min-height: 0;
  border: 1px solid #21262d;
  border-radius: 12px;
  background: #0d1117;
  overflow: hidden;
}

.v4-subagents-panel.is-collapsed {
  padding-bottom: 10px;
}

.v4-subagents-panel__header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 14px 0;
}

.v4-subagents-panel__header h2 {
  margin: 0;
  font-size: 15px;
}

.v4-subagents-panel__header p {
  margin: 4px 0 0;
  color: #8b949e;
  font-size: 12px;
}

.v4-subagents-panel__toggle {
  border: 1px solid #30363d;
  background: #161b22;
  color: #e6edf3;
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
}

.v4-subagents-panel__tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 14px 2px;
}

.v4-subagents-panel__tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #30363d;
  background: #161b22;
  color: #8b949e;
  border-radius: 999px;
  padding: 8px 10px;
  cursor: pointer;
  white-space: nowrap;
}

.v4-subagents-panel__tab.is-active {
  color: #e6edf3;
  border-color: #58a6ff;
  box-shadow: inset 0 0 0 1px rgba(88, 166, 255, 0.25);
}

.v4-subagent-pane {
  min-height: 240px;
  max-height: 320px;
  margin: 0 14px 14px;
}

.v4-subagent-pane__meta {
  padding: 8px 14px;
  border-bottom: 1px solid #21262d;
  color: #8b949e;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.v4-subagent-pane__terminal {
  flex: 1 1 auto;
  min-height: 0;
  padding: 12px 14px;
  overflow: auto;
  background: #0d1117;
}

.v4-subagent-pane__terminal pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font: 12px/1.45 "Cascadia Code", "JetBrains Mono", Consolas, monospace;
  color: #dce6f2;
}

.v4-subagents-panel__header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.v4-subagents-panel__view-switch {
  display: inline-flex;
  border: 1px solid #30363d;
  border-radius: 8px;
  overflow: hidden;
}

.v4-subagents-panel__view-switch button {
  border: none;
  background: #161b22;
  color: #8b949e;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 12px;
}

.v4-subagents-panel__view-switch button.is-active {
  background: #1f2937;
  color: #e6edf3;
}

.v4-canvas {
  margin: 0 14px;
  border: 1px solid #21262d;
  border-radius: 10px;
  background: #0d1117;
}

.v4-canvas__svg {
  display: block;
  width: 100%;
  height: 220px;
}

.v4-canvas__node {
  cursor: pointer;
}

.v4-canvas__node--main {
  cursor: default;
}

.v4-canvas__node circle {
  transition: stroke-width 0.15s ease;
}

.v4-canvas__node.is-active circle {
  filter: drop-shadow(0 0 6px rgba(88, 166, 255, 0.6));
}

.v4-canvas__node--pulse circle {
  animation: v4-canvas-pulse 1.6s ease-in-out infinite;
}

@keyframes v4-canvas-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

.v4-canvas__label {
  font: 11px/1.3 "Cascadia Code", "JetBrains Mono", Consolas, monospace;
  fill: #e6edf3;
  pointer-events: none;
  user-select: none;
}

.v4-canvas__label--id {
  fill: #8b949e;
}

.v4-canvas__label--status {
  text-transform: uppercase;
  font-size: 9px;
  letter-spacing: 0.04em;
}
