/* WALL-E Panel */
#walle-panel { display: none; flex-direction: column; height: 100%; overflow: hidden; }
#walle-panel.active { display: flex; }

.walle-header {
  display: flex; align-items: center; gap: 12px; padding: 10px 16px;
  border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.walle-header-title { font-size: 15px; font-weight: 700; color: var(--fg); }
.walle-avatar { vertical-align: middle; margin-right: 2px; position: relative; top: -1px; }

.walle-subnav { display: flex; gap: 4px; margin-left: auto; }
.walle-subnav-btn {
  padding: 4px 12px; border-radius: 4px; font-size: 12px; cursor: pointer;
  border: 1px solid transparent; background: transparent; color: var(--fg-muted, #888);
  transition: all 0.15s;
}
.walle-subnav-btn:hover { background: rgba(255,255,255,0.06); color: var(--fg); }
.walle-subnav-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.walle-body { flex: 1; overflow-y: auto; padding: 16px; }

/* Cards */
.walle-card {
  background: var(--bg-lighter, #1e1e2e); border: 1px solid var(--border);
  border-radius: 8px; padding: 12px 16px; margin-bottom: 10px;
}
.walle-card-title { font-size: 13px; font-weight: 600; color: var(--fg); margin-bottom: 4px; }
.walle-card-meta { font-size: 11px; color: var(--fg-muted, #888); }
.walle-card-body { font-size: 12px; color: var(--fg); margin-top: 8px; line-height: 1.5; }

/* Tags */
.walle-tag {
  display: inline-block; padding: 2px 8px; border-radius: 3px; font-size: 10px;
  font-weight: 600; margin-right: 4px;
}
.walle-tag.technical { background: #364fc7; color: #dbe4ff; }
.walle-tag.preference { background: #5c940d; color: #d8f5a2; }
.walle-tag.relationship { background: #e8590c; color: #ffe8cc; }
.walle-tag.work { background: #862e9c; color: #f3d9fa; }
.walle-tag.personal { background: #d6336c; color: #fcc2d7; }
.walle-tag.world { background: #1098ad; color: #c5f6fa; }
.walle-tag.fact { background: #1971c2; color: #d0ebff; }
.walle-tag.rule { background: #7048e8; color: #e5dbff; }
.walle-tag.decision { background: #0b7285; color: #c5f6fa; }
.walle-tag.problem { background: #c92a2a; color: #ffe3e3; }
.walle-tag.milestone { background: #2b8a3e; color: #d3f9d8; }
.walle-tag.admin { background: #495057; color: #f1f3f5; }
.walle-tag.location { background: #1864ab; color: #d0ebff; }
.walle-tag.social { background: #ae3ec9; color: #f3d9fa; }

/* Stats */
.walle-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 20px; }
.walle-stat {
  background: var(--bg-lighter, #1e1e2e); border: 1px solid var(--border);
  border-radius: 8px; padding: 16px; text-align: center;
}
.walle-stat-value { font-size: 28px; font-weight: 700; color: var(--accent); }
.walle-stat-label { font-size: 11px; color: var(--fg-muted, #888); margin-top: 4px; }

/* Timeline */
.walle-timeline-item {
  display: flex; gap: 12px; padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.walle-timeline-time { font-size: 11px; color: var(--fg-muted, #888); min-width: 80px; flex-shrink: 0; }
.walle-timeline-badge {
  font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 3px;
  text-transform: uppercase; min-width: 40px; text-align: center; flex-shrink: 0;
}
.walle-timeline-badge.ctm { background: #364fc7; color: #dbe4ff; }
.walle-timeline-badge.slack { background: #5c940d; color: #d8f5a2; }
.walle-timeline-badge.outbound { background: #e8590c; color: #ffe8cc; }
.walle-timeline-content { font-size: 12px; color: var(--fg); flex: 1; overflow: hidden; text-overflow: ellipsis; }

/* Questions */
.walle-question { margin-bottom: 16px; }
.walle-question-text { font-size: 13px; color: var(--fg); margin-bottom: 8px; }
.walle-question-context { font-size: 11px; color: var(--fg-muted, #888); margin-bottom: 8px; }
.walle-question-answer {
  display: flex; gap: 8px; align-items: center;
}
.walle-question-input {
  flex: 1; padding: 6px 10px; border-radius: 4px; border: 1px solid var(--border);
  background: var(--bg); color: var(--fg); font-size: 12px;
}
.walle-btn {
  padding: 5px 12px; border-radius: 5px; font-size: 11px; cursor: pointer;
  border: 1px solid var(--border); background: var(--bg-lighter, #1e1e2e); color: var(--fg);
  transition: all 0.15s;
}
.walle-btn:hover { background: rgba(255,255,255,0.08); }
.walle-btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.walle-btn.danger { color: #f85149; border-color: #f8514933; }
.walle-btn.danger:hover { background: #f8514918; border-color: #f85149; }

/* Loading / Empty */
.walle-loading { text-align: center; padding: 40px; color: var(--fg-muted, #888); font-size: 13px; }
.walle-empty { text-align: center; padding: 40px; color: var(--fg-muted, #888); font-size: 13px; }

/* People */
.walle-people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.walle-trust-bar { height: 4px; border-radius: 2px; background: var(--border); margin-top: 8px; }
.walle-trust-fill { height: 100%; border-radius: 2px; background: var(--accent); }

/* Section headers */
.walle-section-title { font-size: 13px; font-weight: 700; color: var(--fg); margin: 16px 0 8px; }

/* Filters */
.walle-filters { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.walle-filter-select {
  padding: 4px 8px; border-radius: 4px; border: 1px solid var(--border);
  background: var(--bg); color: var(--fg); font-size: 11px;
}
.walle-filter-input {
  padding: 4px 8px; border-radius: 4px; border: 1px solid var(--border);
  background: var(--bg); color: var(--fg); font-size: 11px; min-width: 150px;
}

/* Brain Inspector */
.walle-brain-toolbar {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px; margin-bottom: 12px;
}
.walle-brain-title-block .walle-section-title { margin-top: 0; }
.walle-brain-links { display: flex; gap: 6px; flex-wrap: wrap; }
.walle-brain-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px; margin-bottom: 12px;
}
.walle-brain-stat {
  border: 1px solid var(--border); border-radius: 6px; padding: 10px 12px;
  background: rgba(255,255,255,0.025);
}
.walle-brain-stat-value {
  font-size: 18px; font-weight: 700; color: var(--fg);
  font-variant-numeric: tabular-nums;
}
.walle-brain-stat-label {
  margin-top: 2px; color: var(--fg-muted, #888);
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.4px;
}
.walle-brain-filters { align-items: center; }
.walle-brain-search { flex: 1; min-width: min(280px, 100%); }
.walle-knowledge-list { display: flex; flex-direction: column; gap: 10px; }
.walle-knowledge-group {
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg-lighter, #1e1e2e); overflow: hidden;
}
.walle-knowledge-group-title {
  padding: 10px 12px; border-bottom: 1px solid var(--border);
  color: var(--fg); font-size: 13px; font-weight: 700;
}
.walle-knowledge-row {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.walle-knowledge-row:last-child { border-bottom: 0; }
.walle-knowledge-row.status-disputed { border-left: 3px solid #fab005; }
.walle-knowledge-row.status-retracted { border-left: 3px solid #f85149; opacity: 0.78; }
.walle-knowledge-row.status-superseded { border-left: 3px solid var(--fg-muted, #888); opacity: 0.78; }
.walle-knowledge-main { min-width: 0; flex: 1; }
.walle-knowledge-statement {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  color: var(--fg); font-size: 13px; line-height: 1.35;
}
.walle-knowledge-predicate { color: var(--fg-muted, #aaa); }
.walle-knowledge-object { font-weight: 600; }
.walle-knowledge-meta {
  display: flex; gap: 5px; flex-wrap: wrap; margin-top: 6px;
}
.walle-chip {
  display: inline-flex; align-items: center; min-height: 18px;
  padding: 1px 7px; border-radius: 10px; border: 1px solid var(--border);
  color: var(--fg-muted, #aaa); font-size: 10px; background: rgba(255,255,255,0.025);
}
.walle-chip.status { color: var(--accent); border-color: rgba(123,104,238,0.35); }
.walle-evidence-list { display: grid; gap: 6px; margin-top: 8px; }
.walle-evidence {
  padding: 7px 8px; border: 1px solid rgba(255,255,255,0.06);
  border-radius: 6px; background: rgba(0,0,0,0.11);
}
.walle-evidence.muted {
  margin-top: 8px; color: var(--fg-muted, #888); font-size: 11px;
}
.walle-evidence-meta {
  color: var(--fg-muted, #888); font-size: 10px; margin-bottom: 3px;
  text-transform: uppercase; letter-spacing: 0.35px;
}
.walle-evidence-snippet {
  color: var(--fg); font-size: 11px; line-height: 1.45;
}
.walle-knowledge-actions {
  display: flex; align-items: flex-start; gap: 6px; flex-wrap: wrap;
  justify-content: flex-end; flex: 0 0 auto;
}

@media (max-width: 720px) {
  .walle-brain-toolbar { flex-direction: column; }
  .walle-knowledge-row { flex-direction: column; }
  .walle-knowledge-actions { justify-content: flex-start; }
}

/* Load more */
.walle-load-more { text-align: center; padding: 12px; }

/* Shadow Training */
.shadow-training-card { position: relative; }

.shadow-stats-row {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px;
}
.shadow-stat-pill {
  display: flex; align-items: baseline; gap: 4px;
  padding: 4px 10px; border-radius: 6px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border, #333);
  font-size: 11px;
}
.shadow-stat-num { font-weight: 700; font-size: 14px; color: var(--fg); font-variant-numeric: tabular-nums; }
.shadow-stat-lbl { color: var(--fg-muted, #888); font-size: 10px; }
.shadow-stat-promo { border-color: #2ecc7144; background: #2ecc7110; }
.shadow-stat-promo .shadow-stat-num { color: #2ecc71; }

.shadow-model-breakdown { margin: 8px 0 4px; }
.shadow-model-row {
  display: flex; align-items: center; gap: 8px; padding: 3px 0;
  font-size: 11px; color: var(--fg-muted, #888);
}
.shadow-model-name { min-width: 100px; color: var(--fg); font-weight: 500; font-size: 12px; }
.shadow-model-count { min-width: 56px; text-align: right; font-variant-numeric: tabular-nums; }
.shadow-score-bar {
  flex: 1; height: 4px; border-radius: 2px;
  background: var(--border, #333); overflow: hidden; min-width: 60px;
}
.shadow-score-fill {
  height: 100%; border-radius: 2px;
  background: linear-gradient(90deg, #e74c3c 0%, #f39c12 50%, #2ecc71 100%);
  transition: width 0.4s ease;
}
.shadow-model-score { min-width: 40px; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }

.shadow-promo-item {
  display: flex; align-items: center; gap: 8px; padding: 4px 0;
  font-size: 11px;
}
.shadow-promo-model { font-weight: 600; color: #2ecc71; min-width: 100px; }
.shadow-promo-task {
  padding: 1px 6px; border-radius: 3px; font-size: 10px; font-weight: 600;
  background: rgba(123,104,238,0.15); color: var(--accent, #7b68ee);
}
.shadow-promo-detail { color: var(--fg-muted, #888); }

/* Toggle switch */
.shadow-toggle {
  position: relative; display: inline-block; width: 36px; height: 20px; cursor: pointer;
}
.shadow-toggle input { opacity: 0; width: 0; height: 0; }
.shadow-toggle-slider {
  position: absolute; inset: 0; background: var(--border, #444);
  border-radius: 20px; transition: all 0.2s;
}
.shadow-toggle-slider::before {
  content: ''; position: absolute; width: 14px; height: 14px;
  left: 3px; top: 3px; background: var(--fg-muted, #888);
  border-radius: 50%; transition: all 0.2s;
}
.shadow-toggle input:checked + .shadow-toggle-slider { background: var(--accent, #7b68ee); }
.shadow-toggle input:checked + .shadow-toggle-slider::before { transform: translateX(16px); background: #fff; }

.shadow-status-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--border, #444); transition: all 0.2s;
}
.shadow-status-dot.on { background: #2ecc71; box-shadow: 0 0 6px #2ecc7188; }

/* Form fields */
.shadow-field { margin-bottom: 12px; }
.shadow-field-label {
  display: block; font-size: 11px; font-weight: 600; color: var(--fg-muted, #aaa);
  margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.5px;
}
.shadow-field-hint { font-size: 10px; color: var(--fg-dim, #666); margin-top: 3px; }

.shadow-input {
  width: 100%; padding: 6px 10px; font-size: 12px;
  background: var(--bg-input, #1a1a2e); color: var(--fg, #e0e0e0);
  border: 1px solid var(--border, #333); border-radius: 5px;
  transition: border-color 0.15s;
}
.shadow-input:focus { outline: none; border-color: var(--accent, #7b68ee); }

/* Slider */
.shadow-slider {
  -webkit-appearance: none; appearance: none; width: 100%; height: 4px;
  background: var(--border, #333); border-radius: 2px; outline: none;
  margin: 6px 0;
}
.shadow-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 16px; height: 16px;
  border-radius: 50%; background: var(--accent, #7b68ee); cursor: pointer;
  border: 2px solid var(--bg, #121212); box-shadow: 0 0 4px rgba(123,104,238,0.4);
}
.shadow-slider::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%; background: var(--accent, #7b68ee);
  cursor: pointer; border: 2px solid var(--bg, #121212);
}

/* Task type chips */
.shadow-task-types { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.shadow-chip {
  padding: 4px 10px; border-radius: 4px; font-size: 11px; cursor: pointer;
  border: 1px solid var(--border, #333); background: transparent;
  color: var(--fg-muted, #888); transition: all 0.15s; user-select: none;
}
.shadow-chip:hover { border-color: var(--fg-muted, #666); color: var(--fg); }
.shadow-chip.active {
  background: rgba(123,104,238,0.15); border-color: var(--accent, #7b68ee);
  color: var(--accent, #7b68ee); font-weight: 600;
}

/* Chat — Claude Code CLI inspired: compact, clear hierarchy */
.walle-chat-container { display: flex; flex-direction: column; height: 100%; }
.walle-chat-messages { flex: 1; overflow-y: auto; padding: 0 0 12px; }

.we-provider-issue,
.we-provider-setup-banner,
.we-service-alerts {
  flex-shrink: 0;
  margin: 0 0 8px;
  border-radius: 6px;
  font-size: 12px;
}
.we-provider-issue {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(247,118,142,0.36);
  border-left: 3px solid #f7768e;
  background: rgba(247,118,142,0.10);
  color: #f2c0c8;
}
.we-provider-issue.warning {
  border-color: rgba(250,176,5,0.36);
  border-left-color: #fab005;
  background: rgba(250,176,5,0.09);
  color: #f6d58a;
}
.we-provider-issue.inline {
  margin: 4px 0 0;
  padding: 9px 10px;
}
.we-provider-issue-main { min-width: 0; flex: 1; }
.we-provider-issue-title {
  color: #fff;
  font-weight: 700;
  margin-bottom: 2px;
}
.we-provider-issue-body {
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.we-provider-issue-actions {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  flex-shrink: 0;
}
.we-provider-issue-dismiss,
.we-service-alert-dismiss {
  background: none;
  border: none;
  color: var(--fg-muted, #888);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 2px 4px;
}
.we-provider-issue-details {
  margin-top: 6px;
  color: #d7dde8;
}
.we-provider-issue-details summary {
  cursor: pointer;
  color: #9fb0c8;
}
.we-provider-issue-details pre {
  margin: 6px 0 0;
  max-height: 180px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 11px;
  line-height: 1.4;
  color: #cbd5e1;
}
.we-provider-setup-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border: 1px solid rgba(250,176,5,0.38);
  background: rgba(250,176,5,0.08);
  color: #f6d58a;
}
.we-provider-setup-actions { display: flex; gap: 8px; flex-shrink: 0; }
.we-service-alerts {
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
}
.we-health-card {
  padding: 0;
  overflow: hidden;
  border-color: rgba(116,192,252,0.22);
  background: rgba(28,36,58,0.72);
}
.we-health-card.error {
  border-color: rgba(247,118,142,0.40);
  background: rgba(247,118,142,0.075);
}
.we-health-card.warning {
  border-color: rgba(250,176,5,0.36);
  background: rgba(250,176,5,0.07);
}
.we-health-card.info {
  border-color: rgba(116,192,252,0.28);
}
.we-health-header {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  padding: 12px;
}
.we-health-status-dot {
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border-radius: 999px;
  background: #9ece6a;
  box-shadow: 0 0 0 4px rgba(158,206,106,0.12);
}
.we-health-card.error .we-health-status-dot {
  background: #f7768e;
  box-shadow: 0 0 0 4px rgba(247,118,142,0.14);
}
.we-health-card.warning .we-health-status-dot {
  background: #fab005;
  box-shadow: 0 0 0 4px rgba(250,176,5,0.14);
}
.we-health-card.info .we-health-status-dot {
  background: #74c0fc;
  box-shadow: 0 0 0 4px rgba(116,192,252,0.13);
}
.we-service-alerts-title {
  font-weight: 700;
  margin-bottom: 4px;
  color: #d7dde8;
}
.we-health-title-block {
  min-width: 0;
}
.we-health-title {
  color: var(--fg, #d7dde8);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
}
.we-health-message {
  margin-top: 3px;
  color: var(--fg-muted, #9aa4b2);
  line-height: 1.45;
}
.we-health-meta {
  max-width: 280px;
  color: var(--fg-muted, #9aa4b2);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  text-align: right;
}
.we-health-current {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0 12px 12px;
  padding: 11px 12px;
  border: 1px solid rgba(247,118,142,0.30);
  border-radius: 6px;
  background: rgba(10,14,26,0.28);
}
.we-health-current-copy {
  min-width: 0;
}
.we-health-current-title {
  color: #fff;
  font-weight: 800;
  line-height: 1.3;
}
.we-health-current-body {
  margin-top: 4px;
  color: #f2c0c8;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.we-health-current-meta {
  margin-top: 6px;
  color: #9fb0c8;
  font-size: 11px;
  font-weight: 700;
}
.we-health-current-actions {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  flex-shrink: 0;
}
.we-health-group {
  border-top: 1px solid rgba(255,255,255,0.08);
}
.we-health-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  color: #cfd7e6;
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}
.we-health-group summary::-webkit-details-marker {
  display: none;
}
.we-health-group summary::before {
  content: '›';
  color: var(--fg-muted, #9aa4b2);
  transform: rotate(0deg);
  transition: transform 0.14s ease;
}
.we-health-group[open] summary::before {
  transform: rotate(90deg);
}
.we-health-group summary span {
  flex: 1;
  min-width: 0;
}
.we-health-group summary strong {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 999px;
  color: #d7dde8;
  font-size: 11px;
}
.we-health-group-body {
  padding: 0 12px 9px;
}
.we-service-alert-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
}
.we-service-alert-icon {
  width: 16px;
  text-align: center;
  color: #fab005;
  font-weight: 800;
}
.we-service-alert-item.error .we-service-alert-icon,
.we-service-alert-item.provider .we-service-alert-icon { color: #f7768e; }
.we-service-alert-item.info .we-service-alert-icon { color: #74c0fc; }
.we-service-alert-text {
  flex: 1;
  min-width: 0;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.we-service-alert-action {
  border: 0;
  background: transparent;
  color: #74c0fc;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  font: inherit;
}

.we-update-wizard-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(10, 12, 24, 0.62);
}
.we-update-wizard {
  position: relative;
  width: min(480px, 100%);
  border: 1px solid var(--border, #333);
  border-radius: 8px;
  background: var(--bg-light, #1a1b2e);
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
  padding: 22px;
  color: var(--fg, #d7dde8);
}
.we-update-wizard-close {
  position: absolute;
  top: 10px;
  right: 10px;
  border: 0;
  background: transparent;
  color: var(--fg-muted, #888);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}
.we-update-wizard-kicker {
  color: #74c0fc;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
  margin-bottom: 8px;
}
.we-update-wizard h3 {
  margin: 0 28px 8px 0;
  font-size: 20px;
  line-height: 1.2;
}
.we-update-wizard p {
  margin: 0 0 14px;
  color: var(--fg-muted, #aab);
  line-height: 1.45;
}
.we-update-command {
  border: 1px solid rgba(116,192,252,0.28);
  border-radius: 6px;
  background: rgba(116,192,252,0.08);
  color: #d7ecff;
  font: 13px/1.4 'SF Mono', 'Monaco', 'Consolas', monospace;
  padding: 10px 12px;
  overflow-wrap: anywhere;
}
.we-update-wizard-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}

/* Conversation turn group — user question + assistant response paired together */
.we-turn-group {
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 6px 0 8px;
}
.we-turn-group:last-child { border-bottom: none; }

/* User messages — compact */
.walle-chat-msg.user {
  padding: 4px 0 6px;
}
/* Assistant messages — indented with left accent bar, grouped under user question */
.walle-chat-msg.assistant {
  padding: 4px 0 4px 12px;
  border-left: 2px solid rgba(81, 207, 102, 0.3);
  margin: 4px 0 0;
}

.walle-chat-msg-role {
  font-size: 10px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 1px; margin-bottom: 3px;
}
.walle-chat-msg-role.user { color: #94a3b8; text-transform: none; font-weight: 700; letter-spacing: 0.3px; }
.walle-chat-msg-role.assistant { color: #51cf66; }

/* User text — plain, tight */
.walle-chat-msg-text {
  font-size: 13px; color: #c9d1d9; line-height: 1.5;
  white-space: pre-wrap; word-break: break-word;
}

/* WALL-E markdown responses — tight like Claude Code CLI */
.walle-chat-msg-text.we-markdown {
  white-space: normal;
  font-size: 13px;
  color: #c9d1d9;
  line-height: 1.5;
}
.walle-chat-msg-text.we-markdown strong { color: #e9ecef; font-weight: 600; }
.walle-chat-msg-text.we-markdown em { color: #da77f2; font-style: italic; }

/* Headers — compact hierarchy */
.we-h2 {
  font-size: 14px; font-weight: 700; color: #e9ecef;
  margin: 10px 0 4px; padding-bottom: 3px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.we-h3 {
  font-size: 13px; font-weight: 700; color: #74c0fc;
  margin: 8px 0 2px;
}
.we-h4 {
  font-size: 13px; font-weight: 600; color: #a9e34b;
  margin: 6px 0 2px;
}

/* Blockquotes — thin left-border */
.we-quote {
  border-left: 2px solid #5c7cfa; padding: 2px 10px; margin: 4px 0;
  background: rgba(92, 124, 250, 0.05); border-radius: 0 4px 4px 0;
  color: #adb5bd; font-size: 12px; line-height: 1.4;
}

/* Code blocks — terminal style */
.we-code-block {
  background: #0d1117; border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px; padding: 8px 12px; margin: 6px 0;
  overflow-x: auto; font-size: 12px; line-height: 1.45;
}
.we-code-block code {
  color: #c9d1d9; font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  white-space: pre;
}

/* Inline code */
.we-inline-code {
  background: rgba(255,255,255,0.06); padding: 1px 5px; border-radius: 3px;
  font-size: 12px; color: #ff922b;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
}

/* Lists — zero extra spacing, like CLI output */
.we-ul { margin: 0; padding-left: 0; list-style: none; }
.we-li {
  position: relative; padding: 0 0 0 16px; font-size: 13px;
  line-height: 1.5; margin: 0;
}
.we-li::before {
  content: ''; position: absolute; left: 3px; top: 9px;
  width: 4px; height: 4px; border-radius: 50%;
  background: #5c7cfa;
}
/* Numbered lists */
.we-ol { margin: 0; padding-left: 20px; }
.we-ol-li { padding: 0; font-size: 13px; line-height: 1.5; margin: 0; }

/* Horizontal rule */
.we-hr { border: none; border-top: 1px solid rgba(255,255,255,0.06); margin: 8px 0; }

/* Paragraphs — tight spacing */
.we-p { margin: 0 0 4px; }
.we-p:last-child { margin-bottom: 0; }

/* Kill any stray <br> gaps inside lists and after headers */
.we-ul br, .we-ol br { display: none; }
.we-h2 + br, .we-h3 + br, .we-h4 + br { display: none; }
.we-markdown br + br { display: none; }

/* Links */
.we-markdown a { color: #74c0fc; text-decoration: none; }
.we-markdown a:hover { text-decoration: underline; }

/* Edit button on user messages — always visible but subtle */
.we-edit-btn {
  background: none; border: none; color: var(--fg-muted, #555); cursor: pointer;
  font-size: 13px; padding: 2px 6px; opacity: 0.3; transition: opacity 0.15s;
  vertical-align: middle; margin-left: 4px;
}
.walle-chat-msg.user:hover .we-edit-btn { opacity: 0.7; }
.we-edit-btn:hover { opacity: 1 !important; color: var(--accent); }

/* Branch navigation (ChatGPT-style) */
.we-branch-nav {
  display: inline-flex; align-items: center; gap: 2px;
  margin-left: 8px; vertical-align: middle;
}
.we-branch-btn {
  background: none; border: 1px solid var(--border, #444); color: var(--fg);
  font-size: 14px; padding: 0 5px; border-radius: 3px; cursor: pointer;
  line-height: 18px; opacity: 0.7; transition: opacity 0.15s;
}
.we-branch-btn:hover { opacity: 1; color: var(--accent); border-color: var(--accent); }
.we-branch-btn.disabled { opacity: 0.2; cursor: default; pointer-events: none; }
.we-branch-label {
  font-size: 11px; color: var(--fg-muted, #888); min-width: 20px; text-align: center;
}

/* Edit inline form */
.we-edit-row { margin-top: 4px; }
.we-edit-input {
  width: 100%; padding: 8px 10px; border-radius: 6px;
  border: 1px solid var(--accent); background: var(--bg);
  color: var(--fg); font-size: 13px; resize: vertical;
  min-height: 40px; max-height: 200px; font-family: inherit;
}
.we-edit-actions { display: flex; gap: 6px; margin-top: 6px; }

/* Attachment preview bar */
.we-attach-preview {
  display: flex; gap: 8px; padding: 6px 0; flex-wrap: wrap;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.we-attach-item {
  position: relative; background: rgba(255,255,255,0.04);
  border-radius: 6px; padding: 4px; border: 1px solid rgba(255,255,255,0.08);
}
.we-attach-thumb { height: 48px; border-radius: 4px; display: block; }
.we-attach-file-name { font-size: 11px; color: var(--fg-muted); padding: 4px 8px; display: block; }
.we-attach-remove {
  position: absolute; top: -4px; right: -4px; width: 16px; height: 16px;
  border-radius: 50%; background: #e03131; color: #fff; border: none;
  font-size: 10px; cursor: pointer; line-height: 16px; text-align: center; padding: 0;
}

/* Attach button in input row */
.we-attach-btn {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 6px; cursor: pointer;
  font-size: 18px; color: var(--fg-muted, #888); align-self: flex-end;
  transition: background 0.15s;
}
.we-attach-btn:hover { background: rgba(255,255,255,0.06); color: var(--fg); }

/* Chat images */
.we-chat-img { max-width: 300px; max-height: 200px; border-radius: 6px; margin-top: 4px; }
.we-chat-file {
  display: inline-block; padding: 4px 10px; border-radius: 4px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  font-size: 11px; color: var(--fg-muted); margin-top: 4px;
}
.walle-chat-input-row {
  display: flex; gap: 8px; padding-top: 12px;
  border-top: 1px solid var(--border); flex-shrink: 0;
}
.walle-chat-input {
  flex: 1; padding: 8px 12px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--bg);
  color: var(--fg); font-size: 13px; resize: none;
  min-height: 40px; max-height: 120px; font-family: inherit;
}
.walle-chat-input:focus { outline: none; border-color: var(--accent); }
.walle-chat-send {
  padding: 8px 16px; border-radius: 6px; border: none;
  background: var(--accent); color: #fff; font-size: 13px;
  cursor: pointer; font-weight: 600; align-self: flex-end;
}
.walle-chat-send:hover { opacity: 0.9; }
.walle-chat-send:disabled { opacity: 0.5; cursor: not-allowed; }
.walle-chat-typing { font-size: 12px; color: var(--fg-muted, #888); padding: 4px 0; }

/* Thinking panel — real-time tool activity during processing */
.walle-thinking-panel {
  margin: 8px 0 4px;
  padding: 8px 12px;
  background: rgba(59, 130, 246, 0.06);
  border-left: 2px solid rgba(59, 130, 246, 0.4);
  border-radius: 0 4px 4px 0;
  font-size: 12px;
}
.walle-thinking-header {
  color: #60a5fa;
  font-weight: 500;
  margin-bottom: 4px;
}
.walle-thinking-elapsed { color: #888; font-weight: 400; }
.walle-thinking-cancel { color: #666; font-weight: 400; font-size: 11px; }
.walle-thinking-logs { margin-top: 4px; }
.walle-thinking-log {
  color: #aaa;
  padding: 1px 0;
  line-height: 1.5;
  font-family: 'SF Mono', 'Menlo', 'Monaco', monospace;
  font-size: 11px;
}
.walle-thinking-log:last-child { color: #ccc; }

/* Thoughts panel — collapsible chain-of-thought from reasoning models
 * (DeepSeek V4 deep-thinking, Anthropic extended thinking, gemma4
 * native <think> output). Mirrors DeepSeek's chat.deepseek.com UI. */
.walle-thoughts {
  margin: 0 0 8px;
}
.walle-thoughts > summary {
  cursor: pointer;
  color: #888;
  font-size: 11px;
  padding: 2px 0;
  user-select: none;
  list-style: revert;
}
.walle-thoughts > summary:hover { color: #aaa; }
.walle-thoughts-body {
  margin-top: 4px;
  padding: 6px 10px;
  border-left: 2px solid #444;
  color: #999;
  font-size: 12px;
  font-style: italic;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: 'SF Mono', 'Menlo', 'Monaco', monospace;
}

/* Task error panel */
.we-task-error-panel {
  margin-top: 8px;
  background: rgba(224,49,49,0.06);
  border: 1px solid rgba(224,49,49,0.2);
  border-radius: 6px;
  padding: 8px 10px;
}
.we-task-error-header {
  display: flex; align-items: flex-start; gap: 8px; font-size: 12px;
}
.we-task-error-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%;
  background: rgba(224,49,49,0.2); color: #e03131;
  font-size: 11px; font-weight: 700; flex-shrink: 0;
}
.we-task-error-msg {
  color: #ff6b6b;
  flex: 1;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.we-task-error-panel.has-long-message:not(.expanded-message) .we-task-error-msg.long {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.we-task-error-time { color: #666; font-size: 10px; flex-shrink: 0; }
.we-task-error-details { margin-top: 6px; }
.we-task-error-details summary {
  font-size: 10px; color: #888; cursor: pointer; user-select: none;
}
.we-task-error-details summary:hover { color: #bbb; }
.we-task-error-pre {
  font-family: 'SF Mono', 'Menlo', 'Monaco', monospace;
  font-size: 11px; line-height: 1.4; color: #c97070;
  background: rgba(0,0,0,0.2); border-radius: 4px;
  padding: 6px 8px; margin-top: 4px; white-space: pre-wrap;
  max-height: 150px; overflow-y: auto; word-break: break-all;
}

/* Task output panel (collapsible) */
.we-task-output-panel {
  margin-top: 8px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  overflow: hidden;
}
.we-task-output-header {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; cursor: pointer; user-select: none;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid transparent;
  transition: background 0.15s;
}
.we-task-output-header:hover { background: rgba(255,255,255,0.05); }
.we-task-output-label { font-size: 11px; font-weight: 600; color: #60a5fa; }
.we-task-output-time { font-size: 10px; color: #666; }
.we-task-output-lines { font-size: 10px; color: #555; margin-left: auto; }
.we-task-output-toggle::after {
  content: '\25B6'; font-size: 8px; color: #555; margin-left: 4px;
  display: inline-block; transition: transform 0.15s;
}
.we-task-output-panel.expanded .we-task-output-toggle::after { transform: rotate(90deg); }
.we-task-output-summary {
  font-family: 'SF Mono', 'Menlo', 'Monaco', monospace;
  font-size: 11px; line-height: 1.5; color: #9ca3af;
  padding: 6px 10px; white-space: pre-wrap;
  border-top: 1px solid rgba(255,255,255,0.04);
}
.we-task-output-full {
  display: none;
}
.we-task-output-panel.expanded .we-task-output-full {
  display: block;
}
.we-task-output-panel.expanded .we-task-output-summary {
  display: none;
}
.we-task-output-panel.expanded .we-task-output-header {
  border-bottom-color: rgba(255,255,255,0.06);
}

/* Copy button in output header */
.we-task-output-copy {
  background: none; border: 1px solid rgba(255,255,255,0.1);
  color: #666; font-size: 10px; padding: 1px 6px; border-radius: 3px;
  cursor: pointer; margin-left: auto; transition: all 0.15s;
}
.we-task-output-copy:hover { color: #aaa; border-color: rgba(255,255,255,0.2); background: rgba(255,255,255,0.05); }
.we-task-output-lines { margin-left: 0; }

/* Markdown rendered output */
.we-task-output-md {
  padding: 12px 16px;
  overflow-y: auto;
  max-height: 600px;
}
.we-task-md {
  font-size: 13px; line-height: 1.6; color: #ccc;
}
.we-task-md h1, .we-task-md h2, .we-task-md h3 {
  color: #e2e8f0; font-weight: 600;
}
.we-task-md h1 { font-size: 17px; border-bottom: 1px solid rgba(255,255,255,0.08); padding-bottom: 6px; margin: 16px 0 10px; }
.we-task-md h2 { font-size: 14px; margin: 18px 0 8px; color: #93c5fd; }
.we-task-md h3 { font-size: 13px; color: #94a3b8; margin: 12px 0 6px; }
.we-task-md p { margin: 6px 0; }
.we-task-md ul, .we-task-md ol { margin: 6px 0; padding-left: 20px; }
.we-task-md li { margin: 4px 0; line-height: 1.55; }
.we-task-md li::marker { color: #444; }
.we-task-md li strong { color: #93c5fd; }
.we-task-md code {
  font-family: 'SF Mono', 'Menlo', 'Monaco', monospace;
  font-size: 12px; background: rgba(255,255,255,0.06);
  padding: 1px 5px; border-radius: 3px; color: #e2a8ff;
}
.we-task-md pre {
  background: #0d1117; border-radius: 6px; padding: 10px 12px;
  margin: 8px 0; overflow-x: auto; border: 1px solid rgba(255,255,255,0.06);
}
.we-task-md pre code {
  background: none; padding: 0; color: #b0bec5; font-size: 11px;
  line-height: 1.5;
}
.we-task-md table {
  border-collapse: collapse; width: 100%; margin: 8px 0; font-size: 12px;
}
.we-task-md th, .we-task-md td {
  border: 1px solid rgba(255,255,255,0.1); padding: 5px 10px; text-align: left;
}
.we-task-md th { background: rgba(255,255,255,0.04); color: #94a3b8; font-weight: 600; font-size: 11px; }
.we-task-md td { color: #bbb; }
.we-task-md tr:hover td { background: rgba(255,255,255,0.02); }
.we-task-md blockquote {
  border-left: 3px solid #3b82f6; margin: 4px 0; padding: 4px 12px;
  color: #94a3b8; background: rgba(59,130,246,0.05); border-radius: 0 4px 4px 0;
  font-size: 12px; line-height: 1.5;
}
.we-task-md blockquote p { margin: 2px 0; }
.we-task-md blockquote strong { color: #60a5fa; }
.we-task-md blockquote + blockquote { margin-top: 2px; }
.we-task-md hr { border: none; border-top: 1px solid rgba(255,255,255,0.08); margin: 12px 0; }
.we-task-md strong { color: #e2e8f0; }
.we-task-md em { color: #94a3b8; }
.we-task-md a { color: #60a5fa; text-decoration: none; }
.we-task-md a:hover { text-decoration: underline; }
.we-task-md img { max-width: 100%; border-radius: 4px; }

/* Markdown in summary (preview) */
.we-task-output-summary.we-task-md {
  font-family: inherit;
  white-space: normal;
}
.we-task-output-summary.we-task-md p { margin: 2px 0; }
.we-task-output-summary.we-task-md h1,
.we-task-output-summary.we-task-md h2,
.we-task-output-summary.we-task-md h3 { font-size: 12px; margin: 4px 0 2px; }

/* Execution logs button */
.we-task-exec-logs { margin-top: 4px; }
.we-task-logs-btn {
  background: none; border: none; color: #555; font-size: 10px;
  cursor: pointer; padding: 2px 0; text-decoration: underline;
  text-underline-offset: 2px;
}
.we-task-logs-btn:hover { color: #888; }

/* Task toolbar */
.we-task-toolbar {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.we-task-toolbar .walle-filter-select { font-size: 11px; padding: 4px 6px; min-width: 80px; }
.we-task-toolbar .walle-btn { padding: 4px 10px; font-size: 11px; }

/* Task summary bar */
.we-task-summary {
  display: flex; gap: 10px; padding: 4px 12px;
  font-size: 11px; color: #666;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.we-task-summary-item { cursor: pointer; padding: 2px 6px; border-radius: 3px; user-select: none; }
.we-task-summary-item:hover { background: rgba(255,255,255,0.06); }
.we-task-summary-item.active { font-weight: 700; background: rgba(255,255,255,0.08); text-decoration: underline; text-underline-offset: 3px; }
.we-task-clear-btn {
  cursor: pointer; color: #e03131; font-size: 16px; font-weight: 700;
  padding: 0 4px; border-radius: 3px; line-height: 1;
}
.we-task-clear-btn:hover { background: rgba(224,49,49,0.15); }
.we-task-summary-item.running { color: #228be6; }
.we-task-summary-item.pending { color: #fab005; }
.we-task-summary-item.paused { color: #888; }
.we-task-summary-item.completed { color: #5c940d; }
.we-task-summary-item.failed { color: #e03131; }

/* Task alert banner */
.we-task-alert {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; margin: 6px 10px;
  background: rgba(224,49,49,0.08);
  border: 1px solid rgba(224,49,49,0.25);
  border-radius: 6px;
  font-size: 12px; color: #fab005;
}
.we-task-alert-icon { font-size: 14px; }
.we-task-alert-text { flex: 1; }

/* Task group (collapsible) */
.we-task-group { margin: 0; }
.we-task-group-header {
  font-size: 12px; font-weight: 600; padding: 8px 12px;
  cursor: pointer; user-select: none;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  list-style: none;
}
.we-task-group-header::-webkit-details-marker { display: none; }
.we-task-group-header::before {
  content: '\25B6'; font-size: 9px; margin-right: 6px;
  display: inline-block; transition: transform 0.15s;
}
.we-task-group[open] > .we-task-group-header::before { transform: rotate(90deg); }
.we-task-group-header:hover { background: rgba(255,255,255,0.03); }

/* View tabs */
.we-view-tabs {
  display: flex; align-items: center; gap: 2px;
  padding: 4px 10px 0; border-bottom: 1px solid var(--border, #2a2a3e);
}
.we-view-tab {
  padding: 6px 14px; border: none; background: transparent;
  color: var(--fg-muted, #888); font-size: 12px; font-weight: 500;
  cursor: pointer; border-bottom: 2px solid transparent;
  border-radius: 4px 4px 0 0; transition: all 0.15s;
}
.we-view-tab:hover { color: var(--fg, #e0e0e0); background: rgba(255,255,255,0.04); }
.we-view-tab.active { color: var(--accent, #60a5fa); border-bottom-color: var(--accent, #60a5fa); font-weight: 600; }
.we-view-tab-badge {
  display: inline-block; min-width: 16px; height: 16px; line-height: 16px;
  text-align: center; font-size: 10px; font-weight: 700; border-radius: 8px;
  background: #e03131; color: #fff; margin-left: 4px; padding: 0 4px;
}

/* Task card */
.we-task-card {
  background: var(--bg-lighter, #1e1e2e);
  border: 1px solid var(--border, #2a2a3e);
  border-left: 3px solid #888;
  border-radius: 6px;
  padding: 10px 14px;
  margin: 6px 10px;
  transition: padding 0.15s;
}
.we-task-card.compact { padding: 6px 14px; }
.we-task-card.compact .we-task-card-header { margin-bottom: 0; }
.we-task-card-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 4px;
}
.we-task-card-title { font-size: 13px; font-weight: 600; color: var(--accent, #60a5fa); }
.we-task-card-status { font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; display: inline-flex; align-items: center; gap: 5px; }
.we-task-card-desc { font-size: 12px; color: #999; line-height: 1.4; margin-bottom: 4px; }
.we-task-card-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }

/* Status dots */
.we-status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.we-status-dot--running { background: #228be6; animation: we-pulse 1.5s ease-in-out infinite; }
.we-status-dot--pending { background: #fab005; }
.we-status-dot--paused { background: #888; }
.we-status-dot--failed { background: #e03131; }
.we-status-dot--completed { background: #5c940d; }
.we-status-dot--cancelled { background: #666; }
@keyframes we-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

/* Task metadata details toggle */
.we-task-meta-toggle { color: #555; cursor: pointer; font-size: 10px; text-decoration: underline; text-underline-offset: 2px; user-select: none; }
.we-task-meta-toggle:hover { color: #888; }
.we-task-meta-extra { display: none; }
.we-task-meta.we-meta-expanded .we-task-meta-extra { display: contents; }

/* Compact metadata line */
.we-task-meta-compact {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 11px; color: #777; margin-top: 2px;
}
.we-task-meta-compact span { white-space: nowrap; }

/* Source icons */
.we-src-icon {
  display: inline-block; padding: 1px 5px; border-radius: 3px;
  font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px;
}
.we-src-icon.slack { background: #1a2e1a; color: #4ade80; }
.we-src-icon.chat { background: #1a1a3e; color: #60a5fa; }
.we-src-icon.init { background: #2e1a2e; color: #c084fc; }
.we-src-link {
  color: #60a5fa; text-decoration: none; font-size: 11px;
}
.we-src-link:hover { text-decoration: underline; }

/* Slack thread info panel */
.we-slack-info { margin: 8px 0 4px; }
.we-slack-thread-status {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; margin-top: 6px;
  background: rgba(255,255,255,0.03); border-radius: 6px;
  font-size: 12px;
}
.we-thread-badge {
  font-weight: 600; font-size: 11px;
  padding: 2px 8px; border-radius: 10px;
}
.we-thread-badge.active { background: #1a2e1a; color: #4ade80; }
.we-thread-badge.expired { background: #2a2a2a; color: #888; }
.we-thread-expires { color: #888; font-size: 11px; }

/* Compact inline action buttons */
.we-compact-actions { display: inline-flex; gap: 4px; margin-left: auto; }
.we-compact-btn {
  width: 22px; height: 22px; border-radius: 4px; border: 1px solid rgba(255,255,255,0.1);
  background: transparent; color: #888; font-size: 11px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.we-compact-btn:hover { background: rgba(255,255,255,0.08); color: #ccc; }
.we-compact-btn.run:hover { color: #4ade80; border-color: #4ade80; }
.we-compact-btn.stop:hover { color: #e03131; border-color: #e03131; }

/* Task context menu */
.we-task-menu {
  background: #1e1e2e; border: 1px solid rgba(255,255,255,0.15); border-radius: 6px;
  min-width: 140px; padding: 4px 0; z-index: 1000;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}
.we-task-menu-item {
  padding: 6px 12px; font-size: 12px; color: #ccc; cursor: pointer;
  white-space: nowrap;
}
.we-task-menu-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
.we-task-menu-item.danger { color: #e03131; }
.we-task-menu-item.danger:hover { background: rgba(224,49,49,0.15); }

/* Automation table view */
.we-auto-health {
  display: flex; gap: 12px; padding: 8px 10px; margin-bottom: 4px;
  font-size: 12px; font-weight: 500;
}
.we-auto-health-item.ok { color: #5c940d; }
.we-auto-health-item.paused { color: #888; }
.we-auto-health-item.failed { color: #e03131; }

.we-auto-table {
  width: 100%; border-collapse: collapse; font-size: 12px;
}
.we-auto-table th {
  text-align: left; padding: 6px 10px; color: #666; font-weight: 500;
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border, #2a2a3e);
}
.we-auto-row {
  cursor: pointer; transition: background 0.1s;
}
.we-auto-row:hover { background: rgba(255,255,255,0.03); }
.we-auto-row.expanded { background: rgba(59,130,246,0.05); }
.we-auto-row td { padding: 8px 10px; border-bottom: 1px solid rgba(255,255,255,0.03); }
.we-auto-title { color: var(--fg, #e0e0e0); font-weight: 500; }
.we-auto-sched { color: #888; }
.we-auto-last { color: #777; }
.we-auto-actions { text-align: right; }
.we-auto-btn {
  padding: 2px 8px; font-size: 10px; border-radius: 3px; cursor: pointer;
  border: 1px solid rgba(255,255,255,0.1); background: transparent; color: #888;
}
.we-auto-btn:hover { background: rgba(255,255,255,0.08); color: #ccc; }
.we-auto-result { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.we-auto-result-ok { color: #777; }
.we-auto-result-err { color: #e03131; font-weight: 500; }
.we-auto-detail td {
  padding: 0 10px 12px 10px;
  background: rgba(59,130,246,0.03);
  border-bottom: 1px solid var(--border, #2a2a3e);
}

/* Task compact card result/error preview */
.we-task-preview {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 11px;
  line-height: 1.45;
  margin-top: 5px;
  padding: 2px 0;
  min-width: 0;
}
.we-task-preview-error,
.we-task-preview-result {
  flex: 1;
  min-width: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.we-task-preview-error.long,
.we-task-preview-result.long {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.we-task-preview.expanded-message .we-task-preview-error.long,
.we-task-preview.expanded-message .we-task-preview-result.long {
  display: block;
}
.we-task-preview-error { color: #e03131; font-weight: 500; }
.we-task-preview-result { color: #777; font-family: 'SF Mono', 'Menlo', monospace; font-size: 10px; }
.we-task-message-toggle {
  flex-shrink: 0;
  align-self: flex-start;
  border: 1px solid rgba(96,165,250,0.25);
  background: rgba(96,165,250,0.08);
  color: #8ab4ff;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
}
.we-task-message-toggle:hover {
  background: rgba(96,165,250,0.16);
  border-color: rgba(96,165,250,0.45);
  color: #b7ccff;
}

/* Dashboard summary panel */
.we-dashboard-summary { margin: 8px 12px; padding: 10px 14px; background: #1a1a2e; border: 1px solid #2a2a3e; border-radius: 8px; font-size: 12px; }
.we-dash-header { display: flex; justify-content: space-between; align-items: center; color: #aaa; cursor: pointer; }
.we-dash-header:hover { color: #fff; }
.we-dash-dismiss { font-size: 16px; padding: 0 4px; cursor: pointer; color: #666; }
.we-dash-dismiss:hover { color: #fff; }
.we-dash-body { margin-top: 8px; }
.we-dash-change { padding: 3px 0; display: flex; align-items: baseline; gap: 6px; }
.we-dash-change .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.we-dash-change.completed .dot { background: #5c940d; }
.we-dash-change.failed .dot { background: #e03131; }
.we-dash-snippet { color: #777; font-size: 11px; margin-left: 4px; }
.we-dash-actions { margin-top: 8px; padding-top: 8px; border-top: 1px solid #2a2a3e; display: flex; gap: 8px; align-items: center; }

/* Chat date separator */
.we-chat-date-sep { text-align: center; color: var(--fg-dim, #666); font-size: 11px; padding: 12px 0 4px; position: relative; }
.we-chat-date-sep::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid rgba(255,255,255,0.06); }
.we-chat-date-sep span { position: relative; background: var(--bg, #1a1b26); padding: 0 12px; }

/* Task live logs */
.we-task-log-panel {
  margin-top: 8px;
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: 4px;
  overflow: hidden;
}
.we-task-log-header {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; color: #60a5fa; padding: 4px 8px;
  background: rgba(59,130,246,0.08);
  border-bottom: 1px solid rgba(59,130,246,0.15);
}
.we-task-log-pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: #60a5fa;
  animation: we-pulse 1.5s ease-in-out infinite;
}
@keyframes we-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
.we-task-log-content {
  font-family: 'SF Mono', 'Menlo', 'Monaco', monospace;
  font-size: 11px; line-height: 1.5;
  color: #bbb; background: #0d1117;
  margin: 0; padding: 8px; white-space: pre-wrap;
  max-height: 250px; overflow-y: auto;
}

/* Task metadata chips */
.we-task-meta {
  display: flex; gap: 12px; flex-wrap: wrap;
  font-size: 11px; color: #777; margin: 4px 0;
}
.we-task-meta span { white-space: nowrap; }

/* Chat search */
.we-chat-search-bar {
  display: flex;
  align-items: center;
  padding: 4px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  position: relative;
}
.we-chat-search-input {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px;
  color: var(--fg, #e0e0e0);
  padding: 4px 8px;
  font-size: 12px;
  outline: none;
}
.we-chat-search-input:focus { border-color: rgba(59,130,246,0.5); }
.we-chat-search-input::placeholder { color: #666; }
.we-chat-search-clear {
  background: none; border: none; color: #888; font-size: 16px;
  cursor: pointer; padding: 0 4px; margin-left: 4px;
}
.we-chat-search-clear:hover { color: #ccc; }
.we-search-results { background: rgba(0,0,0,0.15); }
.we-search-header {
  font-size: 11px; color: #888; padding: 6px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.we-search-result {
  padding: 6px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.we-search-result:hover { background: rgba(255,255,255,0.03); }
.we-search-result-meta { font-size: 11px; margin-bottom: 2px; }
.we-search-result-time { color: #666; font-size: 10px; margin-left: 6px; }
.we-search-result-text { font-size: 12px; color: #bbb; line-height: 1.4; }
.we-search-highlight { background: rgba(250, 204, 21, 0.3); color: #fff; border-radius: 2px; padding: 0 1px; }

/* Select mode & export */
.we-select-toggle {
  background: none; border: 1px solid rgba(255,255,255,0.1); color: #888;
  font-size: 14px; cursor: pointer; padding: 2px 6px; border-radius: 4px;
  margin-left: 4px; line-height: 1;
}
.we-select-toggle:hover { color: #ccc; border-color: rgba(255,255,255,0.2); }
.we-select-toggle.active { color: #60a5fa; border-color: rgba(59,130,246,0.5); background: rgba(59,130,246,0.1); }
.we-export-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 10px; background: rgba(59,130,246,0.08);
  border-bottom: 1px solid rgba(59,130,246,0.2);
  font-size: 12px;
}
.we-export-count { color: #60a5fa; font-weight: 500; margin-right: auto; }
.we-turn-group.we-selected { background: rgba(59,130,246,0.08); }
.we-turn-checkbox {
  font-size: 16px; color: #60a5fa; cursor: pointer;
  position: absolute; left: 4px; top: 8px;
}
.we-turn-group { position: relative; }
.we-turn-group[onclick] { cursor: pointer; padding-left: 24px; }
.we-turn-group[onclick]:hover { background: rgba(255,255,255,0.02); }
.we-turn-group[onclick] .we-turn-checkbox { pointer-events: none; }

/* Actions */
.walle-action-card {
  background: var(--bg-lighter, #1e1e2e); border: 1px solid var(--border);
  border-radius: 8px; padding: 12px 16px; margin-bottom: 10px;
}
.walle-action-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.walle-action-type { font-size: 11px; font-weight: 600; color: var(--accent); }
.walle-action-confidence { font-size: 11px; color: var(--fg-muted, #888); }
.walle-action-content { font-size: 12px; color: var(--fg); margin-bottom: 8px; white-space: pre-wrap; }
.walle-action-target { font-size: 11px; color: var(--fg-muted, #888); margin-bottom: 8px; }
.walle-action-buttons { display: flex; gap: 8px; align-items: center; }
.walle-action-reject-input {
  flex: 1; padding: 4px 8px; border-radius: 4px; border: 1px solid var(--border);
  background: var(--bg); color: var(--fg); font-size: 11px;
}

/* Confidence bars */
.walle-confidence-row { display: flex; align-items: center; gap: 12px; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.walle-confidence-domain { font-size: 12px; color: var(--fg); min-width: 120px; }
.walle-confidence-tier { font-size: 11px; font-weight: 700; min-width: 50px; }
.walle-confidence-tier.t1 { color: #888; }
.walle-confidence-tier.t2 { color: #e8590c; }
.walle-confidence-tier.t3 { color: #5c940d; }
.walle-confidence-tier.t4 { color: var(--accent); }
.walle-confidence-stats { font-size: 10px; color: var(--fg-muted, #888); }

/* Briefing Items Table */
.we-briefing-items { margin-top: 8px; }
.we-briefing-table {
  width: 100%; border-collapse: collapse; font-size: 12px;
}
.we-briefing-table thead th {
  text-align: left; font-size: 10px; font-weight: 600; color: #888;
  text-transform: uppercase; letter-spacing: 0.5px;
  padding: 4px 8px; border-bottom: 1px solid rgba(255,255,255,0.1);
}
.we-briefing-row td {
  padding: 6px 8px; border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: middle;
}
.we-briefing-row:hover { background: rgba(255,255,255,0.03); }
.we-briefing-title { color: var(--fg); max-width: 300px; }
.we-briefing-owner { color: #999; white-space: nowrap; }
.we-briefing-urgency { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; }
.we-briefing-actions { white-space: nowrap; }

.we-briefing-stale td { opacity: 0.7; }
.we-briefing-snoozed td { opacity: 0.5; font-style: italic; }

.we-briefing-badge {
  display: inline-block; font-size: 9px; font-weight: 600; padding: 1px 5px;
  border-radius: 3px; vertical-align: middle;
}
.we-briefing-badge.stale { background: rgba(250,176,5,0.15); color: #fab005; }
.we-briefing-badge.snoozed { background: rgba(136,136,136,0.15); color: #888; }
.we-briefing-note { font-size: 10px; color: #60a5fa; cursor: help; }

/* Briefing item action buttons */
.we-bi-btn {
  background: transparent; border: 1px solid rgba(255,255,255,0.12);
  color: #999; font-size: 10px; padding: 2px 7px; border-radius: 3px;
  cursor: pointer; margin-right: 2px;
}
.we-bi-btn:hover { border-color: rgba(255,255,255,0.3); color: #ccc; }
.we-bi-btn.ask { color: #60a5fa; border-color: rgba(96,165,250,0.3); }
.we-bi-btn.ask:hover { background: rgba(96,165,250,0.1); color: #93c5fd; }
.we-bi-btn.done { color: #5c940d; border-color: rgba(92,148,13,0.3); }
.we-bi-btn.done:hover { background: rgba(92,148,13,0.1); }
.we-bi-btn.snooze { color: #fab005; border-color: rgba(250,176,5,0.3); }
.we-bi-btn.snooze:hover { background: rgba(250,176,5,0.1); }
.we-bi-btn.dismiss { color: #666; border-color: rgba(255,255,255,0.08); }
.we-bi-btn.dismiss:hover { color: #e03131; border-color: rgba(224,49,49,0.3); }

/* ===== Skills Tab — Redesigned (Phase 1) ===== */

/* Analytics Summary Bar */
.we-skills-analytics {
  display: flex; gap: 16px; padding: 10px 16px; margin-bottom: 12px;
  background: var(--bg-lighter, #1e1e2e); border: 1px solid var(--border);
  border-radius: 8px; flex-wrap: wrap;
}
.we-skills-analytics-item {
  display: flex; flex-direction: column; align-items: center; min-width: 80px;
}
.we-skills-analytics-value { font-size: 20px; font-weight: 700; color: var(--accent); }
.we-skills-analytics-label { font-size: 10px; color: var(--fg-muted, #888); margin-top: 2px; }
.we-skills-analytics-item.failing .we-skills-analytics-value { color: #e03131; cursor: pointer; }

/* Toolbar: search, filters, sort */
.we-skills-toolbar {
  display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; align-items: center;
}
.we-skills-search {
  flex: 1; min-width: 160px; padding: 6px 10px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--bg); color: var(--fg);
  font-size: 12px;
}
.we-skills-search:focus { outline: none; border-color: var(--accent); }
.we-skills-search::placeholder { color: #666; }

/* Category/status pill filters */
.we-skills-pills { display: flex; gap: 4px; flex-wrap: wrap; }
.we-skills-pill {
  padding: 3px 10px; border-radius: 12px; font-size: 11px; cursor: pointer;
  border: 1px solid var(--border); background: transparent; color: var(--fg-muted, #888);
  transition: all 0.15s; white-space: nowrap;
}
.we-skills-pill:hover { background: rgba(255,255,255,0.06); color: var(--fg); }
.we-skills-pill.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Redesigned skill card */
.we-skill-card {
  display: flex; background: var(--bg-lighter, #1e1e2e);
  border: 1px solid var(--border); border-radius: 8px;
  margin-bottom: 8px; overflow: hidden; cursor: pointer;
  transition: border-color 0.15s;
}
.we-skill-card:hover { border-color: var(--accent); }
.we-skill-card-stripe {
  width: 4px; flex-shrink: 0;
}
.we-skill-card-stripe.healthy { background: #5c940d; }
.we-skill-card-stripe.failing { background: #e8590c; }
.we-skill-card-stripe.disabled { background: #555; }
.we-skill-card-stripe.warning { background: #fab005; }

.we-skill-card-body { flex: 1; padding: 10px 14px; min-width: 0; }

.we-skill-card-header {
  display: flex; align-items: center; gap: 8px; margin-bottom: 4px; flex-wrap: wrap;
}
.we-skill-card-name { font-size: 13px; font-weight: 600; color: var(--fg); }
.we-skill-card-badge {
  font-size: 9px; font-weight: 600; padding: 1px 6px; border-radius: 3px;
  text-transform: uppercase; letter-spacing: 0.3px;
}
.we-skill-card-badge.version { background: rgba(59,130,246,0.15); color: #60a5fa; }
.we-skill-card-badge.bundled { background: rgba(136,136,136,0.15); color: #888; }
.we-skill-card-badge.user { background: rgba(92,148,13,0.15); color: #5c940d; }
.we-skill-card-badge.workspace { background: rgba(130,80,223,0.15); color: #a78bfa; }
.we-skill-card-badge.registry { background: rgba(232,89,12,0.15); color: #e8590c; }
.we-skill-card-badge.agent { background: rgba(59,130,246,0.1); color: #60a5fa; }
.we-skill-card-badge.script { background: rgba(250,176,5,0.1); color: #fab005; }

.we-skill-card-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 4px; }
.we-skill-tag {
  display: inline-block; padding: 1px 6px; border-radius: 3px; font-size: 10px;
  font-weight: 500; background: rgba(255,255,255,0.06); color: var(--fg-muted, #888);
}
.we-skill-tag.sync { background: rgba(16,152,173,0.15); color: #1098ad; }
.we-skill-tag.data { background: rgba(54,79,199,0.15); color: #748ffc; }
.we-skill-tag.communication { background: rgba(92,148,13,0.15); color: #a9e34b; }
.we-skill-tag.coding { background: rgba(130,80,223,0.15); color: #b197fc; }
.we-skill-tag.monitoring { background: rgba(232,89,12,0.15); color: #ff922b; }
.we-skill-tag.automation { background: rgba(250,176,5,0.15); color: #ffd43b; }

.we-skill-card-desc {
  font-size: 12px; color: #999; line-height: 1.4; margin-bottom: 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}

.we-skill-card-stats {
  display: flex; gap: 12px; align-items: center; font-size: 11px; color: var(--fg-muted, #888);
}
.we-skill-rate-bar {
  display: inline-block; width: 40px; height: 4px; border-radius: 2px;
  background: var(--border); overflow: hidden; vertical-align: middle;
}
.we-skill-rate-fill { height: 100%; border-radius: 2px; background: #5c940d; }
.we-skill-rate-fill.low { background: #e03131; }
.we-skill-rate-fill.mid { background: #fab005; }

.we-skill-card-actions {
  display: flex; align-items: center; gap: 6px; padding: 10px 14px;
  flex-shrink: 0;
}

/* Toggle switch */
.we-toggle {
  position: relative; display: inline-block; width: 32px; height: 18px;
  flex-shrink: 0;
}
.we-toggle input { opacity: 0; width: 0; height: 0; }
.we-toggle-slider {
  position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
  background-color: #444; transition: 0.2s; border-radius: 18px;
}
.we-toggle-slider::before {
  position: absolute; content: ""; height: 14px; width: 14px;
  left: 2px; bottom: 2px; background-color: #ccc;
  transition: 0.2s; border-radius: 50%;
}
.we-toggle input:checked + .we-toggle-slider { background-color: #5c940d; }
.we-toggle input:checked + .we-toggle-slider::before { transform: translateX(14px); }

/* Overflow menu */
.we-skill-overflow {
  position: relative; display: inline-block;
}
.we-skill-overflow-btn {
  background: none; border: 1px solid rgba(255,255,255,0.1); color: #888;
  font-size: 14px; padding: 2px 6px; border-radius: 4px; cursor: pointer;
  line-height: 1;
}
.we-skill-overflow-btn:hover { color: #ccc; border-color: rgba(255,255,255,0.2); }
.we-skill-overflow-menu {
  display: none; position: absolute; right: 0; top: 100%; margin-top: 4px;
  background: #1e1e2e; border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px; min-width: 150px; padding: 4px 0; z-index: 1000;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}
.we-skill-overflow-menu.open { display: block; }
.we-skill-overflow-item {
  padding: 6px 12px; font-size: 12px; color: #ccc; cursor: pointer; white-space: nowrap;
}
.we-skill-overflow-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
.we-skill-overflow-item.danger { color: #e03131; }
.we-skill-overflow-item.danger:hover { background: rgba(224,49,49,0.15); }

/* ===== Skill Detail Panel (Slide-Over) ===== */
.we-skill-detail {
  position: fixed; top: 0; right: -480px; width: 480px; height: 100vh;
  background: var(--bg, #1a1b26); border-left: 1px solid var(--border);
  z-index: 900; display: flex; flex-direction: column;
  transition: right 0.25s ease;
  box-shadow: -4px 0 20px rgba(0,0,0,0.4);
}
.we-skill-detail.open { right: 0; }
.we-skill-detail-backdrop {
  display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4); z-index: 899;
}
.we-skill-detail-backdrop.open { display: block; }

.we-skill-detail-header {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px;
  border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.we-skill-detail-close {
  background: none; border: none; color: #888; font-size: 18px; cursor: pointer;
  padding: 2px 6px; line-height: 1;
}
.we-skill-detail-close:hover { color: #ccc; }
.we-skill-detail-title { font-size: 15px; font-weight: 700; color: var(--fg); flex: 1; }

.we-skill-detail-tabs {
  display: flex; gap: 2px; padding: 0 16px; border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.we-skill-detail-tab {
  padding: 8px 12px; font-size: 12px; color: var(--fg-muted, #888); cursor: pointer;
  border-bottom: 2px solid transparent; background: none; border-top: none;
  border-left: none; border-right: none; transition: all 0.15s;
}
.we-skill-detail-tab:hover { color: var(--fg); }
.we-skill-detail-tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

.we-skill-detail-content {
  flex: 1; overflow-y: auto; padding: 16px;
}

/* Config form */
.we-config-form { display: flex; flex-direction: column; gap: 12px; }
.we-config-field { display: flex; flex-direction: column; gap: 4px; }
.we-config-label { font-size: 12px; font-weight: 600; color: var(--fg); }
.we-config-help { font-size: 11px; color: var(--fg-muted, #888); }
.we-config-input {
  padding: 6px 10px; border-radius: 4px; border: 1px solid var(--border);
  background: var(--bg); color: var(--fg); font-size: 12px;
}
.we-config-input:focus { outline: none; border-color: var(--accent); }
.we-config-select {
  padding: 6px 10px; border-radius: 4px; border: 1px solid var(--border);
  background: var(--bg); color: var(--fg); font-size: 12px;
}
.we-config-save { margin-top: 8px; align-self: flex-start; }

/* Execution history table */
.we-exec-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.we-exec-table th {
  text-align: left; padding: 6px 8px; color: #666; font-weight: 500;
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.we-exec-table td {
  padding: 6px 8px; border-bottom: 1px solid rgba(255,255,255,0.04);
  color: #bbb;
}
.we-exec-status { font-size: 10px; font-weight: 600; text-transform: uppercase; }
.we-exec-status.success { color: #5c940d; }
.we-exec-status.failure { color: #e03131; }

/* Source viewer */
.we-skill-source-view {
  background: #0d1117; border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px; padding: 12px; font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 12px; line-height: 1.5; color: #c9d1d9; white-space: pre-wrap;
  overflow-x: auto; max-height: 500px; overflow-y: auto;
}

/* Requirements validation */
.we-req-list { list-style: none; padding: 0; margin: 8px 0; }
.we-req-item {
  display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 12px;
}
.we-req-icon { width: 16px; text-align: center; }
.we-req-icon.ok { color: #5c940d; }
.we-req-icon.missing { color: #e03131; }
.we-req-suggestion { font-size: 11px; color: var(--fg-muted, #888); font-style: italic; }

/* ===== Skill Editor ===== */
.we-skill-editor { display: flex; flex-direction: column; gap: 12px; }
.we-skill-editor-row { display: flex; gap: 12px; }
.we-skill-editor-row > * { flex: 1; }
.we-skill-editor-textarea {
  width: 100%; min-height: 200px; padding: 10px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--bg); color: var(--fg);
  font-family: 'SF Mono', 'Fira Code', monospace; font-size: 12px;
  line-height: 1.5; resize: vertical;
}
.we-skill-editor-textarea:focus { outline: none; border-color: var(--accent); }

/* Template cards */
.we-template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin: 12px 0; }
.we-template-card {
  padding: 12px; border-radius: 6px; border: 1px solid var(--border);
  background: var(--bg-lighter, #1e1e2e); cursor: pointer; transition: border-color 0.15s;
}
.we-template-card:hover { border-color: var(--accent); }
.we-template-name { font-size: 12px; font-weight: 600; color: var(--fg); margin-bottom: 4px; }
.we-template-desc { font-size: 11px; color: var(--fg-muted, #888); line-height: 1.4; }

/* Claude Code Skills — grouped, collapsible, searchable */
.we-cc-skills { margin-top: 8px; }
.we-cc-skills-header {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--fg);
  padding: 10px 14px; cursor: pointer; user-select: none;
  background: var(--bg-lighter, #1e1e2e); border: 1px solid var(--border);
  border-radius: 8px;
}
.we-cc-skills-header:hover { border-color: var(--accent); }
.we-cc-skills-toggle { font-size: 10px; color: var(--fg-muted); transition: transform 0.15s; }
.we-cc-search {
  margin-left: auto; padding: 4px 8px; font-size: 11px;
  background: var(--bg, #14141e); border: 1px solid var(--border);
  border-radius: 4px; color: var(--fg); width: 160px;
}
.we-cc-search:focus { outline: none; border-color: var(--accent); }
.we-cc-search::placeholder { color: #666; }
.we-cc-skills-body { padding: 4px 0; }
.we-cc-group { margin: 4px 0; }
.we-cc-group-header {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--fg-muted);
  padding: 6px 14px; cursor: pointer; user-select: none;
}
.we-cc-group-header:hover { color: var(--fg); }
.we-cc-group-toggle { font-size: 9px; color: var(--fg-muted); }
.we-cc-group-count { font-weight: 400; color: var(--fg-muted, #666); font-size: 11px; }
.we-cc-group-body {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 6px; padding: 4px 14px 8px;
}
.we-cc-skill-card {
  padding: 8px 10px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--bg, #14141e);
  transition: border-color 0.15s;
}
.we-cc-skill-card:hover { border-color: var(--accent); }
.we-cc-skill-name { font-size: 11px; font-weight: 600; color: var(--fg); margin-bottom: 2px; display: flex; align-items: center; gap: 6px; }
.we-cc-skill-source { font-size: 9px; font-weight: 400; color: var(--fg-dim, #666); background: var(--bg-card, #1a1a2e); padding: 1px 5px; border-radius: 3px; white-space: nowrap; }
.we-cc-install-btn { font-size: 9px; padding: 1px 6px; border-radius: 3px; border: 1px solid var(--accent, #7c3aed); color: var(--accent, #7c3aed); background: transparent; cursor: pointer; margin-left: auto; white-space: nowrap; transition: all 0.15s; }
.we-cc-install-btn:hover { background: var(--accent, #7c3aed); color: #fff; }
.we-cc-skill-installed { font-size: 11px; color: #5c940d; margin-left: auto; font-weight: 600; }
.we-cc-skill-desc { font-size: 10px; color: var(--fg-muted, #888); line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* Shadow Config */
.shadow-toggle { transition: all 0.15s; }
.shadow-toggle:hover { opacity: 0.85; }
#shadow-config-panel input[type="range"] { accent-color: var(--accent, #7aa2f7); }
#shadow-config-panel label { user-select: none; }

/* Models Dashboard */
.health-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.health-dot.healthy { background: #9ece6a; box-shadow: 0 0 4px rgba(158,206,106,0.4); }
.health-dot.unknown { background: #e0af68; }
.health-dot.unhealthy { background: #f7768e; box-shadow: 0 0 4px rgba(247,118,142,0.4); }

.scorecard-toggle button { transition: all 0.15s; }
.scorecard-toggle button:hover { opacity: 0.85; }

.quality-zone.promote td:first-child { border-left: 3px solid #9ece6a; }
.quality-zone.stable td:first-child { border-left: 3px solid #e0af68; }
.quality-zone.warning td:first-child { border-left: 3px solid #ff9e64; }
.quality-zone.demote td:first-child { border-left: 3px solid #f7768e; }
.quality-zone:hover { background: rgba(122,162,247,0.05); }

.quality-chart { background: var(--bg-card, #24283b); border-radius: 6px; }

.tier-matrix { font-size: 12px; }
.tier-matrix-cell { transition: background 0.15s; }
.tier-matrix-cell:hover { background: rgba(122,162,247,0.08) !important; }
.tier-matrix-header { text-align: center; }

.promo-entry { transition: background 0.15s; }
.promo-entry:hover { background: rgba(122,162,247,0.06) !important; }
.promo-icon { min-width: 18px; text-align: center; }

.review-card { transition: border-color 0.15s, opacity 0.3s; }
.review-card:hover { border-color: var(--accent, #7aa2f7) !important; }
.review-card.highlighted { border-color: var(--accent, #7aa2f7) !important; box-shadow: 0 0 0 1px var(--accent, #7aa2f7); }
.review-card.selected { background: rgba(122,162,247,0.06); }
.review-card-header { font-size: 12px; }
.review-card-body { font-size: 12px; }
.review-card-footer button:hover { opacity: 0.8; }
.review-filters select, .review-filters button { transition: all 0.15s; }

/* Training Review Modal */
.training-review-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.75); z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn 0.15s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.training-review-modal {
  background: var(--bg, #1a1b26); border: 1px solid var(--border, #414868);
  border-radius: 12px; width: 90vw; max-width: 900px; max-height: 90vh;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.training-review-modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px; border-bottom: 1px solid var(--border, #414868);
  flex-shrink: 0;
}
.training-review-modal-body {
  flex: 1; overflow-y: auto; padding: 20px;
}
.training-review-modal-footer {
  display: flex; gap: 8px; padding: 16px 20px;
  border-top: 1px solid var(--border, #414868);
  justify-content: center; flex-shrink: 0;
}

/* Side-by-side comparison */
.review-comparison {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  border: 1px solid var(--border, #414868); border-radius: 8px;
  overflow: hidden; margin: 16px 0;
}
.review-comparison-col {
  padding: 16px; min-height: 120px;
}
.review-comparison-col:first-child {
  border-right: 1px solid var(--border, #414868);
}
.review-comparison-label {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.5px; margin-bottom: 10px;
  display: flex; justify-content: space-between; align-items: center;
}
.review-comparison-text {
  font-size: 12px; line-height: 1.6; color: var(--fg, #c0caf5);
  white-space: pre-wrap; word-break: break-word; max-height: 300px; overflow-y: auto;
}
.review-score-badge {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums;
}

/* Shadow config panel */
.shadow-config-panel {
  background: var(--bg-card, #24283b); border-radius: 10px;
  padding: 16px; border: 1px solid var(--border, #414868);
}
.shadow-config-models-table {
  width: 100%; border-collapse: collapse; font-size: 12px; margin: 10px 0;
}
.shadow-config-models-table th {
  padding: 8px 10px; text-align: left; font-weight: 500;
  color: var(--fg-dim, #565f89); border-bottom: 1px solid var(--border, #414868);
}
.shadow-config-models-table td {
  padding: 6px 10px; border-bottom: 1px solid var(--border, #292e42);
  color: var(--fg, #c0caf5);
}
.shadow-config-models-table tr:hover { background: rgba(122,162,247,0.04); }

.shadow-weight-bar {
  height: 6px; border-radius: 3px; background: var(--border, #414868);
  overflow: hidden; min-width: 60px;
}
.shadow-weight-fill {
  height: 100%; border-radius: 3px; background: var(--accent, #7aa2f7);
}

/* Scorecard enhancements */
.scorecard-task-bars {
  display: flex; gap: 3px; align-items: center;
}
.scorecard-task-bar {
  width: 24px; height: 10px; border-radius: 2px;
  position: relative; cursor: help;
}
.scorecard-win-rate {
  font-size: 11px; font-variant-numeric: tabular-nums;
}
.scorecard-drill-down {
  padding: 16px;
}
.scorecard-drill-table {
  width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 12px;
}
.scorecard-drill-table th {
  padding: 6px 10px; text-align: left; font-weight: 500;
  color: var(--fg-dim, #565f89); border-bottom: 1px solid var(--border, #414868);
}
.scorecard-drill-table td {
  padding: 6px 10px; border-bottom: 1px solid var(--border, #292e42);
  color: var(--fg, #c0caf5);
}
.scorecard-drill-table tr:hover { background: rgba(122,162,247,0.04); }

/* Kbd nav hint */
.review-modal-nav-hint {
  font-size: 10px; color: var(--fg-dim, #565f89); text-align: center; margin-top: 8px;
}
.review-modal-nav-hint kbd {
  display: inline-block; padding: 1px 6px; border-radius: 3px;
  background: var(--bg-card, #24283b); border: 1px solid var(--border, #414868);
  font-size: 10px; font-family: inherit;
}

/* Eval Dashboard */
.we-eval-subnav { display: flex; gap: 2px; margin-bottom: 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.we-eval-tab { padding: 6px 12px; font-size: 11px; background: none; border: none; color: var(--text-dim); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.we-eval-tab:hover { color: var(--text); }
.we-eval-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.we-eval-score { font-weight: 600; font-size: 12px; font-variant-numeric: tabular-nums; }
.we-eval-suite-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.we-eval-suite-card:hover { border-color: var(--accent); }
.we-eval-diff-tag { display: inline-block; font-size: 10px; padding: 1px 7px; border-radius: 3px; }

/* Model badge below chat input */
.we-model-badge {
  font-size: 11px;
  color: var(--fg-muted, #888);
  padding: 2px 8px 4px;
  cursor: pointer;
  opacity: 0.7;
}
.we-model-badge:hover {
  opacity: 1;
  color: var(--accent);
}

/* Light theme refinements for Wall-E app chrome. Terminal/provider-owned
   session output intentionally keeps its dark terminal palette elsewhere. */
html[data-theme="light"] #walle-panel {
  background: var(--bg);
}
html[data-theme="light"] .walle-header {
  background: var(--bg-light);
}
html[data-theme="light"] .walle-body {
  background: var(--bg);
}
html[data-theme="light"] .walle-subnav-btn:hover {
  background: var(--accent-soft);
}
html[data-theme="light"] .walle-subnav-btn.active,
html[data-theme="light"] .walle-btn.primary {
  color: var(--accent-fg);
}
html[data-theme="light"] .walle-card,
html[data-theme="light"] .walle-stat,
html[data-theme="light"] .shadow-config-panel,
html[data-theme="light"] .training-review-modal,
html[data-theme="light"] .quality-chart {
  background: var(--bg-card);
  box-shadow: 0 8px 24px var(--shadow-color);
}
html[data-theme="light"] .walle-timeline-item {
  border-bottom-color: var(--border);
}
html[data-theme="light"] .walle-btn:hover,
html[data-theme="light"] .shadow-chip:hover,
html[data-theme="light"] .tier-matrix-cell:hover,
html[data-theme="light"] .promo-entry:hover,
html[data-theme="light"] .shadow-config-models-table tr:hover,
html[data-theme="light"] .scorecard-drill-table tr:hover {
  background: var(--bg-hover) !important;
}
html[data-theme="light"] .shadow-stat-pill,
html[data-theme="light"] .we-cc-skills-header,
html[data-theme="light"] .we-cc-skill-card {
  background: var(--bg-card);
}
html[data-theme="light"] .training-review-overlay {
  background: var(--overlay-bg);
}
html[data-theme="light"] .review-modal-nav-hint kbd {
  background: var(--bg-lighter);
}

/* Question digest delivery settings panel */
.walle-digest-settings { margin-bottom: 14px; }
.walle-digest-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.walle-digest-label { font-size: 12px; font-weight: 600; color: var(--fg-muted, #9aa); margin-right: 4px; }
.walle-digest-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 3px 9px; border: 1px solid var(--border, #334); border-radius: 12px; color: var(--fg, #cdd); cursor: pointer; }
.walle-digest-chip.on { background: rgba(64,192,128,0.12); border-color: rgba(64,192,128,0.4); color: #6fe0a8; cursor: default; }
.walle-digest-chip input { margin: 0; }
.walle-digest-targets .walle-question-input { max-width: 280px; }
