/* ── Workers page ──────────────────────────────────────────────── */

.workers-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px 16px;
}

.workers-count {
  font-size: 12px;
  color: var(--text-dim);
}

/* ── Table ────────────────────────────────────────────────────── */

.workers-table-wrap {
  padding: 0 24px 24px;
}

.workers-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.workers-table th,
.workers-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  white-space: nowrap;
}

.workers-table th {
  color: var(--text-dim);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  background: var(--bg);
}

.workers-table tbody tr:last-child td {
  border-bottom: none;
}

.workers-table tbody tr:hover {
  background: rgba(88, 166, 255, .04);
}

.cell-id {
  font-family: var(--mono);
  font-size: 11px;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cell-task {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
}

.cell-url {
  min-width: 180px;
}

.input-url {
  width: 100%;
  padding: 4px 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-size: 11px;
  font-family: var(--mono);
  outline: none;
  transition: border-color .15s;
}
.input-url:focus {
  border-color: var(--accent);
}

.cell-actions {
  display: flex;
  gap: 4px;
  white-space: nowrap;
}

/* ── Status badges ────────────────────────────────────────────── */

.badge--idle     { background: rgba(63, 185, 80, .12); color: var(--green); }
.badge--busy     { background: rgba(210, 153, 34, .15); color: var(--orange); }
.badge--offline  { background: rgba(248, 81, 73, .12); color: var(--red); }
.badge--disabled { background: #30363d; color: var(--text-dim); }

/* ── Toggle switch ────────────────────────────────────────────── */

.toggle {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 18px;
  cursor: pointer;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 18px;
  transition: background .2s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  left: 2px;
  bottom: 2px;
  background: var(--text-dim);
  border-radius: 50%;
  transition: transform .2s, background .2s;
}

.toggle input:checked + .toggle-slider {
  background: var(--green);
}

.toggle input:checked + .toggle-slider::before {
  transform: translateX(16px);
  background: #fff;
}

.toggle input:disabled + .toggle-slider {
  opacity: .4;
  cursor: not-allowed;
}

/* ── Small buttons ────────────────────────────────────────────── */

.btn--sm {
  padding: 4px 8px;
  font-size: 11px;
  border-radius: 4px;
  min-width: 28px;
  justify-content: center;
}

.btn--secondary {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

.btn--green {
  background: rgba(63, 185, 80, .12);
  border-color: rgba(63, 185, 80, .3);
  color: var(--green);
}
.btn--green:hover {
  background: rgba(63, 185, 80, .2);
}

.btn--orange {
  background: rgba(210, 153, 34, .12);
  border-color: rgba(210, 153, 34, .3);
  color: var(--orange);
}
.btn--orange:hover {
  background: rgba(210, 153, 34, .2);
}

.btn--red {
  background: rgba(248, 81, 73, .12);
  border-color: rgba(248, 81, 73, .3);
  color: var(--red);
}
.btn--red:hover {
  background: rgba(248, 81, 73, .2);
}

/* ── Empty state ──────────────────────────────────────────────── */

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-dim);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.empty-state p {
  font-size: 14px;
  margin-bottom: 8px;
}

.text-dim {
  color: var(--text-dim);
}

/* ── Info card on workers page ────────────────────────────────── */

.workers-table-wrap + .info-card {
  margin: 0 24px 24px;
}
