:root {
  --bg: #0f1115;
  --surface: #1a1d24;
  --border: #2a2e37;
  --text: #e6e8eb;
  --muted: #9aa0ab;
  --accent: #4c8dff;
  --danger: #e5484d;
  --success: #2fb344;
  --warning: #e8a03d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.brand {
  font-weight: 700;
  font-size: 1.1rem;
}

.nav {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.nav.is-hidden {
  display: none;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.nav a.is-active {
  color: var(--text);
  background: var(--surface);
}

.link-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.9rem;
}

#app {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.route {
  display: none;
}

.route.is-active {
  display: block;
}

h1 {
  font-size: 1.4rem;
  margin-top: 0;
}

form label {
  display: block;
  margin-bottom: 0.75rem;
  color: var(--muted);
}

input,
select,
textarea {
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-family: inherit;
}

button {
  padding: 0.5rem 1rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--accent);
  color: white;
  cursor: pointer;
  margin-right: 0.5rem;
}

button.btn-danger {
  background: var(--danger);
}

.error-text {
  color: var(--danger);
  min-height: 1.2rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.data-table a {
  color: var(--accent);
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
  font-size: 0.8rem;
}

.badge-success {
  background: rgba(47, 179, 68, 0.2);
  color: var(--success);
}

.badge-danger {
  background: rgba(229, 72, 77, 0.2);
  color: var(--danger);
}

.badge-warning {
  background: rgba(232, 160, 61, 0.2);
  color: var(--warning);
}

.badge-info {
  background: rgba(76, 141, 255, 0.2);
  color: var(--accent);
}

.pipeline-bar {
  width: 100%;
  height: 8px;
  background: var(--surface);
  border-radius: 4px;
  overflow: hidden;
  margin: 0.5rem 0;
}

.pipeline-fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.3s ease;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem;
  margin: 1rem 0;
}

.cost-meter {
  margin: 1rem 0;
}

.ledger {
  list-style: none;
  padding: 0;
}

.ledger li {
  padding: 0.25rem 0;
  border-bottom: 1px solid var(--border);
}

.kill-controls {
  margin-top: 1.5rem;
}

.profiles-list {
  list-style: none;
  padding: 0;
}

.profiles-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.profiles-list textarea {
  font-family: ui-monospace, monospace;
  font-size: 0.8rem;
  margin-top: 0.5rem;
}
