body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
  color: #1a1a1a;
  background: #fafafa;
}

nav {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid #ddd;
  margin-bottom: 1.5rem;
}

nav a {
  color: #1a1a1a;
  text-decoration: none;
  font-weight: 500;
}

nav a:hover {
  text-decoration: underline;
}

nav form {
  margin-left: auto;
}

nav .brand {
  font-weight: 700;
  margin-right: auto;
}

table {
  border-collapse: collapse;
  width: 100%;
  margin: 1rem 0;
}

th, td {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #e5e5e5;
  font-size: 0.9rem;
}

th {
  background: #f0f0f0;
}

.badge {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  background: #e5e5e5;
}

.badge.active, .badge.sent { background: #d4f4dd; }
.badge.unsubscribed, .badge.paused { background: #f0f0f0; }
.badge.bounced, .badge.failed, .badge.complained { background: #fbdada; }
.badge.draft, .badge.queued { background: #e0e8ff; }
.badge.sending { background: #fff4cc; }

form.inline {
  display: inline;
}

.field {
  margin-bottom: 1rem;
}

.field label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

input[type="text"], input[type="email"], input[type="password"], select, textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.95rem;
  box-sizing: border-box;
}

textarea {
  font-family: ui-monospace, monospace;
  min-height: 260px;
}

button, input[type="submit"] {
  background: #1a1a1a;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
}

button:hover, input[type="submit"]:hover {
  background: #333;
}

.errors {
  background: #fbdada;
  border-radius: 4px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.stat-row {
  display: flex;
  gap: 2rem;
  margin: 1.5rem 0;
}

.stat {
  text-align: center;
}

.stat .value {
  font-size: 1.75rem;
  font-weight: 700;
}

.stat .label {
  font-size: 0.8rem;
  color: #666;
  text-transform: uppercase;
}

.filters {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  align-items: end;
}

.filters .field {
  margin-bottom: 0;
}
