/* Additions on top of styles.css for the manager page */

.manage-shell {
  display: grid;
  grid-template-columns: 64px 320px minmax(0, 1fr);
  height: 100%;
  min-height: 0;
}

/* nav rail */
.rail {
  background: var(--bg-subtle);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  padding: 12px 8px;
  gap: 4px;
}
.rail-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px;
  height: 56px; width: 100%;
  border: 0; border-radius: var(--r-md);
  background: transparent; cursor: pointer;
  color: var(--text-muted);
  font-size: 10.5px; letter-spacing: 0.02em;
}
.rail-btn:hover { background: var(--row-hover); color: var(--text); }
.rail-btn.active { background: white; color: var(--text); box-shadow: 0 0 0 1px var(--border); }
.rail-btn .num {
  position: absolute; transform: translate(18px, -16px);
  font-size: 10px; background: var(--text); color: white;
  border-radius: 999px; padding: 0 5px; height: 14px; line-height: 14px;
}
.rail .sp { flex: 1; }

/* list column */
.list-col {
  background: var(--bg-subtle);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  min-height: 0;
  min-width: 0;
}
.list-head {
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
}
.list-head .list-title-row {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 8px;
  min-width: 0;
}
.list-head .list-actions-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  min-width: 0;
}
.list-head .list-actions-row .btn {
  flex: 0 0 auto;
}
.list-head h2 {
  margin: 0; font-size: 15px; font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.list-head .count {
  font-size: 11.5px; color: var(--text-muted); font-family: var(--font-mono);
  background: white; border: 1px solid var(--border); border-radius: 999px;
  padding: 1px 7px;
  flex: 0 0 auto;
}
.list-head .row2 {
  display: flex; gap: 6px;
  min-width: 0;
}
.search-input {
  position: relative; flex: 1;
}
.search-input input {
  width: 100%; height: 28px;
  background: white; border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 0 8px 0 28px; font-size: 12.5px; outline: none;
}
.search-input input:focus { border-color: #0d0d0d; }
.search-input .ic {
  position: absolute; left: 8px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); pointer-events: none;
}

.list-scroll { overflow-y: auto; flex: 1; padding: 6px 8px 12px; }

.list-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r-md);
  cursor: pointer;
  margin-bottom: 2px;
}
.list-item:hover { background: var(--row-hover); }
.list-item.active { background: white; box-shadow: 0 0 0 1px var(--border); }

/* Per-row hover-X delete(skills + MCP list items 后续也可复用)*/
.list-item .row-delete { opacity: 0 !important; }
.list-item:hover .row-delete { opacity: 1 !important; }
.list-item .row-delete:hover { background: var(--danger-bg, #fee) !important; color: #c62828 !important; }
.list-item .av {
  width: 28px; height: 28px; border-radius: 7px;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700; color: white;
  flex-shrink: 0;
}
.list-item .av.mono { font-family: var(--font-mono); font-size: 11px; }
.list-item .meta { min-width: 0; flex: 1; }
.list-item .ttl {
  font-size: 13px; font-weight: 500; color: var(--text);
  display: flex; align-items: center; gap: 6px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.list-item .sub {
  font-size: 11.5px; color: var(--text-muted); line-height: 1.35;
  overflow: hidden; overflow-wrap: anywhere; word-break: break-word;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
}
.list-item .pill {
  display: inline-flex; align-items: center;
  font-size: 10px; font-family: var(--font-mono);
  padding: 1px 5px; border-radius: 3px;
  background: var(--bg-sunken); color: var(--text-muted);
}
.list-item .pill.ok { background: var(--accent-bg); color: var(--accent); }
.list-item .pill.warn { background: #fef3c7; color: var(--warn); }
.list-item .pill.err { background: #fee2e2; color: #b91c1c; }

/* Effective tool surface is read-only and grouped by where runtime provides it. */
.effective-tools-body { padding: 12px 14px 14px; display: grid; gap: 14px; }
.effective-tool-group { min-width: 0; }
.effective-tool-group-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 7px; font-size: 12px; font-weight: 600;
}
.effective-tool-group-head .desc { font-size: 11px; font-weight: 400; color: var(--text-muted); }
.effective-tool-list { display: flex; flex-wrap: wrap; gap: 6px; }
.effective-tool-chip {
  display: inline-flex; align-items: center; max-width: 100%;
  padding: 4px 7px; border: 1px solid var(--border); border-radius: 5px;
  background: var(--bg-subtle); color: var(--text); font: 11px var(--font-mono);
  overflow-wrap: anywhere;
}
.effective-tool-empty { color: var(--text-muted); font-size: 11.5px; }

/* detail */
.detail {
  background: var(--bg);
  display: flex; flex-direction: column;
  min-height: 0;
  min-width: 0;
}
.detail-head {
  padding: 16px 24px 14px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
  min-width: 0;
}
.detail-head .av {
  width: 36px; height: 36px; border-radius: 9px;
  display: grid; place-items: center;
  color: white; font-weight: 700; font-size: 14px;
  flex-shrink: 0;
}
.detail-head .titles { min-width: 0; flex: 1; }
.detail-head h1 {
  margin: 0; font-size: 18px; font-weight: 600;
  display: flex; align-items: center; gap: 8px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.detail-head .sub {
  font-size: 12.5px; color: var(--text-muted); margin-top: 2px;
  font-family: var(--font-mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.detail-head .actions { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }

.detail-body { flex: 1; overflow-y: auto; padding: 22px 24px 32px; }
.detail-body .form-grid {
  display: grid;
  grid-template-columns: 1fr;
  max-width: 760px;
  gap: 18px;
}
.detail-body.wide .form-grid { max-width: none; }

.field-lg label {
  display: block; font-size: 12.5px; font-weight: 600;
  color: var(--text); margin-bottom: 6px;
}
.field-lg .hint {
  font-size: 11.5px; color: var(--text-muted); font-weight: 400;
  margin-left: 6px;
}
.input-lg {
  width: 100%; background: white;
  border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 8px 10px; font-size: 13px; outline: none;
  color: var(--text);
}
.input-lg:focus { border-color: #0d0d0d; }
.textarea-lg {
  width: 100%; background: white;
  border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 10px 12px; font-size: 13px; outline: none;
  color: var(--text);
  resize: vertical; line-height: 1.5;
  min-height: 120px;
  font-family: var(--font-sans);
}
.textarea-lg.mono { font-family: var(--font-mono); font-size: 12.5px; }
.textarea-lg:focus { border-color: #0d0d0d; }

.prompt-vars {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}
.prompt-vars-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}
.prompt-vars-head.compact { margin-top: 2px; }
.prompt-vars-head .desc {
  min-width: 0;
  color: var(--text-muted);
  font-weight: 400;
  font-size: 11.5px;
}
.prompt-var-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.prompt-var-chips.muted { gap: 5px; }
.prompt-var-chip {
  max-width: 100%;
  border: 1px solid #d8e7df;
  background: #f3fbf6;
  color: #10643c;
  border-radius: 6px;
  padding: 3px 7px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.prompt-var-chip.unsaved {
  border-color: #ead8a5;
  background: #fff8e8;
  color: #7a5600;
}
.prompt-var-chip.builtin {
  border-color: var(--border);
  background: #f8f8f8;
  color: var(--text-muted);
}
.prompt-var-empty {
  color: var(--text-muted);
  font-size: 12px;
}
.prompt-preview {
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: #fafafa;
  overflow: hidden;
}
.prompt-preview summary {
  cursor: pointer;
  padding: 7px 9px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}
.prompt-preview pre {
  margin: 0;
  padding: 9px;
  border-top: 1px solid var(--border);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.45;
  background: white;
}

.card-section {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}
.card-section.popover-section {
  position: relative;
  overflow: visible;
}
.card-section.popover-section.popover-open {
  z-index: 100;
}
.card-section .head {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
  background: white;
}
.card-section.popover-section .head {
  position: relative;
  z-index: 1;
}
.card-section .head h3 {
  margin: 0; font-size: 13px; font-weight: 600;
}
.card-section .head .desc {
  font-size: 11.5px; color: var(--text-muted);
}
.card-section .body { padding: 8px 8px; }
.card-section .body.padded { padding: 14px; }
.card-section .body.flat { padding: 0; }

/* attached items inside agent editor */
.attach-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: var(--r-sm);
  min-width: 0;
}
.attach-row:hover { background: var(--row-hover); }
.attach-row + .attach-row { border-top: 1px solid var(--border); }
.attach-row .av {
  width: 28px; height: 28px; border-radius: 6px;
  display: grid; place-items: center; color: white; font-weight: 700; font-size: 11px;
  flex-shrink: 0;
}
.attach-row .meta { flex: 1; min-width: 0; }
.attach-row .nm { font-size: 13px; font-weight: 500; }
.attach-row .ds { font-size: 11.5px; color: var(--text-muted); margin-top: 1px;
  line-height: 1.35; overflow: hidden; overflow-wrap: anywhere; word-break: break-word;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
}
.attach-row .tag {
  font-family: var(--font-mono); font-size: 10.5px;
  padding: 2px 6px; border-radius: 4px; background: var(--bg-sunken); color: var(--text-muted);
}

.attach-empty {
  padding: 18px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12.5px;
}
.attach-empty .icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--bg-subtle); display: grid; place-items: center;
  margin: 0 auto 8px; color: var(--text-muted);
}

/* picker modal-ish dropdown */
.picker-pop {
  position: absolute;
  top: calc(100% + 6px); right: 12px;
  background: white; border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: 0 10px 28px rgba(0,0,0,0.10), 0 2px 6px rgba(0,0,0,0.04);
  width: 280px; padding: 6px;
  z-index: 30;
}
.picker-pop .search {
  position: relative; margin-bottom: 4px;
}
.picker-pop .search input {
  width: 100%; height: 28px; padding: 0 8px 0 28px;
  border: 1px solid var(--border); border-radius: var(--r-sm); font-size: 12.5px; outline: none;
}
.picker-pop .search input:focus { border-color: #0d0d0d; }
.picker-pop .search .ic { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.picker-pop .group-label { font-size: 10.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; padding: 8px 8px 4px; font-weight: 600; }
.picker-pop .opt {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px; border-radius: var(--r-sm); cursor: pointer;
  font-size: 12.5px;
}
.picker-pop .opt:hover { background: var(--row-hover); }
.picker-pop .opt .ic {
  width: 18px; height: 18px; border-radius: 4px;
  display: grid; place-items: center; color: white; font-size: 10px; font-weight: 700;
  flex-shrink: 0;
}
.picker-pop .opt .ds { color: var(--text-muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-pop .opt .check { margin-left: auto; color: var(--accent); opacity: 0; }
.picker-pop .opt.on .check { opacity: 1; }

/* skill editor */
.skill-editor {
  display: grid;
  grid-template-columns: 240px 1fr;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  min-height: 460px;
}
.tree {
  border-right: 1px solid var(--border);
  background: var(--bg-subtle);
  display: flex; flex-direction: column;
}
.tree-head {
  padding: 8px 8px 6px 12px;
  display: flex; align-items: center; gap: 6px;
  border-bottom: 1px solid var(--border);
}
.tree-head .nm { font-family: var(--font-mono); font-size: 12px; color: var(--text); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-list { padding: 6px 4px 10px; overflow-y: auto; flex: 1; }
.tree-row {
  display: flex; align-items: center; gap: 4px;
  font-family: var(--font-mono); font-size: 12px;
  padding: 3px 6px 3px 4px; border-radius: 4px;
  cursor: pointer; color: var(--text);
  white-space: nowrap;
}
.tree-row:hover { background: var(--row-hover); }
.tree-row.active { background: #e9eefb; color: var(--blue); }
.tree-row .chev { width: 12px; color: var(--text-faint); transition: transform 120ms ease; }
.tree-row.open .chev { transform: rotate(90deg); }
.tree-row.dir { font-weight: 500; }
.tree-row .ic { width: 14px; height: 14px; display: grid; place-items: center; color: var(--text-muted); }
.tree-row.active .ic { color: var(--blue); }
.tree-row .x {
  margin-left: auto; opacity: 0; color: var(--text-muted);
  width: 16px; height: 16px; display: grid; place-items: center; border-radius: 3px;
}
.tree-row:hover .x { opacity: 1; }
.tree-row .x:hover { background: var(--bg-sunken); color: var(--text); }
.tree-row.indent-1 { padding-left: 18px; }
.tree-row.indent-2 { padding-left: 32px; }
.tree-row .req {
  margin-left: 4px; font-size: 9.5px; padding: 0 4px; border-radius: 3px;
  background: var(--accent-bg); color: var(--accent);
  font-family: var(--font-sans); font-weight: 600;
}

.file-pane { display: flex; flex-direction: column; min-height: 0; }
.file-head {
  padding: 8px 14px; display: flex; align-items: center; gap: 8px;
  border-bottom: 1px solid var(--border); background: white;
}
.file-head .path { font-family: var(--font-mono); font-size: 12px; color: var(--text); }
.file-head .lang {
  font-family: var(--font-mono); font-size: 10.5px;
  background: var(--bg-subtle); border: 1px solid var(--border); padding: 1px 6px; border-radius: 3px; color: var(--text-muted);
}
.file-head .spacer { flex: 1; }
.code-editor-surface { position: relative; flex: 1; min-height: 0; overflow: hidden; background: white; }
.code-gutter { position: absolute; inset: 0 auto 0 0; z-index: 2; width: 52px; overflow: hidden; padding: 14px 8px 14px 0; border-right: 1px solid var(--border); background: #fafafa; color: var(--text-faint); font: 12.5px/1.6 var(--font-mono); text-align: right; user-select: none; }
.code-gutter span, .code-backdrop span { display: block; min-height: 1.6em; }
.code-gutter span.changed { color: #92400e; background: #fef3c7; }
.code-backdrop { position: absolute; inset: 0; z-index: 1; overflow: hidden; margin: 0; padding: 14px 18px 14px 70px; color: var(--text); font: 12.5px/1.6 var(--font-mono); white-space: pre; tab-size: 2; pointer-events: none; }
.code-backdrop span.changed { background: #fef3c7; }
.code-area {
  position: absolute; inset: 0; z-index: 3;
  border: 0; outline: none;
  width: 100%; height: 100%; padding: 14px 18px 14px 70px;
  font-family: var(--font-mono); font-size: 12.5px;
  line-height: 1.6;
  resize: none;
  overflow: auto;
  background: transparent; color: transparent; caret-color: var(--text);
  tab-size: 2;
}
.code-area::selection { background: rgba(37, 99, 235, 0.25); }

/* small "+ new file" tray */
.tree-actions {
  display: flex; gap: 4px;
  padding: 6px 8px 8px;
  border-top: 1px solid var(--border);
}
.tree-actions .btn { flex: 1; justify-content: center; }

/* status dot */
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--text-faint);
  display: inline-block;
}
.status-dot.ok { background: var(--accent); box-shadow: 0 0 0 2px rgba(16,163,127,0.18); }
.status-dot.err { background: #ef4444; }
.status-dot.warn { background: var(--orange); }

/* MCP health */
.health-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.health-tile {
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: white;
}
.health-tile.ok { border-color: rgba(16,163,127,0.28); background: #f0fdf9; }
.health-tile.warn { border-color: #fed7aa; background: #fff7ed; }
.health-title {
  display: flex; align-items: center; gap: 7px;
  color: var(--text-muted); font-size: 11px; font-weight: 650;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.health-status {
  margin-top: 7px;
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.health-detail {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 11.5px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mcp-tool-row {
  display: grid;
  grid-template-columns: minmax(140px, 240px) minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: white;
  color: var(--text-muted);
  font-size: 12px;
}
.mcp-tool-row .mono {
  color: var(--text);
  font-family: var(--font-mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .health-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .health-grid,
  .mcp-tool-row {
    grid-template-columns: 1fr;
  }
}

/* env vars */
.kv-row {
  display: grid; grid-template-columns: 1fr 1fr auto;
  gap: 6px; align-items: center;
  margin-bottom: 6px;
}
.kv-row input {
  height: 28px; padding: 0 8px;
  background: white; border: 1px solid var(--border); border-radius: var(--r-sm);
  font-family: var(--font-mono); font-size: 12px; outline: none;
}
.kv-row input:focus { border-color: #0d0d0d; }
.kv-row .btn { height: 28px; }

/* empty detail */
.detail-empty {
  flex: 1; display: grid; place-items: center; color: var(--text-muted);
  text-align: center; padding: 40px;
}
.detail-empty h3 { margin: 8px 0 4px; font-size: 15px; color: var(--text); }
.detail-empty .ic-wrap {
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--bg-subtle); display: grid; place-items: center;
  margin: 0 auto;
}

/* Apps management */
.apps-detail { background: var(--bg); }
.apps-tabs {
  display: flex; gap: 4px; padding: 0 24px;
  border-bottom: 1px solid var(--border); background: var(--bg);
}
.apps-tabs button {
  border: 0; border-bottom: 2px solid transparent; background: transparent;
  padding: 10px 10px 9px; color: var(--text-muted); cursor: pointer;
  font-size: 12px; text-transform: capitalize;
}
.apps-tabs button:hover { color: var(--text); }
.apps-tabs button.active { color: var(--text); border-bottom-color: var(--text); font-weight: 600; }
.apps-section-title {
  font-size: 14px; font-weight: 600; padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.apps-section-title span {
  margin-left: 8px; color: var(--text-muted); font-size: 11.5px; font-weight: 400;
}
.apps-kv {
  display: grid; grid-template-columns: 140px 1fr; gap: 10px 16px;
  padding: 14px; border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--bg-subtle);
}
.apps-kv span { color: var(--text-muted); font-size: 12px; }
.apps-kv strong {
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  overflow-wrap: anywhere;
}
.apps-table-card {
  display: grid; gap: 8px; margin-top: 10px; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: var(--r-md); background: white;
}
.apps-table-card > div { display: flex; flex-wrap: wrap; gap: 6px; }
.apps-data-toolbar {
  display: flex; gap: 8px; align-items: center; margin: 12px 0; max-width: 560px;
}
.apps-data-toolbar .input-lg { flex: 1; }
.apps-record-input { min-height: 130px; max-width: 760px; margin-bottom: 8px; }
.apps-json-output {
  margin-top: 14px; padding: 14px; border: 1px solid var(--border);
  border-radius: var(--r-md); background: #f7f7f8; overflow: auto;
  font-size: 12px; max-width: 760px;
}
.apps-permission-row {
  display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; max-width: 760px;
  margin-top: 14px;
}
.apps-audit-list { border-top: 1px solid var(--border); margin-top: 12px; }
.apps-audit-row {
  display: grid; grid-template-columns: 70px 180px 1fr; gap: 12px;
  padding: 11px 0; border-bottom: 1px solid var(--border); align-items: center;
}
@media (max-width: 900px) {
  .apps-permission-row { grid-template-columns: 1fr; }
  .apps-kv { grid-template-columns: 110px 1fr; }
  .apps-audit-row { grid-template-columns: 70px 1fr; }
  .apps-audit-row .field-help { grid-column: 2; }
}

/* danger button */
.btn.danger {
  background: white; color: #b91c1c; border-color: var(--border);
}
.btn.danger:hover { background: #fef2f2; border-color: #fecaca; }

/* PR 18 · sticky SaveBar at bottom of AgentEditor / SkillEditor */
.save-bar {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg-subtle, #fafafa);
}
.save-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-family: var(--font-mono);
  border: 1px solid transparent;
}
.save-pill.idle    { background: #f3f4f6; color: #6b7280; border-color: #e5e7eb; }
.save-pill.saving  { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.save-pill.saving .dot {
  width: 7px; height: 7px; border-radius: 999px; background: #f59e0b;
  animation: save-pulse 0.9s ease-in-out infinite;
}
.save-pill.saved   { background: #d1fae5; color: #047857; border-color: #a7f3d0; }
.save-pill.err     { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.save-pill.ro      { background: #e0e7ff; color: #3730a3; border-color: #c7d2fe; }
.skill-test-dock { flex: 0 1 auto; padding: 0 24px; background: var(--bg); }
.skill-test-passed { display: inline-flex; align-items: center; gap: 5px; margin-top: 5px; color: #15803d; font-size: 12px; }
.skill-test-report { margin: 0; }
.skill-test-report.passed { border-color: #a7f3d0; }
.skill-test-report.failed { border-color: #fecaca; }
.skill-test-report.in-progress { border-color: #bfdbfe; }
.skill-test-live { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: 11.5px; font-weight: 400; }
.skill-test-live .dot { width: 7px; height: 7px; border-radius: 50%; background: #2563eb; animation: save-pulse 0.9s ease-in-out infinite; }
.skill-test-stage { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: 12px; }
.skill-test-stage span { color: var(--text-muted); font-family: var(--font-mono); }
.skill-test-finding { margin: 4px 0; padding: 6px 8px; border-left: 2px solid #f59e0b; background: #fffbeb; color: #78350f; font-size: 12px; overflow-wrap: anywhere; }
.skill-test-status { display: flex; align-items: center; gap: 7px; margin: 4px 0; padding: 7px 8px; font-size: 12px; overflow-wrap: anywhere; }
.skill-test-status.applying { color: #1e3a8a; background: #eff6ff; }
.skill-test-status.applied { color: #166534; background: #f0fdf4; border-left: 2px solid #22c55e; }
.skill-test-status .dot { width: 7px; height: 7px; border-radius: 50%; background: #2563eb; animation: save-pulse 0.9s ease-in-out infinite; }
.skill-test-proposal { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 0; padding: 6px 8px; background: #eff6ff; color: #1e3a8a; font-size: 12px; }
.skill-test-output { margin: 5px 0 0; max-height: min(42vh, 360px); overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font: 11px/1.45 var(--font-mono); color: var(--text-muted); }
@keyframes save-pulse {
  0%, 100% { opacity: 0.4; }
  50%      { opacity: 1; }
}
