/* ── Workers Page ─────────────────────────────────────────────── */

/* Main workers table */
.workers-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border);
  font-size: 13px;
  margin-bottom: 16px;
}
.workers-table th,
.workers-table td {
  text-align: left;
  padding: 8px 12px;
  border: 1px solid var(--border);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.workers-table thead th {
  background: var(--bg);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  position: sticky;
  top: 0;
  z-index: 1;
}
.workers-table tbody tr.worker-row:hover {
  background: var(--surface-hover);
}

/* Group cells */
.type-cell,
.queue-cell,
.toggle-cell {
  vertical-align: middle;
  text-align: center;
  background: var(--surface);
}
.type-cell { border-right: 2px solid var(--border); }
.queue-cell { font-size: 13px; font-weight: 600; }
.toggle-cell { width: 1%; }
.group-disabled { opacity: 0.6; }

/* Toggle switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  cursor: pointer;
  flex-shrink: 0;
}
.toggle-input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 10px;
  transition: background 0.2s;
  cursor: pointer;
}
.toggle-slider::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  left: 2px;
  bottom: 2px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: transform 0.2s, background 0.2s;
}
.toggle-input:checked + .toggle-slider,
.toggle-switch input:checked + .toggle-slider {
  background: var(--accent);
}
.toggle-input:checked + .toggle-slider::before,
.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(16px);
  background: #fff;
}

/* Cell styles */
.api-url-cell { max-width: 220px; }
.api-url-cell code {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--mono);
}
.no-workers {
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
  padding: 10px;
}
.no-workers-row td { background: var(--bg); }

/* ── Log modal ───────────────────────────────────────────────── */

.log-cell { text-align: center; width: 1%; }
.btn-log {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 14px;
  opacity: 0.7;
  transition: opacity 0.15s;
}
.btn-log:hover { opacity: 1; border-color: var(--accent); color: var(--accent); }

.log-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.log-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  width: 90vw;
  max-width: 1100px;
  height: 75vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}
.log-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.log-modal-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.log-modal-title code {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 13px;
}
.log-modal-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}
.log-auto-scroll-label {
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}
.btn-log-action {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  padding: 2px 6px;
  border-radius: 4px;
}
.btn-log-action:hover { background: var(--surface-hover); }
.log-modal-close {
  font-size: 22px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.log-modal-close:hover { color: var(--text); }
.log-content {
  flex: 1;
  overflow: auto;
  padding: 12px 16px;
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-muted);
  background: var(--bg);
  white-space: pre-wrap;
  word-break: break-all;
  border-radius: 0 0 10px 10px;
}
