:root {
  --bg-main: #0b1220;
  --bg-sidebar: #020617;
  --bg-panel: #020617;
  --border: #1e293b;
  --accent: #38bdf8;
  --text: #e5e7eb;
  --muted: #94a3b8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, sans-serif;
  background: var(--bg-main);
  color: var(--text);
}

.app {
  display: flex;
  height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
}

.logo {
  padding: 1rem;
  font-weight: bold;
  border-bottom: 1px solid var(--border);
}

#project-list {
  list-style: none;
  margin: 0;
  padding: 0.5rem;
}

#project-list li {
  padding: 0.4rem;
  border-radius: 4px;
  cursor: pointer;
}

#project-list li:hover {
  background: #1e293b;
}

#project-list li.active {
  background: var(--accent);
  color: #020617;
  font-weight: bold;
}

/* Content */
.content {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
}

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  background: var(--bg-main);
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}

/* Actions */
.actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

button {
  background: var(--accent);
  border: none;
  padding: 0.4rem 0.7rem;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
}

button:disabled {
  background: #334155;
  color: var(--muted);
  cursor: not-allowed;
}

/* Status */
.status {
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  font-weight: bold;
}

.status.active {
  background: #22c55e;
  color: #020617;
}

.status.failed {
  background: #ef4444;
  color: white;
}

/* Panels */
.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 1rem;
}

.panel-header {
  padding: 0.6rem 1rem;
  display: flex;
  justify-content: space-between;
  cursor: pointer;
}

.panel-body {
  padding: 1rem;
}

.codebox {
  max-height: 300px;
  overflow: auto;
  font-size: 0.85rem;
  background: #020617;
  border: 1px dashed var(--border);
  padding: 1rem;
}

/* Filetree */
.filetree li {
  cursor: pointer;
  padding: 0.25rem;
}

.filetree li:hover {
  background: #1e293b;
}

/* Commit */
input {
  width: 100%;
  padding: 0.4rem;
  background: #020617;
  border: 1px solid var(--border);
  color: var(--text);
}

.commit-result.success { color: #22c55e; }
.commit-result.error { color: #ef4444; }
