* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: #f4f6f8;
  color: #1a1a1a;
}
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  background: #1a1a2e;
  color: #fff;
}
.brand { font-weight: 600; font-size: 18px; }
.container {
  max-width: 720px;
  margin: 32px auto;
  padding: 0 16px;
}
.card {
  background: #fff;
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
h2 { margin-top: 0; }
.muted { color: #777; font-size: 14px; }
label {
  display: block;
  margin: 12px 0 4px;
  font-size: 14px;
  font-weight: 600;
}
input[type="email"], input[type="text"], input[type="url"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 15px;
}
button[type="submit"] {
  margin-top: 16px;
  width: 100%;
  padding: 11px;
  background: #4338ca;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  cursor: pointer;
}
button[type="submit"]:hover { background: #372da3; }
.btn-link {
  background: none;
  border: none;
  color: #4338ca;
  cursor: pointer;
  font-size: 14px;
  padding: 0;
  margin-top: 12px;
  text-decoration: underline;
}
.alert {
  padding: 10px 14px;
  border-radius: 6px;
  margin-bottom: 12px;
  font-size: 14px;
}
.alert.success { background: #e6f7ec; color: #1a7f3c; }
.alert.error { background: #fdecea; color: #b3261e; }
.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 14px;
}
.table th, .table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid #eee;
}
.table th { color: #555; }

/* ---- campaign UI ---- */
.nav-links { display: flex; align-items: center; gap: 18px; }
.nav-links a { color: #cdd0ff; text-decoration: none; font-size: 14px; }
.nav-links a:hover { color: #fff; text-decoration: underline; }

.container.wide { max-width: 1040px; }

select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 15px;
  background: #fff;
}
input[type="number"] {
  padding: 9px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 15px;
  width: 90px;
}

.btn {
  display: inline-block;
  padding: 8px 14px;
  background: #4338ca;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { background: #372da3; }
.btn.secondary { background: #eef0ff; color: #4338ca; }
.btn.secondary:hover { background: #e0e3ff; }
.btn.danger { background: #fdecea; color: #b3261e; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 8px; }

.region-picker {
  margin-top: 8px;
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 10px 14px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 4px 16px;
}
.region-picker label {
  font-weight: 400;
  margin: 2px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.region-picker input { width: auto; }
.picker-summary { font-size: 13px; color: #555; margin-top: 6px; }

.stat-tiles { display: flex; flex-wrap: wrap; gap: 14px; margin: 4px 0 8px; }
.tile {
  flex: 1 1 130px;
  background: #f7f8ff;
  border: 1px solid #e7e9ff;
  border-radius: 10px;
  padding: 14px 16px;
}
.tile .num { font-size: 26px; font-weight: 700; color: #2f2a86; }
.tile .lbl { font-size: 12px; color: #666; text-transform: uppercase; letter-spacing: .04em; }

.bar-wrap { background: #eef0f5; border-radius: 5px; height: 10px; min-width: 60px; overflow: hidden; }
.bar { background: #4338ca; height: 100%; }
