/* ═══════════════════════════════════════════════════════════════
   NEXUS OS — Task Manager
   Neon glassmorphism process management interface
   ═══════════════════════════════════════════════════════════════ */

.nexus-task-manager {
  width: 100%; height: 100%;
  background: rgba(10, 5, 20, 0.96);
  border: 1px solid rgba(255, 0, 60, 0.2);
  border-radius: 8px;
  display: flex; flex-direction: column;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  color: #e0e0e0;
  overflow: hidden;
  position: relative;
}

.nexus-task-manager::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 0, 60, 0.5), transparent);
}

.tm-header {
  padding: 12px 16px;
  background: rgba(255, 0, 60, 0.08);
  border-bottom: 1px solid rgba(255, 0, 60, 0.15);
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}

.tm-header h3 {
  margin: 0; font-size: 13px; font-weight: 600;
  color: #ff003c;
  text-shadow: 0 0 10px rgba(255, 0, 60, 0.5);
  letter-spacing: 1px;
}

.tm-stats {
  display: flex; gap: 16px; font-size: 11px;
}

.tm-stat { color: #888; }
.tm-stat span { color: #ff003c; font-weight: 600; }

.tm-toolbar {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 0, 60, 0.1);
  display: flex; gap: 8px; align-items: center;
  flex-shrink: 0;
}

.tm-btn {
  padding: 4px 12px;
  background: rgba(255, 0, 60, 0.12);
  border: 1px solid rgba(255, 0, 60, 0.25);
  border-radius: 4px;
  color: #e0e0e0;
  font-size: 11px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}

.tm-btn:hover {
  background: rgba(255, 0, 60, 0.25);
  border-color: rgba(255, 0, 60, 0.5);
  box-shadow: 0 0 10px rgba(255, 0, 60, 0.2);
}

.tm-btn-danger {
  border-color: rgba(255, 50, 50, 0.4);
  color: #ff4444;
}

.tm-btn-danger:hover {
  background: rgba(255, 50, 50, 0.25);
  box-shadow: 0 0 12px rgba(255, 50, 50, 0.3);
}

.tm-search {
  flex: 1;
  padding: 4px 10px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 0, 60, 0.15);
  border-radius: 4px;
  color: #e0e0e0;
  font-size: 11px;
  font-family: inherit;
  outline: none;
}

.tm-search:focus {
  border-color: rgba(255, 0, 60, 0.4);
  box-shadow: 0 0 8px rgba(255, 0, 60, 0.15);
}

.tm-table-wrap {
  flex: 1; overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 0, 60, 0.3) transparent;
}

.tm-table-wrap::-webkit-scrollbar { width: 6px; }
.tm-table-wrap::-webkit-scrollbar-track { background: transparent; }
.tm-table-wrap::-webkit-scrollbar-thumb { background: rgba(255, 0, 60, 0.3); border-radius: 3px; }

.tm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.tm-table thead { position: sticky; top: 0; z-index: 1; }

.tm-table th {
  padding: 8px 12px;
  text-align: left;
  background: rgba(10, 5, 20, 0.98);
  color: #ff003c;
  font-weight: 600;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(255, 0, 60, 0.15);
  cursor: pointer;
  user-select: none;
}

.tm-table th:hover { color: #ff4470; }
.tm-table th.sorted::after { content: ' ▼'; font-size: 8px; }
.tm-table th.sorted-asc::after { content: ' ▲'; font-size: 8px; }

.tm-table td {
  padding: 6px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  white-space: nowrap;
}

.tm-table tr { transition: background 0.15s; }
.tm-table tbody tr:hover { background: rgba(255, 0, 60, 0.06); }
.tm-table tr.selected { background: rgba(255, 0, 60, 0.12); }

.tm-state-running { color: #00ff88; }
.tm-state-paused { color: #ffaa00; }
.tm-state-sleeping { color: #8888ff; }
.tm-state-stopped { color: #ff4444; }
.tm-state-crashed { color: #ff0000; text-shadow: 0 0 6px rgba(255, 0, 0, 0.5); }

.tm-bar-wrap {
  width: 60px; height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
  margin-left: 6px;
}

.tm-bar {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease;
}

.tm-bar-cpu { background: linear-gradient(90deg, #ff003c, #ff4470); }
.tm-bar-mem { background: linear-gradient(90deg, #00ccff, #44ddff); }
.tm-bar-high { background: linear-gradient(90deg, #ff4444, #ff6666) !important; }

.tm-footer {
  padding: 8px 16px;
  background: rgba(255, 0, 60, 0.05);
  border-top: 1px solid rgba(255, 0, 60, 0.1);
  font-size: 10px;
  color: #666;
  display: flex;
  justify-content: space-between;
  flex-shrink: 0;
}

.tm-graph {
  height: 50px;
  padding: 4px 16px;
  border-bottom: 1px solid rgba(255, 0, 60, 0.1);
  flex-shrink: 0;
  position: relative;
}

.tm-graph canvas { width: 100%; height: 100%; }
