/* ── 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 with rowspan */
.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-slider {
    position: absolute;
    inset: 0;
    background: var(--border);
    border-radius: 10px;
    transition: background 0.2s;
}
.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 {
    background: var(--accent);
}
.toggle-input:checked + .toggle-slider::before {
    transform: translateX(16px);
    background: #fff;
}

/* Cell styles */
.uid-cell code {
    font-size: 12px;
    font-family: var(--mono);
}
.time-cell {
    font-size: 12px;
}
.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);
}

/* Status badges for workers */
.status-badge.status-idle { background: rgba(63, 185, 80, 0.15); color: var(--success); }
.status-badge.status-processing { background: rgba(88, 166, 255, 0.15); color: var(--accent); }
.status-badge.status-disabled { background: rgba(210, 153, 34, 0.15); color: var(--warning); }

/* Connection info */
.connection-info {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    margin-top: 8px;
}
.connection-info h2 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.env-block {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 5px 10px;
    margin: 4px 4px 4px 0;
}
.env-block code {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--accent);
}
