/* === Reset & Base === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --text-primary: #e0e0e0;
  --text-secondary: #888;
  --accent: #00ff88;
  --warning: #ff6b35;
  --border: rgba(0, 255, 136, 0.15);
  --panel-bg: rgba(10, 10, 10, 0.85);
  --font-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0a0a0a;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

/* === WebGL Canvas === */
#bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
}

/* === HUD Overlay === */
#hud {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
}

/* === Panel Navigation === */
#panel-nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  height: 40px;
  padding: 0 12px;
  background: var(--panel-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  gap: 4px;
}

.nav-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 8px 16px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, text-shadow 0.2s;
}

.nav-btn:hover {
  color: var(--text-primary);
  text-shadow: 0 0 8px rgba(0, 255, 136, 0.3);
}

.nav-btn.active {
  color: var(--text-primary);
  border-bottom-color: var(--accent);
}

/* === Panels Container === */
#panels {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.panel {
  display: none;
  flex-direction: column;
  height: 100%;
  padding: 16px;
  overflow-y: auto;
  background: var(--panel-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.panel.active {
  display: flex;
}

.panel h2 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--accent);
}

.panel p {
  color: var(--text-secondary);
  line-height: 1.5;
}

/* === Chat Panel === */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
  display: flex;
  flex-direction: column;
}

.chat-input-area {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--border);
}

#chat-input {
  flex: 1;
  background: rgba(20, 20, 20, 0.9);
  border: 1px solid rgba(0, 255, 136, 0.2);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 13px;
  resize: none;
  padding: 10px 14px;
  border-radius: 6px;
  max-height: 150px;
  overflow-y: auto;
  outline: none;
  transition: border-color 0.2s;
  line-height: 1.5;
}

#chat-input:focus {
  border-color: var(--accent);
}

#chat-send {
  padding: 10px 18px;
  background: rgba(0, 255, 136, 0.1);
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  align-self: flex-end;
}

#chat-send:hover {
  background: rgba(0, 255, 136, 0.25);
}

#chat-send:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.message {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.message-role {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
  color: var(--text-secondary);
}

.message.user .message-role {
  color: var(--accent);
}

.message-content {
  line-height: 1.6;
  word-break: break-word;
}

.message-content p { margin: 6px 0; }
.message-content h1, .message-content h2,
.message-content h3, .message-content h4 {
  color: var(--accent);
  margin: 10px 0 4px;
}

.message-content pre {
  background: rgba(0, 0, 0, 0.4);
  padding: 12px;
  border-radius: 6px;
  overflow-x: auto;
  margin: 8px 0;
  font-size: 0.9em;
}

.message-content code {
  background: rgba(0, 255, 136, 0.1);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.9em;
}

.message-content pre code {
  background: none;
  padding: 0;
  border-radius: 0;
}

.message-content strong { color: var(--accent); }

.message-content ul {
  padding-left: 20px;
  margin: 6px 0;
}

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

.message-content a {
  color: var(--accent);
  text-decoration: underline;
}

/* Syntax highlighting */
.syn-kw { color: var(--accent); }
.syn-str { color: #e6db74; }
.syn-comment { color: #888; font-style: italic; }
.syn-num { color: #ae81ff; }

/* Dispatch confirm */
.dispatch-confirm {
  margin: 10px 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.3);
}

.dispatch-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.dispatch-accept, .dispatch-decline {
  padding: 6px 16px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  cursor: pointer;
  border: 1px solid;
  transition: background 0.2s;
}

.dispatch-accept {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(0, 255, 136, 0.1);
}

.dispatch-accept:hover {
  background: rgba(0, 255, 136, 0.25);
}

.dispatch-decline {
  border-color: var(--text-secondary);
  color: var(--text-secondary);
  background: transparent;
}

.dispatch-decline:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* === Scrollbar === */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 255, 136, 0.2);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 255, 136, 0.35);
}

/* === Utility Classes === */
.mono  { font-family: var(--font-mono); }
.accent { color: var(--accent); }
.muted  { color: var(--text-secondary); }
.glow   { text-shadow: 0 0 10px var(--accent), 0 0 20px rgba(0, 255, 136, 0.3); }

/* === Engram Explorer === */
.engram-toolbar { display: flex; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--border); align-items: center; }
.engram-search-input { flex: 1; background: rgba(20,20,20,0.9); border: 1px solid var(--border); color: var(--text-primary); font-family: var(--font-mono); padding: 8px 12px; border-radius: 4px; font-size: 0.9rem; }
.engram-search-input:focus { outline: none; border-color: var(--accent); }
.engram-filter-select { background: rgba(20,20,20,0.9); border: 1px solid var(--border); color: var(--text-primary); padding: 8px; border-radius: 4px; font-family: var(--font-mono); font-size: 0.85rem; }
.engram-stats { padding: 8px 16px; display: flex; gap: 16px; font-size: 0.8rem; color: var(--text-secondary); border-bottom: 1px solid rgba(255,255,255,0.05); }
.engram-content { display: flex; flex: 1; overflow: hidden; }
.engram-list { width: 40%; border-right: 1px solid var(--border); overflow-y: auto; }
.engram-detail { flex: 1; overflow-y: auto; padding: 16px; }

.node-item { padding: 10px 16px; border-bottom: 1px solid rgba(255,255,255,0.03); cursor: pointer; transition: background 0.15s; }
.node-item:hover { background: rgba(0,255,136,0.04); }
.node-item.active { background: rgba(0,255,136,0.08); border-left: 2px solid var(--accent); }
.node-header { display: flex; gap: 8px; align-items: center; margin-bottom: 4px; }
.node-kind { font-size: 0.7rem; padding: 2px 6px; border-radius: 3px; text-transform: uppercase; letter-spacing: 0.5px; }
.node-preview { font-size: 0.85rem; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.node-date { font-size: 0.7rem; margin-left: auto; }
.node-pin { font-size: 0.65rem; color: var(--accent); border: 1px solid var(--accent); padding: 1px 4px; border-radius: 2px; }

/* Kind-specific colors */
.kind-directive { background: rgba(0,136,255,0.2); color: #0088ff; }
.kind-decision { background: rgba(0,255,136,0.2); color: #00ff88; }
.kind-warning { background: rgba(255,107,53,0.2); color: #ff6b35; }
.kind-procedure { background: rgba(136,136,136,0.2); color: #aaa; }
.kind-insight { background: rgba(174,129,255,0.2); color: #ae81ff; }
.kind-record { background: rgba(255,255,255,0.1); color: #ccc; }
.kind-challenge { background: rgba(255,53,53,0.2); color: #ff3535; }
.kind-question { background: rgba(255,213,53,0.2); color: #ffd535; }
.kind-pack { background: rgba(0,200,200,0.2); color: #00c8c8; }

.detail-header { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.detail-title { margin: 0 0 12px 0; font-size: 1.1rem; }
.detail-content { margin-bottom: 16px; line-height: 1.6; }
.detail-section { margin-bottom: 16px; }
.detail-section h4 { font-size: 0.8rem; text-transform: uppercase; color: var(--text-secondary); margin: 0 0 8px 0; }
.detail-meta { font-size: 0.85rem; }
.concept-tag { display: inline-block; background: rgba(0,255,136,0.08); border: 1px solid rgba(0,255,136,0.2); padding: 2px 8px; border-radius: 12px; font-size: 0.75rem; margin: 2px; }
.node-source { font-size: 0.75rem; color: var(--text-secondary); }

/* === Git Panel === */
.git-header { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.git-branch { font-weight: bold; color: var(--accent); }
.git-sync { font-size: 0.8rem; color: var(--text-secondary); }
.git-content { display: flex; flex: 1; overflow: hidden; }
.git-files-section { width: 35%; border-right: 1px solid var(--border); overflow-y: auto; }
.git-files-section h4, .git-diff-section h4, .git-log-section h4 { font-size: 0.8rem; text-transform: uppercase; color: var(--text-secondary); margin: 0; padding: 8px 16px; }
.git-diff-section { flex: 1; overflow: auto; display: flex; flex-direction: column; }
.git-diff-view { font-size: 0.8rem; line-height: 1.5; white-space: pre-wrap; word-break: break-all; margin: 0; padding: 8px 16px; flex: 1; overflow: auto; }
.diff-add { color: #00ff88; }
.diff-del { color: #ff5555; }
.diff-header { color: var(--accent); font-weight: bold; }
.git-file-item { padding: 6px 12px; cursor: pointer; font-size: 0.85rem; transition: background 0.15s; display: flex; gap: 8px; align-items: center; }
.git-file-item:hover { background: rgba(0, 255, 136, 0.04); }
.git-file-item.active { border-left: 2px solid var(--accent); background: rgba(0, 255, 136, 0.08); }
.git-file-status { display: inline-block; width: 24px; font-weight: bold; text-align: center; }
.git-file-status.yellow { color: #e6db74; }
.git-file-status.green { color: #00ff88; }
.git-file-status.red { color: #ff5555; }
.git-file-status.muted { color: var(--text-secondary); }
.git-actions { padding: 12px 16px; border-top: 1px solid var(--border); }
.git-commit-area { display: flex; flex-direction: column; }
#git-commit-msg { background: rgba(20, 20, 20, 0.9); border: 1px solid rgba(0, 255, 136, 0.2); color: var(--text-primary); font-family: var(--font-mono); font-size: 13px; resize: none; padding: 8px 12px; border-radius: 4px; outline: none; transition: border-color 0.2s; }
#git-commit-msg:focus { border-color: var(--accent); }
.git-commit-btns { display: flex; gap: 8px; margin-top: 8px; align-items: center; }
.git-checkbox { font-size: 0.85rem; display: flex; gap: 6px; align-items: center; cursor: pointer; color: var(--text-secondary); }
.git-log { max-height: 200px; overflow-y: auto; }
.git-log-section { border-top: 1px solid var(--border); }
.git-log-item { padding: 6px 16px; font-size: 0.85rem; border-bottom: 1px solid rgba(255, 255, 255, 0.03); display: flex; gap: 8px; align-items: baseline; }
.git-log-hash { color: var(--accent); font-weight: bold; white-space: nowrap; }
.git-log-author { color: var(--text-secondary); margin-left: 8px; white-space: nowrap; }
.git-log-date { color: var(--text-secondary); font-size: 0.75rem; margin-left: auto; white-space: nowrap; }
.git-status-msg { padding: 8px; font-size: 0.85rem; border-radius: 4px; margin-top: 8px; }
.git-status-msg.success { background: rgba(0, 255, 136, 0.1); color: var(--accent); }
.git-status-msg.error { background: rgba(255, 85, 85, 0.1); color: #ff5555; }

/* === Keys Panel === */
.keys-list { display: flex; flex-direction: column; gap: 2px; }
.keys-item { padding: 12px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.keys-item-header { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.keys-provider-name { font-weight: bold; text-transform: capitalize; }
.keys-badge { font-size: 0.7rem; padding: 2px 8px; border-radius: 3px; text-transform: uppercase; letter-spacing: 0.5px; }
.keys-badge--on { background: rgba(0, 255, 136, 0.2); color: var(--accent); }
.keys-badge--off { background: rgba(136, 136, 136, 0.2); color: var(--text-secondary); }
.keys-updated { font-size: 0.75rem; margin-left: auto; }
.keys-item-actions { display: flex; gap: 8px; align-items: center; }
.keys-btn-delete { color: var(--warning) !important; border-color: var(--warning) !important; }
.keys-btn-delete:hover { background: rgba(255, 107, 53, 0.15); }
.keys-btn-confirm { color: var(--warning) !important; }
.keys-edit-row { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.keys-input { flex: 1; background: rgba(20, 20, 20, 0.9); border: 1px solid var(--border); color: var(--text-primary); font-family: var(--font-mono); padding: 8px 12px; border-radius: 4px; font-size: 0.9rem; outline: none; }
.keys-input:focus { border-color: var(--accent); }
.keys-flash { font-size: 0.85rem; padding: 6px 12px; border-radius: 4px; margin-top: 6px; }
.keys-flash--ok { background: rgba(0, 255, 136, 0.1); color: var(--accent); }
.keys-flash--err { background: rgba(255, 85, 85, 0.1); color: #ff5555; }

/* === Runs Panel === */
.runs-stats { display: flex; gap: 16px; padding: 10px 16px; font-size: 0.8rem; color: var(--text-secondary); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.runs-stats strong { color: var(--text-primary); }
.runs-list { overflow-y: auto; flex: 1; }
.runs-item { padding: 10px 16px; border-bottom: 1px solid rgba(255,255,255,0.03); cursor: pointer; transition: background 0.15s; }
.runs-item:hover { background: rgba(0, 255, 136, 0.04); }
.runs-item-header { display: flex; gap: 8px; align-items: center; margin-bottom: 4px; }
.runs-item-task { font-size: 0.85rem; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.runs-item-time, .runs-item-cost { font-size: 0.75rem; }
.runs-badge { font-size: 0.7rem; padding: 2px 8px; border-radius: 3px; text-transform: uppercase; letter-spacing: 0.5px; }
.runs-badge-completed { background: rgba(0, 255, 136, 0.2); color: var(--accent); }
.runs-badge-failed { background: rgba(255, 107, 53, 0.2); color: var(--warning); }
.runs-badge-running { background: rgba(0, 136, 255, 0.2); color: #0088ff; animation: pulse 1.5s infinite; }
.runs-badge-cancelled { background: rgba(136, 136, 136, 0.2); color: var(--text-secondary); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.runs-detail { padding: 16px; overflow-y: auto; flex: 1; }
.runs-detail-header { display: flex; gap: 12px; align-items: center; margin: 8px 0 12px; }
.runs-detail-task { font-size: 0.95rem; line-height: 1.5; margin-bottom: 12px; }
.runs-detail-summary { font-size: 0.85rem; margin-bottom: 12px; }
.runs-detail h4 { font-size: 0.85rem; color: var(--accent); margin: 12px 0 8px; }
.runs-table-wrap { overflow-x: auto; }
.runs-breakdown { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.runs-breakdown th { text-align: left; padding: 6px 10px; color: var(--text-secondary); border-bottom: 1px solid var(--border); }
.runs-breakdown td { padding: 5px 10px; border-bottom: 1px solid rgba(255,255,255,0.03); }
.runs-back { margin-bottom: 8px; }

/* === Utility: Hidden === */
.hidden { display: none !important; }

/* === Login Overlay === */
#login-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 5, 5, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

#login-card-wrapper {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 5, 5, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.login-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 48px 40px;
  background: rgba(15, 15, 15, 0.9);
  border: 1px solid var(--border);
  border-radius: 12px;
  min-width: 340px;
  max-width: 400px;
}

.login-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  text-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
  letter-spacing: 0.1em;
}

.login-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: -8px;
}

.login-step {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(20, 20, 20, 0.9);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.login-btn:hover {
  background: rgba(30, 30, 30, 0.95);
  border-color: rgba(0, 255, 136, 0.3);
}

.login-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.google-icon { flex-shrink: 0; }

.mfa-prompt {
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-align: center;
}

.mfa-btn {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(0, 255, 136, 0.05);
}

.mfa-btn:hover {
  background: rgba(0, 255, 136, 0.15);
}

.login-status {
  font-size: 0.8rem;
  color: var(--text-secondary);
  min-height: 1.2em;
}

.login-error {
  font-size: 0.8rem;
  color: #ff5555;
  background: rgba(255, 85, 85, 0.1);
  padding: 8px 16px;
  border-radius: 6px;
  text-align: center;
  width: 100%;
}

.login-link {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 4px 0;
}

.login-link:hover { color: var(--text-primary); }

/* === Plan Card === */
.plan-card {
  background: rgba(15, 15, 15, 0.95);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin: 8px 0;
}

.plan-summary {
  font-size: 0.95rem;
  color: var(--accent);
  margin-bottom: 12px;
  font-weight: 600;
}

.plan-units {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}

.plan-unit {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  font-size: 0.85rem;
}

.plan-unit-idx {
  color: var(--text-secondary);
  min-width: 24px;
  text-align: right;
}

.plan-unit-desc {
  flex: 1;
  color: var(--text-primary);
}

.team-badge {
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.team-badge.team-impl {
  background: rgba(0, 255, 136, 0.1);
  color: var(--accent);
}

.team-badge.team-research {
  background: rgba(100, 149, 237, 0.15);
  color: #6495ed;
}

.plan-unit-remove {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 2px 6px;
  opacity: 0.5;
}

.plan-unit-remove:hover { opacity: 1; color: #ff5555; }

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

.plan-btn {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(20, 20, 20, 0.9);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.plan-btn:hover {
  background: rgba(30, 30, 30, 0.95);
  border-color: rgba(0, 255, 136, 0.3);
}

.plan-btn-approve {
  border-color: var(--accent);
  color: var(--accent);
}

.plan-btn-approve:hover {
  background: rgba(0, 255, 136, 0.1);
}

.plan-revise-area {
  margin-top: 8px;
  display: flex;
  gap: 8px;
}

.plan-revise-input {
  flex: 1;
  background: rgba(10, 10, 10, 0.8);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  resize: none;
}

.plan-revise-input::placeholder { color: var(--text-secondary); }

/* Tool call display */
.tool-call {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  margin: 4px 0;
  background: rgba(255, 255, 255, 0.03);
  border-left: 2px solid var(--border);
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--text-secondary);
}
.tool-call.tool-error { border-left-color: #f44; }
.tool-name { color: var(--accent); font-weight: 500; white-space: nowrap; }
.tool-input { opacity: 0.6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.tool-status { white-space: nowrap; opacity: 0.5; font-size: 0.72rem; }

/* Shelf panel */
.shelf-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.shelf-header h3 { margin: 0; font-size: 1rem; }
.shelf-content { display: flex; flex: 1; overflow: hidden; }
.shelf-list-section { width: 280px; border-right: 1px solid var(--border); overflow-y: auto; }
.shelf-detail-section { flex: 1; overflow-y: auto; padding: 12px; }
.shelf-item { padding: 10px 12px; cursor: pointer; border-bottom: 1px solid rgba(255,255,255,0.04); }
.shelf-item:hover { background: rgba(255,255,255,0.04); }
.shelf-item.active { background: rgba(0,255,136,0.06); border-left: 2px solid var(--accent); }
.shelf-item-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.shelf-name { font-family: var(--font-mono); font-size: 0.82rem; color: var(--text-primary); }
.shelf-status { font-size: 0.7rem; padding: 1px 6px; border-radius: 3px; }
.shelf-status.green { color: var(--accent); }
.shelf-status.yellow { color: #fa; }
.shelf-item-meta { display: flex; gap: 12px; font-size: 0.72rem; color: var(--text-secondary); margin-top: 4px; }
.shelf-actions { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); }
.shelf-diff-file { margin-bottom: 16px; }
.shelf-diff-header { font-family: var(--font-mono); font-size: 0.82rem; color: var(--accent); padding: 4px 0; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.shelf-diff-content { font-size: 0.78rem; line-height: 1.5; white-space: pre-wrap; word-break: break-all; }
.shelf-status-msg { font-size: 0.8rem; padding: 4px 8px; border-radius: 4px; }
.shelf-status-msg.success { color: var(--accent); }
.shelf-status-msg.error { color: #f44; }
