:root {
  color-scheme: light dark;
  --bg: #0f1115;
  --fg: #e8e8e8;
  --card: #171a21;
  --border: #2a2e37;
  --accent: #4f8cff;
  --muted: #9aa0ac;
}

* { box-sizing: border-box; }

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

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px;
}

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

nav.topbar a {
  color: var(--fg);
  text-decoration: none;
  margin-right: 16px;
}

nav.topbar a:hover { color: var(--accent); }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.dashboard-layout {
  display: flex;
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px;
  align-items: flex-start;
}

.sidebar {
  width: 200px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 24px;
}

.sidebar a {
  color: var(--fg);
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 14px;
}

.sidebar a:hover { background: var(--card); }
.sidebar a.active { background: var(--card); color: var(--accent); font-weight: 600; }

.main-content { flex: 1; min-width: 0; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--border); font-size: 14px; }
th { color: var(--muted); font-weight: 600; }

form.stacked label { display: block; margin-bottom: 12px; }
form.stacked input, form.stacked select, form.stacked textarea {
  width: 100%;
  padding: 8px;
  margin-top: 4px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--fg);
}

button {
  background: var(--accent);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

button:hover { opacity: 0.9; }

.status-sent { color: #4caf50; }
.status-failed { color: #f44336; }
.status-queued { color: var(--muted); }
.status-scheduled { color: var(--accent); }
.status-blocked_quota { color: #ff9800; }
.status-skipped { color: var(--muted); }

.error { color: #f44336; margin-bottom: 12px; }

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