* { box-sizing: border-box; }
body {
  font-family: -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: #f4f5f7;
  color: #1c1e21;
  margin: 0;
}
header.topbar {
  background: #1c1e21;
  color: #fff;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
header.topbar a { color: #fff; text-decoration: none; margin-right: 18px; font-size: 14px; }
header.topbar a:hover { text-decoration: underline; }
header.topbar .brand { font-weight: 600; margin-right: 24px; }
main { padding: 24px; max-width: 1200px; margin: 0 auto; }
h1 { font-size: 22px; margin-bottom: 16px; }
h2 { font-size: 17px; margin: 24px 0 10px; }
.card {
  background: #fff;
  border: 1px solid #e1e3e6;
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 16px;
}
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #eceef0; font-size: 14px; }
th { background: #fafafa; font-weight: 600; color: #555; }
tr:hover td { background: #fafcff; }
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 10px;
  font-size: 12px; font-weight: 600; background: #eee; color: #444;
}
.badge.done, .badge.success, .badge.active { background: #d9f2e3; color: #157347; }
.badge.pending, .badge.running { background: #fff3cd; color: #997404; }
.badge.failed, .badge.error { background: #f8d7da; color: #b02a37; }
.badge.captcha_paused { background: #ffe1cc; color: #b45c09; }
.badge.paused, .badge.stopped { background: #e2e3e5; color: #555; }
.stat-row { display: flex; gap: 16px; flex-wrap: wrap; }
.stat-tile {
  background: #fff; border: 1px solid #e1e3e6; border-radius: 8px;
  padding: 14px 20px; min-width: 140px;
}
.stat-tile .value { font-size: 26px; font-weight: 700; }
.stat-tile .label { font-size: 13px; color: #666; }
form.inline { display: inline; }
label { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 4px; }
input[type=text], input[type=password], input[type=number], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid #ccc; border-radius: 6px; font-size: 14px;
}
.btn {
  display: inline-block; padding: 8px 16px; border-radius: 6px; border: none;
  background: #2563eb; color: #fff; font-size: 14px; cursor: pointer; text-decoration: none;
}
.btn:hover { background: #1d4ed8; }
.btn.secondary { background: #e5e7eb; color: #1c1e21; }
.btn.secondary:hover { background: #d1d5db; }
.hint { color: #777; font-size: 13px; margin-top: 4px; }
.chip-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.chip {
  background: #eef2ff; color: #3730a3; border-radius: 14px; padding: 3px 10px;
  font-size: 13px; display: flex; align-items: center; gap: 6px;
}
.chip button { border: none; background: none; cursor: pointer; color: #3730a3; font-weight: 700; }
.autocomplete-results {
  border: 1px solid #ddd; border-radius: 6px; max-height: 180px; overflow-y: auto;
  background: #fff; margin-top: 2px;
}
.autocomplete-results div { padding: 6px 10px; cursor: pointer; font-size: 14px; }
.autocomplete-results div:hover { background: #f0f4ff; }
.error { color: #b02a37; margin-bottom: 10px; }
.pagination { margin-top: 12px; }
.pagination a { margin-right: 10px; }
