:root {
  color-scheme: light;
  --seed-bg: #f8f6fc;
  --seed-fg: #1e2a6e;
  --seed-primary: #4a2b8c;
  --seed-accent: #5b3d8f;
  --seed-surface: #ffffff;
  --seed-radius: 14px;
  --seed-sidebar-bg: #ffffff;
  --seed-sidebar-fg: #2c2c3a;
  --seed-card-border: #e8e0f4;
  --seed-muted: #7a6b9a;
  --seed-lavender: #c8b8e8;
  --seed-hover: #3a1d6e;
  --seed-success: #2ecc71;
  --seed-warning: #f39c12;
  --seed-danger: #c0392b;
  --seed-sidebar-border: #f0ebf7;
  --seed-sidebar-hover: rgba(74, 43, 140, 0.04);
  --seed-sidebar-active: rgba(74, 43, 140, 0.08);
  --seed-focus-ring: rgba(74, 43, 140, 0.1);
  --seed-skill-tag-bg: rgba(74, 43, 140, 0.06);
  --seed-highlight-bg: rgba(74, 43, 140, 0.03);
  --seed-domain-green: linear-gradient(135deg, #1b7a3d, #3db06a);
  --seed-domain-red: linear-gradient(135deg, #b8302a, #e05a52);
  --seed-domain-teal: linear-gradient(135deg, #0e7490, #22b8cf);
  --seed-domain-orange: linear-gradient(135deg, #c05621, #ed8936);
  --seed-domain-indigo: linear-gradient(135deg, #3d2b7a, #6b5baf);
  --seed-domain-rose: linear-gradient(135deg, #9f1239, #e05a80);
}

* {
  box-sizing: border-box;
}

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

body {
  background: var(--seed-bg);
  color: var(--seed-fg);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  overflow: hidden;
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
}

.app-container {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  height: 100vh;
}

.sidebar {
  background: var(--seed-sidebar-bg);
  color: var(--seed-sidebar-fg);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--seed-sidebar-border);
  overflow: hidden;
}

.sidebar-actions {
  padding: 16px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-action-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 14px;
  color: var(--seed-sidebar-fg);
  background: transparent;
  width: 100%;
  text-align: left;
}

.sidebar-action-item:hover {
  background: var(--seed-sidebar-hover);
}

.sidebar-action-item.active {
  background: var(--seed-sidebar-active);
  color: var(--seed-primary);
  font-weight: 500;
}

.sidebar-action-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.7;
}

.sidebar-action-item.active svg {
  opacity: 1;
  color: var(--seed-primary);
}

.action-badge {
  margin-left: auto;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--seed-skill-tag-bg);
  color: var(--seed-primary);
  font-weight: 600;
}

.sidebar-tabs {
  display: flex;
  padding: 0 14px;
  gap: 4px;
  border-bottom: 1px solid var(--seed-sidebar-border);
}

.sidebar-tab {
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--seed-muted);
  cursor: pointer;
  border: 1px solid var(--seed-sidebar-border);
  border-radius: 6px;
  background: transparent;
  transition: all 0.15s;
  margin-bottom: 10px;
}

.sidebar-tab.active {
  background: var(--seed-sidebar-active);
  color: var(--seed-primary);
  border-color: var(--seed-card-border);
}

.sidebar-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 10px;
}

.sidebar-projects {
  padding: 8px 8px 14px;
}

.sidebar-conversations {
  padding: 8px 8px 14px;
}

.sidebar-mode-switcher {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 4px;
  padding: 0 4px 10px;
}

.sidebar-mode-button {
  height: 28px;
  border-radius: 7px;
  background: transparent;
  color: var(--seed-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.sidebar-mode-button:hover {
  background: var(--seed-sidebar-hover);
  color: var(--seed-sidebar-fg);
}

.sidebar-mode-button.active {
  background: var(--seed-sidebar-active);
  color: var(--seed-sidebar-fg);
}

.project-group-title {
  min-height: 34px;
  padding: 6px 4px 6px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--seed-sidebar-fg);
  font-size: 14px;
  font-weight: 500;
}

.project-group-label {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.project-group-toggle {
  flex: 1;
  height: 24px;
  padding: 0 2px;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.project-group-toggle:hover,
.project-group-toggle:focus-visible {
  background: var(--seed-sidebar-hover);
}

.project-group-toggle .project-group-icon {
  transition: transform 0.16s ease;
}

.project-group-toggle.is-collapsed .project-group-icon {
  transform: rotate(-90deg);
}

.project-group-icon {
  width: 16px;
  height: 16px;
  color: var(--seed-muted);
  flex-shrink: 0;
}

.project-group-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-group-new {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--seed-muted);
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
}

.project-group-new:hover,
.project-group-new:focus-visible {
  color: var(--seed-primary);
  background: var(--seed-sidebar-hover);
}

.project-group-new svg {
  width: 15px;
  height: 15px;
}

.list-group-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--seed-muted);
  padding: 10px 10px 4px;
}

.list-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.12s;
  font-size: 13px;
  color: var(--seed-sidebar-fg);
  margin-bottom: 1px;
}

.list-item:hover {
  background: var(--seed-sidebar-hover);
}

.list-item.active {
  background: var(--seed-sidebar-active);
  font-weight: 500;
}

.history-item-open {
  min-width: 0;
  flex: 1;
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 7px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.sidebar-projects .history-item-open {
  min-height: 30px;
  padding: 6px 8px 6px 28px;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.list-item-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.list-item-time {
  margin-left: 8px;
  color: var(--seed-muted);
  font-size: 12px;
  white-space: nowrap;
  flex-shrink: 0;
}

.sidebar-projects .list-item-time {
  margin-left: 0;
  font-size: 11px;
}

.list-item-summary {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--seed-muted);
  font-size: 11px;
  font-weight: 500;
}

.list-item-count {
  font-size: 11px;
  color: var(--seed-muted);
  background: var(--seed-sidebar-border);
  padding: 1px 6px;
  border-radius: 8px;
}

.history-item-more {
  width: 28px;
  height: 28px;
  margin-right: 4px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--seed-muted);
  background: transparent;
  cursor: pointer;
  opacity: 0;
  flex-shrink: 0;
}

.history-list-item:hover .history-item-more,
.history-list-item.menu-open .history-item-more,
.history-item-more:focus-visible {
  opacity: 1;
}

.history-item-more:hover {
  color: var(--seed-primary);
  background: var(--seed-sidebar-hover);
}

.history-item-more svg {
  width: 16px;
  height: 16px;
}

.sidebar-footer {
  padding: 12px 14px;
  border-top: 1px solid var(--seed-sidebar-border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--seed-primary), var(--seed-accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--seed-surface);
  flex-shrink: 0;
}

.footer-info {
  flex: 1;
  min-width: 0;
}

.footer-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--seed-sidebar-fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.footer-plan {
  font-size: 10px;
  color: var(--seed-muted);
}

.footer-actions {
  display: flex;
  gap: 4px;
}

.footer-action-btn {
  width: 26px;
  height: 26px;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--seed-muted);
  transition: all 0.15s;
}

.footer-action-btn:hover {
  background: var(--seed-sidebar-hover);
  color: var(--seed-primary);
}

.main-content {
  display: flex;
  flex-direction: column;
  background: var(--seed-bg);
  overflow: hidden;
}

.app-container.chat-active .main-content {
  background: var(--seed-bg);
}

.app-container.chat-active .main-header {
  display: none;
}

.main-header {
  padding: 16px 32px;
  background: var(--seed-surface);
  border-bottom: 1px solid var(--seed-sidebar-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.main-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.header-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
}

.page-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--seed-fg);
}

.page-subtitle {
  font-size: 13px;
  color: var(--seed-muted);
}

.header-search {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--seed-card-border);
  border-radius: 20px;
  background: var(--seed-bg);
  width: 260px;
  transition: border-color 0.2s;
  flex-shrink: 0;
}

.app-container.market-active .header-search {
  display: flex;
}

.header-search:focus-within {
  border-color: var(--seed-primary);
}

.header-search svg {
  width: 14px;
  height: 14px;
  color: var(--seed-muted);
  flex-shrink: 0;
}

.header-search input {
  border: none;
  background: transparent;
  font-size: 13px;
  color: var(--seed-fg);
  outline: none;
  width: 100%;
}

.header-search input::placeholder,
textarea::placeholder {
  color: var(--seed-muted);
}

.view {
  display: none;
  min-height: 0;
  flex: 1;
}

.view.active {
  display: block;
}

#chatView.view.active {
  display: flex;
  min-height: 0;
}

.market-content {
  height: 100%;
  overflow-y: auto;
  padding: 24px 32px;
}

.market-stats {
  display: flex;
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  flex: 1;
  padding: 16px 20px;
  background: var(--seed-surface);
  border: 1px solid var(--seed-card-border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon.purple {
  background: var(--seed-skill-tag-bg);
  color: var(--seed-primary);
}

.stat-icon.blue {
  background: var(--seed-highlight-bg);
  color: var(--seed-fg);
}

.stat-icon.green {
  background: rgba(46, 204, 113, 0.08);
  color: var(--seed-success);
}

.stat-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--seed-fg);
  line-height: 1.2;
}

.stat-label {
  font-size: 12px;
  color: var(--seed-muted);
}

.domains {
  display: grid;
  gap: 28px;
}

.domain-section {
  margin-bottom: 0;
}

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

.domain-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--seed-fg);
}

.domain-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--seed-surface);
}

.domain-count {
  font-size: 12px;
  color: var(--seed-muted);
  font-weight: 400;
}

.domain-more {
  font-size: 12px;
  color: var(--seed-primary);
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.domain-more:hover {
  text-decoration: underline;
}

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

.skill-card {
  background: var(--seed-surface);
  border: 1px solid var(--seed-card-border);
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 132px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skill-card:hover,
.skill-card.selected,
.skill-card:focus-visible {
  border-color: var(--seed-primary);
  box-shadow: 0 3px 12px var(--seed-focus-ring);
  transform: translateY(-1px);
  outline: none;
}

.skill-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.skill-avatar {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--seed-surface);
  flex-shrink: 0;
}

.skill-card-info {
  flex: 1;
  min-width: 0;
}

.skill-card-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--seed-fg);
  margin-bottom: 1px;
}

.skill-card-org {
  font-size: 11px;
  color: var(--seed-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.skill-card-desc {
  font-size: 12px;
  color: var(--seed-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.skill-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.skill-tag-sm {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--seed-skill-tag-bg);
  color: var(--seed-accent);
  font-weight: 500;
}

.skill-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 6px;
  font-weight: 500;
  flex-shrink: 0;
}

.skill-status.active {
  background: rgba(46, 204, 113, 0.1);
  color: var(--seed-success);
}

.skill-status.coming {
  background: rgba(243, 156, 18, 0.1);
  color: var(--seed-warning);
}

.primary-action,
.secondary-action {
  min-height: 32px;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.primary-action {
  background: var(--seed-primary);
  color: var(--seed-surface);
}

.primary-action:hover {
  background: var(--seed-hover);
}

.secondary-action {
  background: var(--seed-skill-tag-bg);
  color: var(--seed-primary);
}

.secondary-action:hover {
  background: var(--seed-sidebar-active);
}

.danger-action {
  min-height: 38px;
  border: 1px solid rgba(192, 57, 43, 0.24);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--seed-danger);
  background: rgba(192, 57, 43, 0.06);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  transition: all 0.15s;
}

.danger-action:hover {
  background: rgba(192, 57, 43, 0.1);
}

.danger-action.compact {
  min-height: 30px;
  padding: 0 10px;
}

.primary-action:disabled,
.secondary-action:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.bg-purple {
  background: linear-gradient(135deg, var(--seed-primary), var(--seed-accent));
}

.bg-navy {
  background: linear-gradient(135deg, var(--seed-fg), var(--seed-accent));
}

.bg-green {
  background: var(--seed-domain-green);
}

.bg-red {
  background: var(--seed-domain-red);
}

.bg-teal {
  background: var(--seed-domain-teal);
}

.bg-orange {
  background: var(--seed-domain-orange);
}

.bg-indigo {
  background: var(--seed-domain-indigo);
}

.bg-rose {
  background: var(--seed-domain-rose);
}

.task-content {
  height: 100%;
  overflow: auto;
  padding: 24px 32px;
  display: grid;
  grid-template-columns: 280px minmax(320px, 0.95fr) minmax(360px, 1.3fr);
  gap: 16px;
  align-items: stretch;
}

.task-panel {
  background: var(--seed-surface);
  border: 1px solid var(--seed-card-border);
  border-radius: 12px;
  padding: 16px;
  min-height: 0;
}

.task-panel-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--seed-fg);
  margin-bottom: 12px;
}

.selected-skill-card {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.selected-skill-card .skill-card-desc {
  display: block;
}

.task-editor,
.task-result {
  display: flex;
  flex-direction: column;
}

textarea {
  flex: 1;
  min-height: 280px;
  resize: vertical;
  border: 1px solid var(--seed-card-border);
  border-radius: 10px;
  padding: 12px;
  outline: none;
  color: var(--seed-fg);
  background: var(--seed-bg);
}

textarea:focus {
  border-color: var(--seed-primary);
  box-shadow: 0 0 0 3px var(--seed-focus-ring);
}

.task-actions {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.model-credit-bar {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(120px, 180px) minmax(80px, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.model-select {
  min-width: 0;
  height: 32px;
  border: 1px solid var(--seed-card-border);
  border-radius: 8px;
  background: var(--seed-bg);
  color: var(--seed-fg);
  padding: 0 8px;
  font-size: 12px;
}

.model-name {
  min-width: 0;
  color: var(--seed-muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.credit-balance {
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--seed-card-border);
  background: var(--seed-surface);
  color: var(--seed-fg);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.task-result pre {
  flex: 1;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  overflow: auto;
  border-radius: 10px;
  background: var(--seed-bg);
  color: var(--seed-sidebar-fg);
  border: 1px solid var(--seed-card-border);
  padding: 12px;
  font: 14px/1.7 Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
}

.task-result pre.streaming {
  box-shadow: inset 3px 0 0 var(--seed-primary);
}

.chat-layout {
  height: 100%;
  width: 100%;
  display: flex;
  min-height: 0;
}

.chat-layout.project-workspace-active {
  background: var(--seed-surface);
}

.project-workspace-active .chat-main {
  background: var(--seed-surface);
  color: var(--seed-sidebar-fg);
}

.project-workspace-active .chat-messages {
  padding: 14px 20px 8px;
  background: var(--seed-surface);
}

.project-chat-header {
  min-height: 70px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.project-conversation-header {
  min-height: 54px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.project-chat-title {
  color: var(--seed-sidebar-fg);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.4;
}

.project-chat-subtitle {
  margin-top: 4px;
  color: #8a8f8c;
  font-size: 12px;
}

.project-chat-actions {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.project-chat-empty {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--seed-muted);
  text-align: center;
}

.project-chat-empty-title {
  color: var(--seed-sidebar-fg);
  font-size: 15px;
  font-weight: 700;
}

.project-chat-empty-text {
  max-width: 420px;
  font-size: 12px;
  line-height: 1.6;
}

.project-feedback-action,
.project-refresh-action {
  min-height: 34px;
  border-radius: 8px;
  background: transparent;
  color: var(--seed-sidebar-fg);
  cursor: pointer;
  font-size: 12px;
}

.project-feedback-action {
  padding: 0 4px;
}

.project-refresh-action {
  padding: 0 14px;
  background: var(--seed-sidebar-active);
  color: var(--seed-primary);
  font-weight: 700;
}

.project-workspace-active .chat-composer {
  padding: 10px 16px 12px;
  background: var(--seed-surface);
}

.project-workspace-active .chat-attachment-list,
.project-workspace-active .chat-mode-shell,
.project-workspace-active .chat-composer-panel {
  max-width: none;
}

.project-workspace-active .chat-composer-panel {
  min-height: 112px;
  border-color: #dedede;
  border-radius: 10px;
  background: var(--seed-surface);
  box-shadow: none;
}

.project-workspace-active .chat-composer-panel textarea {
  min-height: 58px;
  color: var(--seed-sidebar-fg);
}

.project-workspace-active .chat-composer-panel textarea::placeholder {
  color: #a2a6a3;
}

.project-workspace-panel {
  width: 300px;
  flex: 0 0 300px;
  min-height: 0;
  overflow-y: auto;
  border-left: 1px solid var(--seed-sidebar-border);
  background: color-mix(in srgb, var(--seed-bg) 82%, var(--seed-surface));
  color: var(--seed-sidebar-fg);
  padding: 14px 14px 18px;
}

.project-workspace-panel[hidden] {
  display: none;
}

.project-workspace-panel.is-collapsed {
  flex-basis: 52px;
  width: 52px;
  padding-left: 10px;
  padding-right: 10px;
  overflow: hidden;
}

.project-workspace-panel.is-collapsed .project-panel-section,
.project-workspace-panel.is-collapsed .project-panel-header div {
  display: none;
}

.project-workspace-panel.is-collapsed .project-panel-header {
  justify-content: center;
}

.project-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--seed-fg);
  font-size: 16px;
  font-weight: 800;
}

.project-panel-toggle,
.project-panel-section-title button {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
}

.project-panel-toggle::before,
.project-panel-section-title button::before {
  content: "";
  display: block;
  width: 8px;
  height: 8px;
  margin: 4px auto;
  border-right: 1px solid var(--seed-muted);
  border-bottom: 1px solid var(--seed-muted);
  transform: rotate(45deg);
}

.project-panel-toggle.is-collapsed::before,
.project-panel-section-title button.is-collapsed::before {
  transform: rotate(-45deg);
}

.project-panel-section {
  padding: 18px 0 16px;
  border-bottom: 1px solid var(--seed-sidebar-border);
}

.project-panel-section.is-collapsed > :not(.project-panel-section-title) {
  display: none;
}

.project-panel-empty {
  padding: 4px 0;
  color: var(--seed-muted);
  font-size: 13px;
  line-height: 1.6;
}

.project-inline-approval {
  margin-left: auto;
  min-width: 72px;
  padding: 7px 10px;
  border: 1px solid var(--seed-primary);
  border-radius: 6px;
  background: var(--seed-primary);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(74, 43, 140, 0.16);
}

.project-inline-approval:hover,
.project-inline-approval:focus-visible {
  background: #3f218c;
  outline: 0;
}

.project-inline-approval:disabled {
  opacity: 0.62;
  cursor: progress;
  box-shadow: none;
}

.project-panel-section-title {
  min-height: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--seed-fg);
  font-size: 14px;
  font-weight: 800;
}

.project-panel-muted {
  margin-top: 10px;
  color: var(--seed-muted);
  font-size: 12px;
}

.project-task-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.project-task-item {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--seed-muted);
  font-size: 13px;
  text-decoration: line-through;
}

.project-task-item span {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #80dda4;
  flex-shrink: 0;
}

.project-output-list,
.project-agent-list,
.project-source-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  border: 1px solid var(--seed-card-border);
  border-radius: 12px;
  background: var(--seed-surface);
  color: var(--seed-sidebar-fg);
  padding: 12px;
  box-shadow: 0 8px 24px rgba(74, 43, 140, 0.06);
}

.project-output-item,
.project-agent-item,
.project-source-item,
.project-mcp-item {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  line-height: 1.45;
}

.project-output-item.pending-approval,
.project-source-item.pending-approval,
.project-mcp-item.pending-approval {
  position: relative;
  align-items: center;
  border: 1px solid rgba(255, 122, 26, 0.34);
  border-radius: 10px;
  padding: 10px 10px 10px 12px;
  background: rgba(255, 247, 237, 0.92);
  color: var(--seed-fg);
  font-weight: 700;
}

.project-output-item.pending-approval::before,
.project-source-item.pending-approval::before,
.project-mcp-item.pending-approval::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 999px;
  background: #ff7a1a;
}

.project-file-dot,
.project-agent-dot,
.project-mcp-dot,
.project-source-item span,
.project-awareness-row span {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: #34a853;
  flex-shrink: 0;
}

.project-file-dot.doc {
  background: var(--seed-muted);
}

.project-mcp-dot {
  background: #5e45be;
}

.project-skill-advice {
  border-radius: 6px;
  padding: 2px 7px;
  background: rgba(128, 221, 164, 0.32);
  color: #45c878;
  font-size: 11px;
  font-weight: 700;
}

.project-skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.project-skill-list span {
  border-radius: 7px;
  padding: 4px 7px;
  background: rgba(74, 43, 140, 0.08);
  color: #5c4b75;
  font-size: 12px;
}

.project-agent-dot.agent-0 {
  background: #8d5bff;
}

.project-agent-dot.agent-1 {
  background: #ff7a1a;
}

.project-agent-dot.agent-2 {
  background: #f8c537;
}

.project-agent-dot.agent-3 {
  background: #ff5d5d;
}

.project-agent-dot.agent-4 {
  background: #2b9cff;
}

.project-agent-dot.agent-5 {
  background: #1488ff;
}

.project-panel-more {
  margin-top: 10px;
  padding: 0;
  background: transparent;
  color: var(--seed-muted);
  cursor: pointer;
  font-size: 13px;
}

.project-awareness-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 12px;
  color: var(--seed-muted);
  font-size: 12px;
}

.project-awareness-row span,
.project-source-item span {
  border-radius: 50%;
  background: var(--seed-muted);
}

.icon-action {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: transparent;
  color: var(--seed-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}

.icon-action:hover {
  color: var(--seed-primary);
  background: var(--seed-sidebar-active);
}

.icon-action svg {
  width: 16px;
  height: 16px;
}

.chat-session-list {
  display: grid;
  gap: 2px;
}

.chat-session-item {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--seed-sidebar-fg);
}

.chat-session-item:hover,
.chat-session-item.active {
  background: var(--seed-sidebar-active);
}

.chat-session-open {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 2px;
  text-align: left;
  padding: 9px 8px 9px 10px;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.chat-session-more {
  width: 28px;
  height: 28px;
  margin-right: 4px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--seed-muted);
  background: transparent;
  cursor: pointer;
  opacity: 0;
}

.chat-session-item:hover .chat-session-more,
.chat-session-more:focus-visible,
.chat-session-item.menu-open .chat-session-more {
  opacity: 1;
}

.chat-session-more:hover {
  color: var(--seed-primary);
  background: var(--seed-sidebar-hover);
}

.chat-session-more svg {
  width: 16px;
  height: 16px;
}

.chat-session-title {
  min-width: 0;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-session-badge {
  display: inline-flex;
  align-items: center;
  height: 16px;
  padding: 0 5px;
  margin-right: 6px;
  border-radius: 4px;
  border: 1px solid var(--seed-card-border);
  color: var(--seed-muted);
  background: var(--seed-bg);
  font-size: 10px;
  font-weight: 700;
  vertical-align: 1px;
}

.chat-session-badge.im {
  color: #15803d;
  border-color: rgba(22, 163, 74, 0.22);
  background: rgba(22, 163, 74, 0.08);
}

.pin-mark {
  color: var(--seed-primary);
  font-size: 9px;
  margin-right: 5px;
  vertical-align: 1px;
}

.chat-session-meta {
  font-size: 11px;
  color: var(--seed-muted);
}

.empty-chat-history {
  padding: 12px 10px;
  color: var(--seed-muted);
  font-size: 12px;
}

.chat-session-menu {
  position: absolute;
  z-index: 10;
  top: 34px;
  right: 4px;
  width: 148px;
  padding: 6px;
  border-radius: 10px;
  border: 1px solid var(--seed-card-border);
  background: var(--seed-surface);
  box-shadow: 0 12px 30px rgba(30, 42, 110, 0.16);
}

.history-item-menu {
  top: 34px;
  width: 148px;
}

.chat-session-menu button {
  width: 100%;
  min-height: 34px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 9px;
  color: var(--seed-sidebar-fg);
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  text-align: left;
}

.chat-session-menu button:hover {
  background: var(--seed-sidebar-active);
}

.chat-session-menu button.danger {
  color: var(--seed-danger);
}

.chat-session-menu svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.history-item-menu {
  top: 34px;
  width: 148px;
}

.chat-main {
  flex: 1;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: color-mix(in srgb, var(--seed-bg) 72%, var(--seed-surface));
  color: var(--seed-sidebar-fg);
}

.chat-main-empty {
  justify-content: center;
  padding: clamp(28px, 7vh, 72px) 0;
  background: color-mix(in srgb, var(--seed-bg) 72%, var(--seed-surface));
  color: var(--seed-sidebar-fg);
}

.chat-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 30px clamp(18px, 8vw, 140px) 20px;
}

.chat-main-empty .chat-messages {
  flex: 0 0 auto;
  width: 100%;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 clamp(20px, 8vw, 128px) 28px;
}

.chat-empty {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-bottom: 72px;
  color: var(--seed-muted);
  text-align: center;
}

.chat-main-empty .chat-empty {
  height: auto;
  padding-bottom: 0;
}

.chat-empty-shell {
  width: min(100%, 620px);
  display: grid;
  gap: 10px;
}

.chat-main-empty .chat-empty-shell {
  width: min(100%, 760px);
  margin: 0 auto;
  gap: 0;
}

.chat-empty-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--seed-fg);
}

.chat-main-empty .chat-empty-title {
  color: var(--seed-sidebar-fg);
  font-size: 27px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0;
}

.chat-empty-text {
  max-width: 520px;
  margin: 0 auto;
  font-size: 13px;
  line-height: 1.7;
}

.chat-message {
  display: flex;
  gap: 14px;
  max-width: 820px;
  width: 100%;
  margin: 0 auto 22px;
}

.chat-message.user {
  flex-direction: row-reverse;
}

.chat-avatar {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: var(--seed-surface);
  border: 1px solid var(--seed-card-border);
  color: var(--seed-primary);
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.chat-message.user .chat-avatar {
  background: var(--seed-primary);
  color: var(--seed-surface);
  border-color: var(--seed-primary);
}

.chat-bubble {
  position: relative;
  min-width: 0;
  max-width: min(700px, 100%);
  overflow: hidden;
  padding: 2px 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  color: var(--seed-sidebar-fg);
  box-shadow: none;
}

.chat-message.user .chat-bubble {
  padding: 10px 13px;
  border-radius: 13px;
  background: var(--seed-primary);
  border: 1px solid var(--seed-primary);
  color: var(--seed-surface);
  box-shadow: 0 4px 14px rgba(74, 43, 140, 0.12);
}

.chat-message-content {
  word-break: break-word;
  overflow-wrap: anywhere;
  max-height: min(58vh, 680px);
  overflow-y: auto;
  font-size: 15px;
  line-height: 1.72;
}

.chat-message-content > *:first-child {
  margin-top: 0;
}

.chat-message-content > *:last-child {
  margin-bottom: 0;
}

.chat-message-content p {
  margin: 0 0 10px;
}

.chat-message-content h3,
.chat-message-content h4,
.chat-message-content h5,
.chat-message-content h6 {
  margin: 14px 0 8px;
  color: var(--seed-fg);
  line-height: 1.35;
}

.chat-message-content h3 {
  font-size: 18px;
}

.chat-message-content h4 {
  font-size: 16px;
}

.chat-message-content h5,
.chat-message-content h6 {
  font-size: 15px;
}

.chat-message-content ul,
.chat-message-content ol {
  margin: 8px 0 12px 22px;
  padding: 0;
}

.chat-message-content li {
  margin: 3px 0;
}

.chat-message-content blockquote {
  margin: 10px 0;
  padding: 6px 0 6px 12px;
  border-left: 3px solid var(--seed-card-border);
  color: var(--seed-muted);
}

.chat-message-content a {
  color: var(--seed-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.chat-message-content code,
.task-result pre code {
  border-radius: 5px;
  padding: 2px 5px;
  background: var(--seed-sidebar-active);
  color: var(--seed-primary);
  font: 0.92em/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

.chat-message-content pre,
.task-result pre pre {
  margin: 10px 0 12px;
  border: 1px solid var(--seed-card-border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--seed-sidebar-active) 70%, var(--seed-surface));
  overflow-x: auto;
}

.chat-message-content pre code,
.task-result pre pre code {
  display: block;
  min-width: max-content;
  padding: 12px;
  background: transparent;
  color: var(--seed-fg);
  white-space: pre;
}

.chat-code-lang {
  padding: 6px 10px;
  border-bottom: 1px solid var(--seed-card-border);
  color: var(--seed-muted);
  font: 11px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

.chat-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  margin: 10px 0 12px;
}

.chat-message-content table,
.task-result pre table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.chat-message-content th,
.chat-message-content td,
.task-result pre th,
.task-result pre td {
  border-bottom: 1px solid var(--seed-card-border);
  padding: 7px 9px;
  text-align: left;
  vertical-align: top;
}

.chat-message-content th,
.task-result pre th {
  color: var(--seed-fg);
  background: var(--seed-sidebar-active);
  font-weight: 700;
}

.chat-math.inline {
  display: inline-block;
  max-width: 100%;
  overflow-x: auto;
  vertical-align: -0.15em;
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  color: var(--seed-primary);
}

.chat-math.display {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  margin: 10px 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--seed-sidebar-active);
  color: var(--seed-primary);
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  text-align: center;
}

.chat-message-content .katex-display,
.task-result pre .katex-display {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  margin: 10px 0;
}

.chat-thinking {
  margin: 0 0 12px;
  max-width: 100%;
  border-left: 2px solid rgba(74, 43, 140, 0.22);
  padding: 2px 0 2px 12px;
  color: var(--seed-muted);
  font-size: 13px;
}

.chat-thinking summary {
  width: fit-content;
  max-width: 100%;
  cursor: pointer;
  user-select: none;
  border-radius: 6px;
  padding: 3px 0;
  background: transparent;
  color: var(--seed-primary);
  font-weight: 600;
  list-style-position: outside;
}

.chat-thinking-content {
  margin-top: 6px;
  max-height: min(34vh, 300px);
  overflow-y: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding: 2px 0 0;
  line-height: 1.65;
  color: var(--seed-muted);
}

.chat-message.user .chat-message-content {
  max-height: min(42vh, 420px);
}

.chat-message.user .chat-message-content h3,
.chat-message.user .chat-message-content h4,
.chat-message.user .chat-message-content h5,
.chat-message.user .chat-message-content h6,
.chat-message.user .chat-message-content a,
.chat-message.user .chat-message-content code,
.chat-message.user .chat-message-content .chat-math {
  color: var(--seed-surface);
}

.chat-message.user .chat-message-content code,
.chat-message.user .chat-message-content pre,
.chat-message.user .chat-message-content .chat-math.display {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.2);
}

.chat-message.user .chat-message-content blockquote {
  border-left-color: rgba(255, 255, 255, 0.28);
  color: rgba(255, 255, 255, 0.82);
}

.message-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.message-attachments span {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: 6px;
  padding: 3px 7px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 11px;
}

.chat-composer {
  padding: 12px clamp(18px, 8vw, 140px) 24px;
}

.chat-main-empty .chat-composer {
  flex: 0 0 auto;
  width: 100%;
  padding: 0 clamp(20px, 8vw, 128px);
}

.chat-attachment-list {
  max-width: 820px;
  margin: 0 auto 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chat-main-empty .chat-attachment-list {
  max-width: 760px;
}

.chat-attachment-chip {
  max-width: 240px;
  border-radius: 7px;
  padding: 5px 9px;
  background: var(--seed-skill-tag-bg);
  color: var(--seed-primary);
  cursor: pointer;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-mode-shell {
  position: relative;
  z-index: 50;
  max-width: 820px;
  margin: 0 auto 8px;
}

.chat-composer-panel {
  max-width: 820px;
  min-height: 108px;
  margin: 0 auto;
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--seed-card-border);
  border-radius: 18px;
  background: var(--seed-surface);
  box-shadow: 0 8px 24px rgba(74, 43, 140, 0.08);
  overflow: visible;
}

.chat-mode-row {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

.chat-mode-row-outside {
  padding: 0;
}

.chat-mode-button {
  min-width: 0;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: 999px;
  padding: 0 10px;
  background: transparent;
  color: var(--seed-muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.chat-mode-button:hover,
.chat-mode-button.active {
  background: var(--seed-sidebar-hover);
  color: var(--seed-primary);
}

.chat-mode-project {
  justify-content: flex-start;
}

.chat-mode-button svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.chat-mode-caret {
  width: 12px;
  height: 12px;
}

.project-work-menu {
  position: absolute;
  z-index: 60;
  top: calc(100% + 4px);
  bottom: auto;
  left: 0;
  width: min(320px, calc(100vw - 48px));
  max-height: var(--project-work-menu-max-height, 360px);
  padding: 8px;
  border: 1px solid var(--seed-card-border);
  border-radius: 10px;
  background: var(--seed-surface);
  box-shadow: 0 16px 40px rgba(29, 22, 58, 0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.project-work-menu[data-placement="top"] {
  top: auto;
  bottom: calc(100% + 4px);
}

.project-work-menu-list {
  flex: 1 1 auto;
  min-height: 0;
  max-height: var(--project-work-menu-list-max-height, 236px);
  overflow: auto;
  padding: 0 0 6px;
  overscroll-behavior: contain;
}

.project-work-menu-item,
.project-work-subitem {
  width: 100%;
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  padding: 7px 8px;
  background: transparent;
  color: var(--seed-sidebar-fg);
  cursor: pointer;
  text-align: left;
  font-size: 13px;
}

.project-work-menu-item:hover,
.project-work-menu-item.active,
.project-work-subitem:hover {
  background: var(--seed-sidebar-hover);
}

.project-work-folder-icon {
  width: 16px;
  height: 12px;
  position: relative;
  flex-shrink: 0;
  border: 1.5px solid currentColor;
  border-radius: 3px;
  color: var(--seed-primary);
}

.project-work-folder-icon::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 1px;
  width: 7px;
  height: 5px;
  border: 1.5px solid currentColor;
  border-bottom: 0;
  border-radius: 3px 3px 0 0;
  background: var(--seed-surface);
}

.project-work-folder-icon.add {
  color: var(--seed-primary);
}

.project-work-folder-icon.muted {
  color: var(--seed-muted);
}

.project-work-item-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.project-work-item-title,
.project-work-item-desc {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-work-item-title {
  font-weight: 700;
}

.project-work-item-desc {
  color: var(--seed-muted);
  font-size: 11px;
  font-weight: 500;
}

.project-work-check,
.project-work-arrow {
  margin-left: auto;
  color: var(--seed-primary);
  font-weight: 800;
}

.project-work-delete {
  width: 24px;
  height: 24px;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  color: var(--seed-muted);
  font-size: 18px;
  line-height: 1;
  opacity: 0;
}

.project-work-menu-item:hover .project-work-delete,
.project-work-delete:focus {
  opacity: 1;
}

.project-work-delete:hover,
.project-work-delete:focus {
  background: rgba(214, 61, 61, 0.1);
  color: #b42318;
  outline: 0;
}

.project-work-delete + .project-work-check {
  margin-left: 0;
}

.project-work-menu-divider {
  height: 1px;
  margin: 4px 0;
  background: var(--seed-card-border);
}

.project-work-empty {
  padding: 14px 8px;
  color: var(--seed-muted);
  font-size: 12px;
}

.file-action input {
  display: none;
}

.project-source-menu {
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  z-index: 70;
  width: min(320px, calc(100vw - 48px));
  max-height: min(42vh, 260px);
  padding: 8px;
  border: 1px solid var(--seed-card-border);
  border-radius: 10px;
  background: var(--seed-surface);
  box-shadow: 0 16px 40px rgba(29, 22, 58, 0.18);
  overflow: auto;
}

.chat-attachment-list:empty {
  display: none;
}

.chat-attachment-list[hidden],
.project-work-menu[hidden],
.project-source-menu[hidden],
.project-file-mention-menu[hidden] {
  display: none !important;
}

.project-source-menu-item {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 8px;
  padding: 8px;
  background: transparent;
  color: var(--seed-sidebar-fg);
  cursor: pointer;
  text-align: left;
}

.project-source-menu-item:hover {
  background: var(--seed-sidebar-hover);
}

.project-source-menu-item span:last-child {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.project-source-menu-item strong,
.project-source-menu-item small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-source-menu-item strong {
  font-size: 13px;
}

.project-source-menu-item small {
  color: var(--seed-muted);
  font-size: 11px;
  font-weight: 500;
}

.project-file-mention-menu {
  position: fixed;
  z-index: 210;
  max-height: min(52vh, 360px);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--seed-card-border);
  border-radius: 10px;
  padding: 8px;
  background: var(--seed-surface);
  box-shadow: 0 16px 40px rgba(29, 22, 58, 0.18);
  overflow: hidden;
}

.project-file-mention-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 6px 8px;
  color: var(--seed-muted);
  font-size: 12px;
}

.project-file-mention-header strong {
  color: var(--seed-fg);
}

.project-file-mention-list {
  min-height: 0;
  overflow: auto;
  display: grid;
  gap: 3px;
  padding-bottom: 6px;
  overscroll-behavior: contain;
}

.project-file-mention-item {
  width: 100%;
  min-height: 42px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  padding: 6px 8px;
  background: transparent;
  color: var(--seed-sidebar-fg);
  cursor: pointer;
  text-align: left;
}

.project-file-mention-item:hover,
.project-file-mention-item.selected {
  background: var(--seed-sidebar-hover);
}

.project-file-mention-check {
  color: var(--seed-primary);
  font-weight: 800;
}

.project-file-mention-main {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.project-file-mention-main strong,
.project-file-mention-main small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-file-mention-main small,
.project-file-mention-size,
.project-file-mention-empty {
  color: var(--seed-muted);
  font-size: 11px;
}

.project-file-mention-empty {
  padding: 14px 8px;
}

.project-file-mention-insert {
  width: 100%;
  min-height: 32px;
  border-radius: 8px;
  background: var(--seed-primary);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
}

.project-file-mention-insert:disabled {
  opacity: 0.45;
  cursor: default;
}

.chat-main-empty .chat-mode-shell {
  max-width: 760px;
}

.chat-main-empty .chat-composer-panel {
  max-width: 760px;
  min-height: 142px;
  border-color: var(--seed-card-border);
  background: var(--seed-surface);
  color: var(--seed-sidebar-fg);
  box-shadow: 0 16px 38px rgba(74, 43, 140, 0.1);
}

.chat-composer-panel textarea {
  width: 100%;
  min-height: 58px;
  max-height: 160px;
  flex: 1;
  resize: none;
  border: 0;
  outline: 0;
  box-shadow: none;
  background: transparent;
  color: var(--seed-sidebar-fg);
  padding: 17px 18px 8px;
}

.chat-composer-panel textarea:focus {
  border-color: transparent;
  box-shadow: none;
}

.chat-composer-panel textarea::placeholder {
  color: var(--seed-muted);
}

.chat-main-empty .chat-composer-panel textarea {
  min-height: 78px;
  color: var(--seed-sidebar-fg);
}

.chat-main-empty .chat-composer-panel textarea::placeholder {
  color: var(--seed-muted);
}

.chat-composer-toolbar {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px 10px;
}

.chat-tool-group {
  position: relative;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.chat-tool-group-right {
  margin-left: auto;
}

.chat-icon-button,
.chat-model-pill,
.chat-access-chip,
.chat-send-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.chat-icon-button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--seed-muted);
  flex-shrink: 0;
}

.chat-icon-button:hover,
.chat-model-pill:hover {
  background: rgba(74, 43, 140, 0.06);
  color: var(--seed-primary);
}

.chat-main-empty .chat-icon-button,
.chat-main-empty .chat-model-pill {
  color: var(--seed-muted);
}

.chat-main-empty .chat-icon-button:hover,
.chat-main-empty .chat-model-pill:hover {
  background: var(--seed-sidebar-hover);
  color: var(--seed-primary);
}

.chat-icon-button svg,
.chat-send-icon svg {
  width: 18px;
  height: 18px;
}

.chat-access-chip {
  min-height: 32px;
  gap: 6px;
  padding: 0 9px;
  border-radius: 999px;
  color: #d56f18;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.chat-access-chip::before {
  content: "";
  width: 12px;
  height: 12px;
  border: 1.7px solid currentColor;
  border-radius: 5px 5px 6px 6px;
}

.chat-access-chip::after {
  content: "";
  width: 5px;
  height: 5px;
  margin-top: -3px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
}

.chat-access-chip:hover {
  background: rgba(213, 111, 24, 0.08);
}

.chat-main-empty .chat-access-chip {
  color: #ff7a1a;
}

.chat-model-pill {
  max-width: 170px;
  min-height: 32px;
  gap: 5px;
  padding: 0 6px 0 8px;
  border-radius: 999px;
  color: var(--seed-muted);
  font-size: 12px;
  white-space: nowrap;
}

.chat-model-pill span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-model-pill svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.chat-send-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--seed-primary);
  color: var(--seed-surface);
  flex-shrink: 0;
}

.chat-send-icon:hover {
  background: var(--seed-hover);
}

.chat-send-icon:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.chat-main-empty .chat-send-icon {
  background: var(--seed-primary);
  color: var(--seed-surface);
  box-shadow: 0 8px 18px rgba(74, 43, 140, 0.14);
}

.chat-main-empty .chat-send-icon:hover {
  background: var(--seed-hover);
}

.slash-skill-menu {
  position: fixed;
  z-index: 70;
  max-height: min(46vh, 340px);
  overflow-y: auto;
  padding: 7px;
  border: 1px solid var(--seed-card-border);
  border-radius: 10px;
  background: var(--seed-surface);
  box-shadow: 0 16px 44px rgba(31, 24, 62, 0.18);
}

.slash-skill-menu[hidden] {
  display: none;
}

.slash-skill-category {
  padding: 6px 8px 4px;
  color: var(--seed-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.slash-skill-item {
  width: 100%;
  min-height: 42px;
  display: grid;
  grid-template-columns: minmax(92px, max-content) 1fr;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border-radius: 8px;
  color: var(--seed-sidebar-fg);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.slash-skill-item:hover,
.slash-skill-item.selected {
  background: var(--seed-sidebar-active);
}

.slash-skill-token {
  color: var(--seed-primary);
  font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-weight: 700;
}

.slash-skill-help {
  min-width: 0;
  overflow: hidden;
  color: var(--seed-muted);
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.placeholder-content {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--seed-muted);
  text-align: center;
  padding: 24px;
}

.placeholder-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--seed-skill-tag-bg);
  color: var(--seed-primary);
  font-size: 28px;
  margin-bottom: 12px;
}

.placeholder-content h2 {
  margin: 0 0 6px;
  color: var(--seed-fg);
  font-size: 18px;
}

.placeholder-content p {
  margin: 0;
}

.im-page {
  width: min(920px, 100%);
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: var(--seed-fg);
}

.im-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.im-header-row h2 {
  margin: 4px 0 6px;
  color: var(--seed-fg);
  font-size: 22px;
  line-height: 1.25;
}

.im-header-row p {
  max-width: 560px;
  margin: 0;
  color: var(--seed-muted);
  font-size: 13px;
  line-height: 1.6;
}

.im-eyebrow {
  color: var(--seed-primary);
  font-size: 12px;
  font-weight: 800;
}

.im-status {
  flex: 0 0 auto;
  border: 1px solid var(--seed-card-border);
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--seed-muted);
  background: var(--seed-surface);
  font-size: 12px;
  font-weight: 700;
}

.im-status.enabled {
  border-color: rgba(22, 163, 74, 0.22);
  color: #15803d;
  background: rgba(22, 163, 74, 0.08);
}

.im-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--seed-card-border);
  border-radius: 8px;
  padding: 16px;
  background: var(--seed-surface);
  box-shadow: var(--seed-card-shadow);
}

.im-qr-box {
  flex: 0 0 auto;
  width: 116px;
  height: 116px;
  display: grid;
  place-items: center;
  border: 1px solid var(--seed-card-border);
  border-radius: 8px;
  background: #fff;
}

.im-qr-image {
  width: 104px;
  height: 104px;
  object-fit: contain;
  display: block;
}

.im-qr-placeholder {
  width: 104px;
  height: 104px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--seed-card-border);
  border-radius: 6px;
  color: var(--seed-muted);
  background: var(--seed-bg);
  font-size: 13px;
  font-weight: 800;
}

.im-qr-placeholder.success {
  color: #15803d;
  background: rgba(22, 163, 74, 0.08);
  border-color: rgba(22, 163, 74, 0.22);
}

.im-qr-placeholder.error {
  color: var(--seed-danger);
  background: rgba(192, 57, 43, 0.08);
  border-color: rgba(192, 57, 43, 0.22);
}

.im-panel-main {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.im-panel-title {
  color: var(--seed-muted);
  font-size: 12px;
  font-weight: 700;
}

.im-help {
  color: var(--seed-muted);
  font-size: 13px;
  line-height: 1.5;
}

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

.agent-runtime-page {
  width: min(960px, 100%);
  margin: 0 auto;
  padding: 24px;
  color: var(--seed-fg);
}

.agent-runtime-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.agent-runtime-header h2 {
  margin: 4px 0 0;
  color: var(--seed-fg);
  font-size: 22px;
  line-height: 1.25;
}

.agent-runtime-eyebrow {
  color: var(--seed-primary);
  font-size: 12px;
  font-weight: 800;
}

.agent-runtime-empty {
  min-height: 320px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  border: 1px solid var(--seed-card-border);
  border-radius: 8px;
  padding: 32px 24px;
  background: var(--seed-surface);
  text-align: center;
}

.agent-runtime-empty-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--seed-skill-tag-bg);
  color: var(--seed-primary);
}

.agent-runtime-empty-icon svg {
  width: 24px;
  height: 24px;
}

.agent-runtime-empty h3 {
  margin: 4px 0 0;
  color: var(--seed-fg);
  font-size: 18px;
}

.agent-runtime-empty p {
  max-width: 560px;
  margin: 0;
  color: var(--seed-muted);
  font-size: 13px;
  line-height: 1.6;
}

.agent-runtime-notice {
  border: 1px solid rgba(243, 156, 18, 0.26);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(243, 156, 18, 0.08);
  color: #9a5b00 !important;
  font-weight: 700;
}

.agent-runtime-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}

.agent-runtime-patch-panel {
  margin-bottom: 14px;
  border: 1px solid var(--seed-card-border);
  border-radius: 8px;
  background: var(--seed-surface);
  overflow: hidden;
}

.agent-runtime-patch-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
}

.agent-runtime-patch-grid label {
  display: grid;
  gap: 6px;
  color: var(--seed-muted);
  font-size: 12px;
  font-weight: 800;
}

.agent-runtime-patch-grid input,
.agent-runtime-patch-grid textarea {
  width: 100%;
  border: 1px solid var(--seed-card-border);
  border-radius: 7px;
  padding: 8px 10px;
  background: #fff;
  color: var(--seed-fg);
  font: inherit;
}

.agent-runtime-patch-content {
  grid-column: 1 / -1;
}

.agent-runtime-patch-grid [data-agent-runtime-patch-apply-submit] {
  align-self: end;
  justify-self: start;
}

.agent-runtime-patch-result {
  margin: 0 14px 14px;
  border-radius: 7px;
  padding: 8px 10px;
  background: rgba(22, 163, 74, 0.08);
  color: #15803d;
  font-size: 12px;
  font-weight: 800;
}

.agent-runtime-panel {
  min-width: 0;
  border: 1px solid var(--seed-card-border);
  border-radius: 8px;
  background: var(--seed-surface);
  overflow: hidden;
}

.agent-runtime-panel-title {
  padding: 12px 14px;
  border-bottom: 1px solid var(--seed-card-border);
  color: var(--seed-fg);
  font-size: 13px;
  font-weight: 800;
}

.agent-runtime-list {
  display: grid;
  gap: 0;
}

.agent-runtime-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--seed-sidebar-border);
  width: 100%;
  background: transparent;
  color: inherit;
  text-align: left;
}

.agent-runtime-row:last-child {
  border-bottom: 0;
}

.agent-runtime-run-row {
  cursor: pointer;
}

.agent-runtime-run-row:hover,
.agent-runtime-run-row.active {
  background: var(--seed-sidebar-active);
}

.agent-runtime-status {
  align-self: start;
  width: 96px;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 5px 8px;
  background: var(--seed-skill-tag-bg);
  color: var(--seed-primary);
  font-size: 11px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.agent-runtime-status.approved {
  background: rgba(22, 163, 74, 0.08);
  color: #15803d;
}

.agent-runtime-status.rejected,
.agent-runtime-status.failed {
  background: rgba(192, 57, 43, 0.08);
  color: var(--seed-danger);
}

.agent-runtime-row-main {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.agent-runtime-row-title {
  color: var(--seed-fg);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.agent-runtime-row-meta {
  color: var(--seed-muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.agent-runtime-row-actions {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.agent-runtime-decision {
  min-height: 30px;
  border-radius: 7px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.agent-runtime-decision.approve {
  background: var(--seed-primary);
  color: #fff;
}

.agent-runtime-decision.reject {
  border: 1px solid var(--seed-card-border);
  background: var(--seed-surface);
  color: var(--seed-danger);
}

.agent-runtime-decision.simulate {
  border: 1px solid var(--seed-card-border);
  background: #f8fafc;
  color: var(--seed-text);
}

.agent-runtime-events-panel {
  grid-column: 1 / -1;
}

.agent-runtime-event-row {
  grid-template-columns: 180px minmax(0, 1fr);
}

.agent-runtime-event-payload {
  max-height: 180px;
  overflow: auto;
  margin: 4px 0 0;
  border: 1px solid var(--seed-card-border);
  border-radius: 8px;
  padding: 10px;
  background: var(--seed-bg);
  color: var(--seed-fg);
  font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  white-space: pre-wrap;
}

.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--seed-bg);
  padding: 24px;
}

.login-overlay[hidden] {
  display: none;
}

.login-card {
  width: min(360px, 100%);
  background: var(--seed-surface);
  border: 1px solid var(--seed-card-border);
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 16px 40px rgba(74, 43, 140, 0.1);
}

.login-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  display: block;
  margin-bottom: 12px;
}

.login-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--seed-fg);
}

.login-subtitle {
  color: var(--seed-muted);
  font-size: 13px;
  margin-bottom: 22px;
}

.login-field {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
  color: var(--seed-sidebar-fg);
  font-size: 12px;
  font-weight: 600;
}

.login-field input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--seed-card-border);
  border-radius: 8px;
  outline: none;
  padding: 0 11px;
  color: var(--seed-fg);
}

.login-field input:focus {
  border-color: var(--seed-primary);
  box-shadow: 0 0 0 3px var(--seed-focus-ring);
}

.login-submit {
  width: 100%;
  min-height: 38px;
  margin-top: 4px;
}

.login-error {
  min-height: 18px;
  margin-top: 10px;
  color: var(--seed-danger);
  font-size: 12px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  max-width: 360px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--seed-primary);
  color: var(--seed-surface);
  box-shadow: 0 8px 24px rgba(74, 43, 140, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: all 0.2s;
  font-size: 13px;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.global-search-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 8px;
  background: rgba(74, 43, 140, 0.14);
}

.global-search-overlay[hidden] {
  display: none;
}

.global-search-dialog {
  width: min(520px, calc(100vw - 16px));
  max-height: min(78vh, 640px);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--seed-card-border);
  border-radius: 14px;
  background: var(--seed-surface);
  box-shadow: 0 24px 70px rgba(31, 24, 62, 0.24);
  overflow: hidden;
}

.global-search-input-row {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border-bottom: 1px solid var(--seed-sidebar-border);
  color: var(--seed-muted);
}

.global-search-input-row svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.global-search-input-row input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--seed-fg);
  font-size: 14px;
}

.global-search-input-row input::placeholder {
  color: var(--seed-muted);
}

.global-search-section-title {
  padding: 12px 14px 6px;
  color: var(--seed-muted);
  font-size: 12px;
  font-weight: 700;
}

.global-search-results {
  min-height: 120px;
  max-height: calc(78vh - 92px);
  overflow-y: auto;
  padding: 0 6px 8px;
}

.global-search-result {
  width: 100%;
  min-height: 36px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  padding: 7px 8px;
  background: transparent;
  color: var(--seed-sidebar-fg);
  cursor: pointer;
  text-align: left;
}

.global-search-result:hover,
.global-search-result:focus-visible {
  background: var(--seed-sidebar-active);
  outline: none;
}

.global-search-spinner {
  width: 10px;
  height: 10px;
  border: 2px solid var(--seed-card-border);
  border-top-color: var(--seed-primary);
  border-radius: 50%;
}

.global-search-main {
  min-width: 0;
}

.global-search-title {
  display: block;
  overflow: hidden;
  color: var(--seed-sidebar-fg);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-search-scope {
  max-width: 120px;
  overflow: hidden;
  color: var(--seed-muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-search-shortcut {
  min-width: 30px;
  border-radius: 999px;
  padding: 2px 6px;
  background: var(--seed-skill-tag-bg);
  color: var(--seed-muted);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.global-search-empty {
  padding: 28px 14px;
  color: var(--seed-muted);
  font-size: 13px;
  text-align: center;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(74, 43, 140, 0.16);
}

.modal-overlay[hidden] {
  display: none;
}

.modal-card {
  width: min(420px, 100%);
  border: 1px solid var(--seed-card-border);
  border-radius: 12px;
  background: var(--seed-surface);
  box-shadow: 0 22px 70px rgba(31, 24, 62, 0.24);
  padding: 18px;
}

.modal-title {
  color: var(--seed-fg);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
}

.modal-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.modal-title-row .modal-title {
  margin-bottom: 0;
}

.project-workspace-dialog-card {
  width: min(520px, calc(100vw - 40px));
}

.project-workspace-form {
  display: grid;
  gap: 14px;
}

.project-workspace-form label {
  display: grid;
  gap: 6px;
  color: var(--seed-sidebar-fg);
  font-size: 12px;
  font-weight: 700;
}

.project-workspace-form input[type="text"] {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--seed-card-border);
  border-radius: 8px;
  padding: 0 11px;
  outline: 0;
  color: var(--seed-fg);
}

.project-workspace-form input[readonly] {
  background: var(--seed-bg);
  color: var(--seed-muted);
}

.project-workspace-consent {
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  border: 1px solid var(--seed-card-border);
  border-radius: 8px;
  padding: 10px;
  background: var(--seed-bg);
  color: var(--seed-muted);
  line-height: 1.6;
}

.project-workspace-consent input {
  margin-top: 3px;
}

.project-workspace-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.credit-ledger-card {
  width: min(620px, 100%);
}

.credit-ledger-summary {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 14px;
  border: 1px solid var(--seed-card-border);
  border-radius: 10px;
  padding: 12px;
  color: var(--seed-muted);
  font-size: 12px;
}

.credit-ledger-summary strong {
  display: block;
  color: var(--seed-fg);
  font-size: 18px;
  margin-top: 4px;
}

.credit-ledger-list {
  max-height: min(420px, 60vh);
  overflow: auto;
  display: grid;
  gap: 8px;
}

.credit-ledger-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--seed-card-border);
  border-radius: 10px;
  padding: 10px;
  font-size: 12px;
}

.credit-ledger-amount {
  font-weight: 700;
  color: var(--seed-success);
}

.credit-ledger-amount.debit {
  color: var(--seed-danger);
}

.credit-ledger-main {
  min-width: 0;
}

.credit-ledger-desc,
.credit-ledger-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.credit-ledger-desc {
  color: var(--seed-fg);
  font-weight: 600;
}

.credit-ledger-meta,
.credit-ledger-time {
  color: var(--seed-muted);
}

.account-settings-card {
  width: min(720px, 100%);
  max-height: min(760px, 92vh);
  overflow: hidden;
}

.settings-subtitle {
  color: var(--seed-muted);
  font-size: 12px;
  margin-top: 2px;
}

.settings-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px 120px;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--seed-card-border);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 12px;
}

.settings-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.settings-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--seed-surface);
  background: linear-gradient(135deg, var(--seed-primary), var(--seed-accent));
  font-size: 12px;
  font-weight: 700;
}

.settings-profile-main {
  min-width: 0;
}

.settings-profile-name,
.settings-profile-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-profile-name {
  color: var(--seed-fg);
  font-weight: 700;
}

.settings-profile-meta {
  color: var(--seed-muted);
  font-size: 12px;
}

.settings-kpi {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.settings-kpi span {
  color: var(--seed-muted);
  font-size: 11px;
}

.settings-kpi strong {
  color: var(--seed-fg);
  font-size: 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  overflow-x: auto;
}

.settings-tab {
  height: 32px;
  padding: 0 12px;
  border-radius: 7px;
  color: var(--seed-muted);
  background: transparent;
  border: 1px solid var(--seed-card-border);
  cursor: pointer;
  white-space: nowrap;
}

.settings-tab:hover {
  background: var(--seed-sidebar-hover);
}

.settings-tab.active {
  color: var(--seed-primary);
  background: var(--seed-sidebar-active);
  border-color: var(--seed-lavender);
  font-weight: 700;
}

.settings-body {
  max-height: min(440px, 52vh);
  overflow: auto;
  display: grid;
  gap: 12px;
}

.settings-section-grid {
  display: grid;
  gap: 8px;
}

.settings-info-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid var(--seed-card-border);
  border-radius: 9px;
  padding: 10px 12px;
  font-size: 12px;
}

.settings-info-row span {
  color: var(--seed-muted);
}

.settings-info-row strong {
  color: var(--seed-fg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-select-row {
  cursor: default;
}

.settings-model-select {
  min-width: 0;
  width: 100%;
  height: 32px;
  border: 1px solid var(--seed-card-border);
  border-radius: 7px;
  background: var(--seed-bg);
  color: var(--seed-fg);
  padding: 0 8px;
  font-size: 12px;
  font-weight: 700;
}

.settings-balance-card {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--seed-card-border);
  border-radius: 10px;
  padding: 14px;
  color: var(--seed-muted);
  font-size: 12px;
  background: var(--seed-highlight-bg);
}

.settings-balance-card span {
  display: block;
}

.settings-balance-card strong {
  display: block;
  margin-top: 4px;
  color: var(--seed-fg);
  font-size: 24px;
}

.settings-list-title {
  color: var(--seed-fg);
  font-size: 13px;
  font-weight: 700;
  margin-top: 2px;
}

.settings-record-list {
  display: grid;
  gap: 8px;
}

.settings-record {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--seed-card-border);
  border-radius: 10px;
  padding: 10px;
  font-size: 12px;
}

.settings-record-amount,
.settings-record-status {
  font-weight: 800;
  color: var(--seed-success);
}

.settings-record-amount.debit,
.settings-record-status.error {
  color: var(--seed-danger);
}

.settings-record-status.success {
  color: var(--seed-success);
}

.settings-record-main {
  min-width: 0;
}

.settings-record-title,
.settings-record-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-record-title {
  color: var(--seed-fg);
  font-weight: 700;
}

.settings-record-meta,
.settings-record-time {
  color: var(--seed-muted);
}

.settings-logout {
  width: fit-content;
}

.modal-input {
  width: 100%;
  height: 40px;
  border: 1px solid var(--seed-card-border);
  border-radius: 8px;
  padding: 0 11px;
  color: var(--seed-fg);
  background: var(--seed-bg);
  outline: none;
}

.modal-input:focus {
  border-color: var(--seed-primary);
  box-shadow: 0 0 0 3px rgba(74, 43, 140, 0.08);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

.empty-state,
.error-state {
  background: var(--seed-surface);
  border: 1px solid var(--seed-card-border);
  border-radius: 12px;
  padding: 20px;
  color: var(--seed-muted);
}

::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--seed-lavender);
  border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--seed-accent);
}

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

  .task-content {
    grid-template-columns: 280px minmax(0, 1fr);
  }

  .task-result {
    grid-column: 1 / -1;
    min-height: 360px;
  }
}

@media (max-width: 820px) {
  body {
    overflow: auto;
  }

  .app-container {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100vh;
  }

  .sidebar {
    min-height: auto;
  }

  .sidebar-list,
  .sidebar-footer {
    display: none;
  }

  .main-header {
    align-items: stretch;
    flex-direction: column;
    padding: 14px 18px;
  }

  .header-search {
    width: 100%;
  }

  .market-content,
  .task-content {
    padding: 18px;
  }

  .market-stats,
  .task-content {
    grid-template-columns: 1fr;
    display: grid;
  }

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

  .settings-info-row,
  .settings-record {
    grid-template-columns: 1fr;
  }

  .im-page {
    padding: 18px;
  }

  .im-header-row,
  .im-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .im-meta-grid {
    grid-template-columns: 1fr;
  }

  .agent-runtime-page {
    padding: 18px;
  }

  .agent-runtime-header {
    align-items: stretch;
    flex-direction: column;
  }

  .agent-runtime-grid {
    grid-template-columns: 1fr;
  }

  .agent-runtime-row {
    grid-template-columns: 1fr;
  }

  .agent-runtime-row-actions {
    justify-content: flex-start;
  }

  .chat-messages,
  .chat-composer,
  .chat-main-empty .chat-messages,
  .chat-main-empty .chat-composer {
    padding-left: 14px;
    padding-right: 14px;
  }

  .chat-main-empty .chat-empty-title {
    font-size: 22px;
  }

  .chat-composer-toolbar {
    gap: 8px;
  }

  .chat-model-pill {
    max-width: 112px;
  }

  .settings-balance-card {
    align-items: flex-start;
    flex-direction: column;
  }

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