:root {
  --bg: #0b0b12; --surface: #15151f; --surface-2: #1d1d2b; --border: #2a2a3c;
  --text: #e7e7ef; --muted: #9a9ab0; --accent: #7c6cff; --ok: #46d39a;
  --warn: #f0b34b; --err: #ff6b6b;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  display: flex; flex-direction: column;
}
header {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px; border-bottom: 1px solid var(--border); background: var(--surface);
  font-weight: 700;
}
header .status { font-weight: 400; font-size: 12px; color: var(--muted); margin-left: auto; }

.layout { display: flex; flex: 1; min-height: 0; }
aside {
  width: 260px; flex: none; border-right: 1px solid var(--border);
  background: var(--surface); padding: 14px; overflow-y: auto;
}
main { flex: 1; padding: 24px 28px; overflow-y: auto; }

button {
  background: var(--accent); color: #fff; border: 0; border-radius: 9px;
  padding: 9px 14px; font-size: 14px; font-weight: 600; cursor: pointer;
}
button.ghost { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
button:disabled { opacity: .5; cursor: default; }

#project-list { list-style: none; margin: 14px 0 0; padding: 0; }
#project-list li {
  padding: 9px 11px; border-radius: 8px; cursor: pointer; font-size: 14px;
  color: var(--muted); margin-bottom: 2px;
}
#project-list li:hover { background: var(--surface-2); }
#project-list li.active { background: var(--surface-2); color: var(--text); }

h1 { font-size: 24px; margin: 0 0 4px; }
a { color: var(--accent); }
.muted { color: var(--muted); font-size: 13px; }

.prompt-row { display: flex; gap: 8px; margin: 18px 0; align-items: flex-start; }
textarea {
  flex: 1; min-height: 60px; resize: vertical; background: var(--surface-2);
  color: var(--text); border: 1px solid var(--border); border-radius: 10px;
  padding: 11px; font: inherit; font-size: 14px;
}

#log {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 6px 14px; min-height: 60px; margin: 14px 0; font-size: 13px;
}
#log:empty::before { content: "Agent activity will appear here."; color: var(--muted); }
.entry { padding: 6px 0; border-bottom: 1px solid var(--border); }
.entry:last-child { border-bottom: 0; }
.entry .tag {
  display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; margin-right: 8px; color: var(--accent);
}
.entry.tool .tag { color: var(--warn); }
.entry.done .tag, .entry.ok .tag { color: var(--ok); }
.entry.err .tag { color: var(--err); }
.entry code { background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }
.entry .body { white-space: pre-wrap; }

#files { list-style: none; padding: 0; columns: 2; font-size: 13px; color: var(--muted); }
#files li { padding: 2px 0; }
#files li::before { content: "📄 "; }

.spin { display: inline-block; animation: s 1s linear infinite; }
@keyframes s { to { transform: rotate(360deg); } }
